/
model_api_checkpoint_part.go
221 lines (185 loc) · 6.53 KB
/
model_api_checkpoint_part.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// ApiCheckpointPart Metadata contained in one document that describes the complete snapshot taken for this node.
type ApiCheckpointPart struct {
// Human-readable label that identifies the replica set to which this checkpoint applies.
// Read only field.
ReplicaSetName *string `json:"replicaSetName,omitempty"`
// Human-readable label that identifies the shard to which this checkpoint applies.
// Read only field.
ShardName *string `json:"shardName,omitempty"`
// Flag that indicates whether the token exists.
// Read only field.
TokenDiscovered *bool `json:"tokenDiscovered,omitempty"`
TokenTimestamp *ApiBSONTimestamp `json:"tokenTimestamp,omitempty"`
// Human-readable label that identifies the type of host that the part represents.
// Read only field.
TypeName *string `json:"typeName,omitempty"`
}
// NewApiCheckpointPart instantiates a new ApiCheckpointPart 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 NewApiCheckpointPart() *ApiCheckpointPart {
this := ApiCheckpointPart{}
return &this
}
// NewApiCheckpointPartWithDefaults instantiates a new ApiCheckpointPart 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 NewApiCheckpointPartWithDefaults() *ApiCheckpointPart {
this := ApiCheckpointPart{}
return &this
}
// GetReplicaSetName returns the ReplicaSetName field value if set, zero value otherwise
func (o *ApiCheckpointPart) GetReplicaSetName() string {
if o == nil || IsNil(o.ReplicaSetName) {
var ret string
return ret
}
return *o.ReplicaSetName
}
// GetReplicaSetNameOk returns a tuple with the ReplicaSetName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiCheckpointPart) GetReplicaSetNameOk() (*string, bool) {
if o == nil || IsNil(o.ReplicaSetName) {
return nil, false
}
return o.ReplicaSetName, true
}
// HasReplicaSetName returns a boolean if a field has been set.
func (o *ApiCheckpointPart) HasReplicaSetName() bool {
if o != nil && !IsNil(o.ReplicaSetName) {
return true
}
return false
}
// SetReplicaSetName gets a reference to the given string and assigns it to the ReplicaSetName field.
func (o *ApiCheckpointPart) SetReplicaSetName(v string) {
o.ReplicaSetName = &v
}
// GetShardName returns the ShardName field value if set, zero value otherwise
func (o *ApiCheckpointPart) GetShardName() string {
if o == nil || IsNil(o.ShardName) {
var ret string
return ret
}
return *o.ShardName
}
// GetShardNameOk returns a tuple with the ShardName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiCheckpointPart) GetShardNameOk() (*string, bool) {
if o == nil || IsNil(o.ShardName) {
return nil, false
}
return o.ShardName, true
}
// HasShardName returns a boolean if a field has been set.
func (o *ApiCheckpointPart) HasShardName() bool {
if o != nil && !IsNil(o.ShardName) {
return true
}
return false
}
// SetShardName gets a reference to the given string and assigns it to the ShardName field.
func (o *ApiCheckpointPart) SetShardName(v string) {
o.ShardName = &v
}
// GetTokenDiscovered returns the TokenDiscovered field value if set, zero value otherwise
func (o *ApiCheckpointPart) GetTokenDiscovered() bool {
if o == nil || IsNil(o.TokenDiscovered) {
var ret bool
return ret
}
return *o.TokenDiscovered
}
// GetTokenDiscoveredOk returns a tuple with the TokenDiscovered field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiCheckpointPart) GetTokenDiscoveredOk() (*bool, bool) {
if o == nil || IsNil(o.TokenDiscovered) {
return nil, false
}
return o.TokenDiscovered, true
}
// HasTokenDiscovered returns a boolean if a field has been set.
func (o *ApiCheckpointPart) HasTokenDiscovered() bool {
if o != nil && !IsNil(o.TokenDiscovered) {
return true
}
return false
}
// SetTokenDiscovered gets a reference to the given bool and assigns it to the TokenDiscovered field.
func (o *ApiCheckpointPart) SetTokenDiscovered(v bool) {
o.TokenDiscovered = &v
}
// GetTokenTimestamp returns the TokenTimestamp field value if set, zero value otherwise
func (o *ApiCheckpointPart) GetTokenTimestamp() ApiBSONTimestamp {
if o == nil || IsNil(o.TokenTimestamp) {
var ret ApiBSONTimestamp
return ret
}
return *o.TokenTimestamp
}
// GetTokenTimestampOk returns a tuple with the TokenTimestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiCheckpointPart) GetTokenTimestampOk() (*ApiBSONTimestamp, bool) {
if o == nil || IsNil(o.TokenTimestamp) {
return nil, false
}
return o.TokenTimestamp, true
}
// HasTokenTimestamp returns a boolean if a field has been set.
func (o *ApiCheckpointPart) HasTokenTimestamp() bool {
if o != nil && !IsNil(o.TokenTimestamp) {
return true
}
return false
}
// SetTokenTimestamp gets a reference to the given ApiBSONTimestamp and assigns it to the TokenTimestamp field.
func (o *ApiCheckpointPart) SetTokenTimestamp(v ApiBSONTimestamp) {
o.TokenTimestamp = &v
}
// GetTypeName returns the TypeName field value if set, zero value otherwise
func (o *ApiCheckpointPart) GetTypeName() string {
if o == nil || IsNil(o.TypeName) {
var ret string
return ret
}
return *o.TypeName
}
// GetTypeNameOk returns a tuple with the TypeName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApiCheckpointPart) GetTypeNameOk() (*string, bool) {
if o == nil || IsNil(o.TypeName) {
return nil, false
}
return o.TypeName, true
}
// HasTypeName returns a boolean if a field has been set.
func (o *ApiCheckpointPart) HasTypeName() bool {
if o != nil && !IsNil(o.TypeName) {
return true
}
return false
}
// SetTypeName gets a reference to the given string and assigns it to the TypeName field.
func (o *ApiCheckpointPart) SetTypeName(v string) {
o.TypeName = &v
}
func (o ApiCheckpointPart) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ApiCheckpointPart) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.TokenTimestamp) {
toSerialize["tokenTimestamp"] = o.TokenTimestamp
}
return toSerialize, nil
}