-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapplication_templates.go
57 lines (48 loc) · 1.72 KB
/
application_templates.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// This file was auto-generated by Fern from our API Definition.
package basistheory
import (
json "encoding/json"
fmt "fmt"
core "github.com/Basis-Theory/go-sdk/core"
)
type ApplicationTemplate struct {
ID *string `json:"id,omitempty" url:"id,omitempty"`
Name *string `json:"name,omitempty" url:"name,omitempty"`
Description *string `json:"description,omitempty" url:"description,omitempty"`
ApplicationType *string `json:"application_type,omitempty" url:"application_type,omitempty"`
TemplateType *string `json:"template_type,omitempty" url:"template_type,omitempty"`
IsStarter *bool `json:"is_starter,omitempty" url:"is_starter,omitempty"`
Rules []*AccessRule `json:"rules,omitempty" url:"rules,omitempty"`
Permissions []string `json:"permissions,omitempty" url:"permissions,omitempty"`
extraProperties map[string]interface{}
_rawJSON json.RawMessage
}
func (a *ApplicationTemplate) GetExtraProperties() map[string]interface{} {
return a.extraProperties
}
func (a *ApplicationTemplate) UnmarshalJSON(data []byte) error {
type unmarshaler ApplicationTemplate
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = ApplicationTemplate(value)
extraProperties, err := core.ExtractExtraProperties(data, *a)
if err != nil {
return err
}
a.extraProperties = extraProperties
a._rawJSON = json.RawMessage(data)
return nil
}
func (a *ApplicationTemplate) String() string {
if len(a._rawJSON) > 0 {
if value, err := core.StringifyJSON(a._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}