/
model_organization_user_data_source_filters.go
208 lines (172 loc) · 6.44 KB
/
model_organization_user_data_source_filters.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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
/*
Carbon
Connect external data to LLMs, no matter the source.
API version: 1.0.0
*/
// Code generated by Konfig (https://konfigthis.com); DO NOT EDIT.
package carbon
import (
"encoding/json"
)
// OrganizationUserDataSourceFilters struct for OrganizationUserDataSourceFilters
type OrganizationUserDataSourceFilters struct {
Source NullableDataSourceTypeNullable `json:"source,omitempty"`
Ids []int32 `json:"ids,omitempty"`
RevokedAccess NullableBool `json:"revoked_access,omitempty"`
}
// NewOrganizationUserDataSourceFilters instantiates a new OrganizationUserDataSourceFilters 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 NewOrganizationUserDataSourceFilters() *OrganizationUserDataSourceFilters {
this := OrganizationUserDataSourceFilters{}
return &this
}
// NewOrganizationUserDataSourceFiltersWithDefaults instantiates a new OrganizationUserDataSourceFilters 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 NewOrganizationUserDataSourceFiltersWithDefaults() *OrganizationUserDataSourceFilters {
this := OrganizationUserDataSourceFilters{}
return &this
}
// GetSource returns the Source field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *OrganizationUserDataSourceFilters) GetSource() DataSourceTypeNullable {
if o == nil || isNil(o.Source.Get()) {
var ret DataSourceTypeNullable
return ret
}
return *o.Source.Get()
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *OrganizationUserDataSourceFilters) GetSourceOk() (*DataSourceTypeNullable, bool) {
if o == nil {
return nil, false
}
return o.Source.Get(), o.Source.IsSet()
}
// HasSource returns a boolean if a field has been set.
func (o *OrganizationUserDataSourceFilters) HasSource() bool {
if o != nil && o.Source.IsSet() {
return true
}
return false
}
// SetSource gets a reference to the given NullableDataSourceTypeNullable and assigns it to the Source field.
func (o *OrganizationUserDataSourceFilters) SetSource(v DataSourceTypeNullable) {
o.Source.Set(&v)
}
// SetSourceNil sets the value for Source to be an explicit nil
func (o *OrganizationUserDataSourceFilters) SetSourceNil() {
o.Source.Set(nil)
}
// UnsetSource ensures that no value is present for Source, not even an explicit nil
func (o *OrganizationUserDataSourceFilters) UnsetSource() {
o.Source.Unset()
}
// GetIds returns the Ids field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *OrganizationUserDataSourceFilters) GetIds() []int32 {
if o == nil {
var ret []int32
return ret
}
return o.Ids
}
// GetIdsOk returns a tuple with the Ids field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *OrganizationUserDataSourceFilters) GetIdsOk() ([]int32, bool) {
if o == nil || isNil(o.Ids) {
return nil, false
}
return o.Ids, true
}
// HasIds returns a boolean if a field has been set.
func (o *OrganizationUserDataSourceFilters) HasIds() bool {
if o != nil && isNil(o.Ids) {
return true
}
return false
}
// SetIds gets a reference to the given []int32 and assigns it to the Ids field.
func (o *OrganizationUserDataSourceFilters) SetIds(v []int32) {
o.Ids = v
}
// GetRevokedAccess returns the RevokedAccess field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *OrganizationUserDataSourceFilters) GetRevokedAccess() bool {
if o == nil || isNil(o.RevokedAccess.Get()) {
var ret bool
return ret
}
return *o.RevokedAccess.Get()
}
// GetRevokedAccessOk returns a tuple with the RevokedAccess field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *OrganizationUserDataSourceFilters) GetRevokedAccessOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.RevokedAccess.Get(), o.RevokedAccess.IsSet()
}
// HasRevokedAccess returns a boolean if a field has been set.
func (o *OrganizationUserDataSourceFilters) HasRevokedAccess() bool {
if o != nil && o.RevokedAccess.IsSet() {
return true
}
return false
}
// SetRevokedAccess gets a reference to the given NullableBool and assigns it to the RevokedAccess field.
func (o *OrganizationUserDataSourceFilters) SetRevokedAccess(v bool) {
o.RevokedAccess.Set(&v)
}
// SetRevokedAccessNil sets the value for RevokedAccess to be an explicit nil
func (o *OrganizationUserDataSourceFilters) SetRevokedAccessNil() {
o.RevokedAccess.Set(nil)
}
// UnsetRevokedAccess ensures that no value is present for RevokedAccess, not even an explicit nil
func (o *OrganizationUserDataSourceFilters) UnsetRevokedAccess() {
o.RevokedAccess.Unset()
}
func (o OrganizationUserDataSourceFilters) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Source.IsSet() {
toSerialize["source"] = o.Source.Get()
}
if o.Ids != nil {
toSerialize["ids"] = o.Ids
}
if o.RevokedAccess.IsSet() {
toSerialize["revoked_access"] = o.RevokedAccess.Get()
}
return json.Marshal(toSerialize)
}
type NullableOrganizationUserDataSourceFilters struct {
value *OrganizationUserDataSourceFilters
isSet bool
}
func (v NullableOrganizationUserDataSourceFilters) Get() *OrganizationUserDataSourceFilters {
return v.value
}
func (v *NullableOrganizationUserDataSourceFilters) Set(val *OrganizationUserDataSourceFilters) {
v.value = val
v.isSet = true
}
func (v NullableOrganizationUserDataSourceFilters) IsSet() bool {
return v.isSet
}
func (v *NullableOrganizationUserDataSourceFilters) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOrganizationUserDataSourceFilters(val *OrganizationUserDataSourceFilters) *NullableOrganizationUserDataSourceFilters {
return &NullableOrganizationUserDataSourceFilters{value: val, isSet: true}
}
func (v NullableOrganizationUserDataSourceFilters) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOrganizationUserDataSourceFilters) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}