-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathmodel_account_group_role.go
More file actions
163 lines (132 loc) · 5 KB
/
Copy pathmodel_account_group_role.go
File metadata and controls
163 lines (132 loc) · 5 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
Administrative API
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These operations can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
API version: 7.0.62
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package administrative
import (
"encoding/json"
"github.com/thousandeyes/thousandeyes-sdk-go/v3/internal/utils"
)
// checks if the AccountGroupRole type satisfies the MappedNullable interface at compile time
var _ utils.MappedNullable = &AccountGroupRole{}
// AccountGroupRole struct for AccountGroupRole
type AccountGroupRole struct {
AccountGroup *AccountGroup `json:"accountGroup,omitempty"`
Roles []Role `json:"roles,omitempty"`
}
// NewAccountGroupRole instantiates a new AccountGroupRole object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAccountGroupRole() *AccountGroupRole {
this := AccountGroupRole{}
return &this
}
// NewAccountGroupRoleWithDefaults instantiates a new AccountGroupRole object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAccountGroupRoleWithDefaults() *AccountGroupRole {
this := AccountGroupRole{}
return &this
}
// GetAccountGroup returns the AccountGroup field value if set, zero value otherwise.
func (o *AccountGroupRole) GetAccountGroup() AccountGroup {
if o == nil || utils.IsNil(o.AccountGroup) {
var ret AccountGroup
return ret
}
return *o.AccountGroup
}
// GetAccountGroupOk returns a tuple with the AccountGroup field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountGroupRole) GetAccountGroupOk() (*AccountGroup, bool) {
if o == nil || utils.IsNil(o.AccountGroup) {
return nil, false
}
return o.AccountGroup, true
}
// HasAccountGroup returns a boolean if a field has been set.
func (o *AccountGroupRole) HasAccountGroup() bool {
if o != nil && !utils.IsNil(o.AccountGroup) {
return true
}
return false
}
// SetAccountGroup gets a reference to the given AccountGroup and assigns it to the AccountGroup field.
func (o *AccountGroupRole) SetAccountGroup(v AccountGroup) {
o.AccountGroup = &v
}
// GetRoles returns the Roles field value if set, zero value otherwise.
func (o *AccountGroupRole) GetRoles() []Role {
if o == nil || utils.IsNil(o.Roles) {
var ret []Role
return ret
}
return o.Roles
}
// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountGroupRole) GetRolesOk() ([]Role, bool) {
if o == nil || utils.IsNil(o.Roles) {
return nil, false
}
return o.Roles, true
}
// HasRoles returns a boolean if a field has been set.
func (o *AccountGroupRole) HasRoles() bool {
if o != nil && !utils.IsNil(o.Roles) {
return true
}
return false
}
// SetRoles gets a reference to the given []Role and assigns it to the Roles field.
func (o *AccountGroupRole) SetRoles(v []Role) {
o.Roles = v
}
func (o AccountGroupRole) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AccountGroupRole) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !utils.IsNil(o.AccountGroup) {
toSerialize["accountGroup"] = o.AccountGroup
}
if !utils.IsNil(o.Roles) {
toSerialize["roles"] = o.Roles
}
return toSerialize, nil
}
type NullableAccountGroupRole struct {
value *AccountGroupRole
isSet bool
}
func (v NullableAccountGroupRole) Get() *AccountGroupRole {
return v.value
}
func (v *NullableAccountGroupRole) Set(val *AccountGroupRole) {
v.value = val
v.isSet = true
}
func (v NullableAccountGroupRole) IsSet() bool {
return v.isSet
}
func (v *NullableAccountGroupRole) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAccountGroupRole(val *AccountGroupRole) *NullableAccountGroupRole {
return &NullableAccountGroupRole{value: val, isSet: true}
}
func (v NullableAccountGroupRole) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAccountGroupRole) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}