/
model_log_forwarder_datadog_connection_type.go
306 lines (255 loc) · 8.75 KB
/
model_log_forwarder_datadog_connection_type.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
/*
ArvanCloud CDN Services
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 4.107.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cdn
import (
"encoding/json"
)
// checks if the LogForwarderDatadogConnectionType type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LogForwarderDatadogConnectionType{}
// LogForwarderDatadogConnectionType Datadog connection
type LogForwarderDatadogConnectionType struct {
SampleRate *int32 `json:"sample_rate,omitempty"`
Url *string `json:"url,omitempty"`
ApiKey *string `json:"api_key,omitempty"`
AppKey *string `json:"app_key,omitempty"`
FlushInterval *int32 `json:"flush_interval,omitempty"`
BufferSize *int32 `json:"buffer_size,omitempty"`
}
// NewLogForwarderDatadogConnectionType instantiates a new LogForwarderDatadogConnectionType 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 NewLogForwarderDatadogConnectionType() *LogForwarderDatadogConnectionType {
this := LogForwarderDatadogConnectionType{}
return &this
}
// NewLogForwarderDatadogConnectionTypeWithDefaults instantiates a new LogForwarderDatadogConnectionType 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 NewLogForwarderDatadogConnectionTypeWithDefaults() *LogForwarderDatadogConnectionType {
this := LogForwarderDatadogConnectionType{}
return &this
}
// GetSampleRate returns the SampleRate field value if set, zero value otherwise.
func (o *LogForwarderDatadogConnectionType) GetSampleRate() int32 {
if o == nil || IsNil(o.SampleRate) {
var ret int32
return ret
}
return *o.SampleRate
}
// GetSampleRateOk returns a tuple with the SampleRate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogForwarderDatadogConnectionType) GetSampleRateOk() (*int32, bool) {
if o == nil || IsNil(o.SampleRate) {
return nil, false
}
return o.SampleRate, true
}
// HasSampleRate returns a boolean if a field has been set.
func (o *LogForwarderDatadogConnectionType) HasSampleRate() bool {
if o != nil && !IsNil(o.SampleRate) {
return true
}
return false
}
// SetSampleRate gets a reference to the given int32 and assigns it to the SampleRate field.
func (o *LogForwarderDatadogConnectionType) SetSampleRate(v int32) {
o.SampleRate = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *LogForwarderDatadogConnectionType) GetUrl() string {
if o == nil || IsNil(o.Url) {
var ret string
return ret
}
return *o.Url
}
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogForwarderDatadogConnectionType) GetUrlOk() (*string, bool) {
if o == nil || IsNil(o.Url) {
return nil, false
}
return o.Url, true
}
// HasUrl returns a boolean if a field has been set.
func (o *LogForwarderDatadogConnectionType) HasUrl() bool {
if o != nil && !IsNil(o.Url) {
return true
}
return false
}
// SetUrl gets a reference to the given string and assigns it to the Url field.
func (o *LogForwarderDatadogConnectionType) SetUrl(v string) {
o.Url = &v
}
// GetApiKey returns the ApiKey field value if set, zero value otherwise.
func (o *LogForwarderDatadogConnectionType) GetApiKey() string {
if o == nil || IsNil(o.ApiKey) {
var ret string
return ret
}
return *o.ApiKey
}
// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogForwarderDatadogConnectionType) GetApiKeyOk() (*string, bool) {
if o == nil || IsNil(o.ApiKey) {
return nil, false
}
return o.ApiKey, true
}
// HasApiKey returns a boolean if a field has been set.
func (o *LogForwarderDatadogConnectionType) HasApiKey() bool {
if o != nil && !IsNil(o.ApiKey) {
return true
}
return false
}
// SetApiKey gets a reference to the given string and assigns it to the ApiKey field.
func (o *LogForwarderDatadogConnectionType) SetApiKey(v string) {
o.ApiKey = &v
}
// GetAppKey returns the AppKey field value if set, zero value otherwise.
func (o *LogForwarderDatadogConnectionType) GetAppKey() string {
if o == nil || IsNil(o.AppKey) {
var ret string
return ret
}
return *o.AppKey
}
// GetAppKeyOk returns a tuple with the AppKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogForwarderDatadogConnectionType) GetAppKeyOk() (*string, bool) {
if o == nil || IsNil(o.AppKey) {
return nil, false
}
return o.AppKey, true
}
// HasAppKey returns a boolean if a field has been set.
func (o *LogForwarderDatadogConnectionType) HasAppKey() bool {
if o != nil && !IsNil(o.AppKey) {
return true
}
return false
}
// SetAppKey gets a reference to the given string and assigns it to the AppKey field.
func (o *LogForwarderDatadogConnectionType) SetAppKey(v string) {
o.AppKey = &v
}
// GetFlushInterval returns the FlushInterval field value if set, zero value otherwise.
func (o *LogForwarderDatadogConnectionType) GetFlushInterval() int32 {
if o == nil || IsNil(o.FlushInterval) {
var ret int32
return ret
}
return *o.FlushInterval
}
// GetFlushIntervalOk returns a tuple with the FlushInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogForwarderDatadogConnectionType) GetFlushIntervalOk() (*int32, bool) {
if o == nil || IsNil(o.FlushInterval) {
return nil, false
}
return o.FlushInterval, true
}
// HasFlushInterval returns a boolean if a field has been set.
func (o *LogForwarderDatadogConnectionType) HasFlushInterval() bool {
if o != nil && !IsNil(o.FlushInterval) {
return true
}
return false
}
// SetFlushInterval gets a reference to the given int32 and assigns it to the FlushInterval field.
func (o *LogForwarderDatadogConnectionType) SetFlushInterval(v int32) {
o.FlushInterval = &v
}
// GetBufferSize returns the BufferSize field value if set, zero value otherwise.
func (o *LogForwarderDatadogConnectionType) GetBufferSize() int32 {
if o == nil || IsNil(o.BufferSize) {
var ret int32
return ret
}
return *o.BufferSize
}
// GetBufferSizeOk returns a tuple with the BufferSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogForwarderDatadogConnectionType) GetBufferSizeOk() (*int32, bool) {
if o == nil || IsNil(o.BufferSize) {
return nil, false
}
return o.BufferSize, true
}
// HasBufferSize returns a boolean if a field has been set.
func (o *LogForwarderDatadogConnectionType) HasBufferSize() bool {
if o != nil && !IsNil(o.BufferSize) {
return true
}
return false
}
// SetBufferSize gets a reference to the given int32 and assigns it to the BufferSize field.
func (o *LogForwarderDatadogConnectionType) SetBufferSize(v int32) {
o.BufferSize = &v
}
func (o LogForwarderDatadogConnectionType) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LogForwarderDatadogConnectionType) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.SampleRate) {
toSerialize["sample_rate"] = o.SampleRate
}
if !IsNil(o.Url) {
toSerialize["url"] = o.Url
}
if !IsNil(o.ApiKey) {
toSerialize["api_key"] = o.ApiKey
}
if !IsNil(o.AppKey) {
toSerialize["app_key"] = o.AppKey
}
if !IsNil(o.FlushInterval) {
toSerialize["flush_interval"] = o.FlushInterval
}
if !IsNil(o.BufferSize) {
toSerialize["buffer_size"] = o.BufferSize
}
return toSerialize, nil
}
type NullableLogForwarderDatadogConnectionType struct {
value *LogForwarderDatadogConnectionType
isSet bool
}
func (v NullableLogForwarderDatadogConnectionType) Get() *LogForwarderDatadogConnectionType {
return v.value
}
func (v *NullableLogForwarderDatadogConnectionType) Set(val *LogForwarderDatadogConnectionType) {
v.value = val
v.isSet = true
}
func (v NullableLogForwarderDatadogConnectionType) IsSet() bool {
return v.isSet
}
func (v *NullableLogForwarderDatadogConnectionType) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLogForwarderDatadogConnectionType(val *LogForwarderDatadogConnectionType) *NullableLogForwarderDatadogConnectionType {
return &NullableLogForwarderDatadogConnectionType{value: val, isSet: true}
}
func (v NullableLogForwarderDatadogConnectionType) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLogForwarderDatadogConnectionType) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}