-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_restore_metadata_all_of.go
175 lines (136 loc) · 4.4 KB
/
model_restore_metadata_all_of.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
/*
* In-Memory DB API
*
* API description for the IONOS In-Memory DB
*
* API version: 1.0.0
* Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package ionoscloud
import (
"encoding/json"
"time"
)
// RestoreMetadataAllOf struct for RestoreMetadataAllOf
type RestoreMetadataAllOf struct {
// The time the snapshot was dumped from the replica set.
RestoreTime *IonosTime `json:"restoreTime,omitempty"`
// The ID of the snapshot that was restored.
RestoredSnapshotId *string `json:"restoredSnapshotId,omitempty"`
}
// NewRestoreMetadataAllOf instantiates a new RestoreMetadataAllOf 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 NewRestoreMetadataAllOf() *RestoreMetadataAllOf {
this := RestoreMetadataAllOf{}
return &this
}
// NewRestoreMetadataAllOfWithDefaults instantiates a new RestoreMetadataAllOf 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 NewRestoreMetadataAllOfWithDefaults() *RestoreMetadataAllOf {
this := RestoreMetadataAllOf{}
return &this
}
// GetRestoreTime returns the RestoreTime field value
// If the value is explicit nil, the zero value for time.Time will be returned
func (o *RestoreMetadataAllOf) GetRestoreTime() *time.Time {
if o == nil {
return nil
}
if o.RestoreTime == nil {
return nil
}
return &o.RestoreTime.Time
}
// GetRestoreTimeOk returns a tuple with the RestoreTime field value
// 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 *RestoreMetadataAllOf) GetRestoreTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
if o.RestoreTime == nil {
return nil, false
}
return &o.RestoreTime.Time, true
}
// SetRestoreTime sets field value
func (o *RestoreMetadataAllOf) SetRestoreTime(v time.Time) {
o.RestoreTime = &IonosTime{v}
}
// HasRestoreTime returns a boolean if a field has been set.
func (o *RestoreMetadataAllOf) HasRestoreTime() bool {
if o != nil && o.RestoreTime != nil {
return true
}
return false
}
// GetRestoredSnapshotId returns the RestoredSnapshotId field value
// If the value is explicit nil, the zero value for string will be returned
func (o *RestoreMetadataAllOf) GetRestoredSnapshotId() *string {
if o == nil {
return nil
}
return o.RestoredSnapshotId
}
// GetRestoredSnapshotIdOk returns a tuple with the RestoredSnapshotId field value
// 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 *RestoreMetadataAllOf) GetRestoredSnapshotIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RestoredSnapshotId, true
}
// SetRestoredSnapshotId sets field value
func (o *RestoreMetadataAllOf) SetRestoredSnapshotId(v string) {
o.RestoredSnapshotId = &v
}
// HasRestoredSnapshotId returns a boolean if a field has been set.
func (o *RestoreMetadataAllOf) HasRestoredSnapshotId() bool {
if o != nil && o.RestoredSnapshotId != nil {
return true
}
return false
}
func (o RestoreMetadataAllOf) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.RestoreTime != nil {
toSerialize["restoreTime"] = o.RestoreTime
}
if o.RestoredSnapshotId != nil {
toSerialize["restoredSnapshotId"] = o.RestoredSnapshotId
}
return json.Marshal(toSerialize)
}
type NullableRestoreMetadataAllOf struct {
value *RestoreMetadataAllOf
isSet bool
}
func (v NullableRestoreMetadataAllOf) Get() *RestoreMetadataAllOf {
return v.value
}
func (v *NullableRestoreMetadataAllOf) Set(val *RestoreMetadataAllOf) {
v.value = val
v.isSet = true
}
func (v NullableRestoreMetadataAllOf) IsSet() bool {
return v.isSet
}
func (v *NullableRestoreMetadataAllOf) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRestoreMetadataAllOf(val *RestoreMetadataAllOf) *NullableRestoreMetadataAllOf {
return &NullableRestoreMetadataAllOf{value: val, isSet: true}
}
func (v NullableRestoreMetadataAllOf) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRestoreMetadataAllOf) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}