-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_cluster_serverless_backup_options.go
82 lines (70 loc) · 4.19 KB
/
model_cluster_serverless_backup_options.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// ClusterServerlessBackupOptions Group of settings that configure serverless backup.
type ClusterServerlessBackupOptions struct {
// Flag that indicates whether the serverless instance uses **Serverless Continuous Backup**. If this parameter is `false`, the serverless instance uses **Basic Backup**. | Option | Description | |---|---| | Serverless Continuous Backup | Atlas takes incremental [snapshots](https://www.mongodb.com/docs/atlas/backup/cloud-backup/overview/#std-label-serverless-snapshots) of the data in your serverless instance every six hours and lets you restore the data from a selected point in time within the last 72 hours. Atlas also takes daily snapshots and retains these daily snapshots for 35 days. To learn more, see [Serverless Instance Costs](https://www.mongodb.com/docs/atlas/billing/serverless-instance-costs/#std-label-serverless-instance-costs). | | Basic Backup | Atlas takes incremental [snapshots](https://www.mongodb.com/docs/atlas/backup/cloud-backup/overview/#std-label-serverless-snapshots) of the data in your serverless instance every six hours and retains only the two most recent snapshots. You can use this option for free. |
ServerlessContinuousBackupEnabled *bool `json:"serverlessContinuousBackupEnabled,omitempty"`
}
// NewClusterServerlessBackupOptions instantiates a new ClusterServerlessBackupOptions 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 NewClusterServerlessBackupOptions() *ClusterServerlessBackupOptions {
this := ClusterServerlessBackupOptions{}
var serverlessContinuousBackupEnabled bool = true
this.ServerlessContinuousBackupEnabled = &serverlessContinuousBackupEnabled
return &this
}
// NewClusterServerlessBackupOptionsWithDefaults instantiates a new ClusterServerlessBackupOptions 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 NewClusterServerlessBackupOptionsWithDefaults() *ClusterServerlessBackupOptions {
this := ClusterServerlessBackupOptions{}
var serverlessContinuousBackupEnabled bool = true
this.ServerlessContinuousBackupEnabled = &serverlessContinuousBackupEnabled
return &this
}
// GetServerlessContinuousBackupEnabled returns the ServerlessContinuousBackupEnabled field value if set, zero value otherwise
func (o *ClusterServerlessBackupOptions) GetServerlessContinuousBackupEnabled() bool {
if o == nil || IsNil(o.ServerlessContinuousBackupEnabled) {
var ret bool
return ret
}
return *o.ServerlessContinuousBackupEnabled
}
// GetServerlessContinuousBackupEnabledOk returns a tuple with the ServerlessContinuousBackupEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterServerlessBackupOptions) GetServerlessContinuousBackupEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.ServerlessContinuousBackupEnabled) {
return nil, false
}
return o.ServerlessContinuousBackupEnabled, true
}
// HasServerlessContinuousBackupEnabled returns a boolean if a field has been set.
func (o *ClusterServerlessBackupOptions) HasServerlessContinuousBackupEnabled() bool {
if o != nil && !IsNil(o.ServerlessContinuousBackupEnabled) {
return true
}
return false
}
// SetServerlessContinuousBackupEnabled gets a reference to the given bool and assigns it to the ServerlessContinuousBackupEnabled field.
func (o *ClusterServerlessBackupOptions) SetServerlessContinuousBackupEnabled(v bool) {
o.ServerlessContinuousBackupEnabled = &v
}
func (o ClusterServerlessBackupOptions) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ClusterServerlessBackupOptions) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ServerlessContinuousBackupEnabled) {
toSerialize["serverlessContinuousBackupEnabled"] = o.ServerlessContinuousBackupEnabled
}
return toSerialize, nil
}