-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_performance_advisor_shape.go
256 lines (214 loc) · 7.46 KB
/
model_performance_advisor_shape.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// PerformanceAdvisorShape struct for PerformanceAdvisorShape
type PerformanceAdvisorShape struct {
// Average duration in milliseconds for the queries examined that match this shape.
// Read only field.
AvgMs *int64 `json:"avgMs,omitempty"`
// Number of queries examined that match this shape.
// Read only field.
Count *int64 `json:"count,omitempty"`
// Unique 24-hexadecimal digit string that identifies this shape. This string exists only for the duration of this API request.
// Read only field.
Id *string `json:"id,omitempty"`
// Average number of documents read for every document that the query returns.
// Read only field.
InefficiencyScore *int64 `json:"inefficiencyScore,omitempty"`
// Human-readable label that identifies the namespace on the specified host. The resource expresses this parameter value as `<database>.<collection>`.
// Read only field.
Namespace *string `json:"namespace,omitempty"`
// List that contains specific about individual queries.
// Read only field.
Operations *[]PerformanceAdvisorOperation `json:"operations,omitempty"`
}
// NewPerformanceAdvisorShape instantiates a new PerformanceAdvisorShape 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 NewPerformanceAdvisorShape() *PerformanceAdvisorShape {
this := PerformanceAdvisorShape{}
return &this
}
// NewPerformanceAdvisorShapeWithDefaults instantiates a new PerformanceAdvisorShape 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 NewPerformanceAdvisorShapeWithDefaults() *PerformanceAdvisorShape {
this := PerformanceAdvisorShape{}
return &this
}
// GetAvgMs returns the AvgMs field value if set, zero value otherwise
func (o *PerformanceAdvisorShape) GetAvgMs() int64 {
if o == nil || IsNil(o.AvgMs) {
var ret int64
return ret
}
return *o.AvgMs
}
// GetAvgMsOk returns a tuple with the AvgMs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceAdvisorShape) GetAvgMsOk() (*int64, bool) {
if o == nil || IsNil(o.AvgMs) {
return nil, false
}
return o.AvgMs, true
}
// HasAvgMs returns a boolean if a field has been set.
func (o *PerformanceAdvisorShape) HasAvgMs() bool {
if o != nil && !IsNil(o.AvgMs) {
return true
}
return false
}
// SetAvgMs gets a reference to the given int64 and assigns it to the AvgMs field.
func (o *PerformanceAdvisorShape) SetAvgMs(v int64) {
o.AvgMs = &v
}
// GetCount returns the Count field value if set, zero value otherwise
func (o *PerformanceAdvisorShape) GetCount() int64 {
if o == nil || IsNil(o.Count) {
var ret int64
return ret
}
return *o.Count
}
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceAdvisorShape) GetCountOk() (*int64, bool) {
if o == nil || IsNil(o.Count) {
return nil, false
}
return o.Count, true
}
// HasCount returns a boolean if a field has been set.
func (o *PerformanceAdvisorShape) HasCount() bool {
if o != nil && !IsNil(o.Count) {
return true
}
return false
}
// SetCount gets a reference to the given int64 and assigns it to the Count field.
func (o *PerformanceAdvisorShape) SetCount(v int64) {
o.Count = &v
}
// GetId returns the Id field value if set, zero value otherwise
func (o *PerformanceAdvisorShape) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceAdvisorShape) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *PerformanceAdvisorShape) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *PerformanceAdvisorShape) SetId(v string) {
o.Id = &v
}
// GetInefficiencyScore returns the InefficiencyScore field value if set, zero value otherwise
func (o *PerformanceAdvisorShape) GetInefficiencyScore() int64 {
if o == nil || IsNil(o.InefficiencyScore) {
var ret int64
return ret
}
return *o.InefficiencyScore
}
// GetInefficiencyScoreOk returns a tuple with the InefficiencyScore field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceAdvisorShape) GetInefficiencyScoreOk() (*int64, bool) {
if o == nil || IsNil(o.InefficiencyScore) {
return nil, false
}
return o.InefficiencyScore, true
}
// HasInefficiencyScore returns a boolean if a field has been set.
func (o *PerformanceAdvisorShape) HasInefficiencyScore() bool {
if o != nil && !IsNil(o.InefficiencyScore) {
return true
}
return false
}
// SetInefficiencyScore gets a reference to the given int64 and assigns it to the InefficiencyScore field.
func (o *PerformanceAdvisorShape) SetInefficiencyScore(v int64) {
o.InefficiencyScore = &v
}
// GetNamespace returns the Namespace field value if set, zero value otherwise
func (o *PerformanceAdvisorShape) GetNamespace() string {
if o == nil || IsNil(o.Namespace) {
var ret string
return ret
}
return *o.Namespace
}
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceAdvisorShape) GetNamespaceOk() (*string, bool) {
if o == nil || IsNil(o.Namespace) {
return nil, false
}
return o.Namespace, true
}
// HasNamespace returns a boolean if a field has been set.
func (o *PerformanceAdvisorShape) HasNamespace() bool {
if o != nil && !IsNil(o.Namespace) {
return true
}
return false
}
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
func (o *PerformanceAdvisorShape) SetNamespace(v string) {
o.Namespace = &v
}
// GetOperations returns the Operations field value if set, zero value otherwise
func (o *PerformanceAdvisorShape) GetOperations() []PerformanceAdvisorOperation {
if o == nil || IsNil(o.Operations) {
var ret []PerformanceAdvisorOperation
return ret
}
return *o.Operations
}
// GetOperationsOk returns a tuple with the Operations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceAdvisorShape) GetOperationsOk() (*[]PerformanceAdvisorOperation, bool) {
if o == nil || IsNil(o.Operations) {
return nil, false
}
return o.Operations, true
}
// HasOperations returns a boolean if a field has been set.
func (o *PerformanceAdvisorShape) HasOperations() bool {
if o != nil && !IsNil(o.Operations) {
return true
}
return false
}
// SetOperations gets a reference to the given []PerformanceAdvisorOperation and assigns it to the Operations field.
func (o *PerformanceAdvisorShape) SetOperations(v []PerformanceAdvisorOperation) {
o.Operations = &v
}
func (o PerformanceAdvisorShape) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PerformanceAdvisorShape) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
return toSerialize, nil
}