@@ -62,9 +62,9 @@ type Backup struct {
6262 // the id of cluster that backup belong to
6363 ClusterId * string `json:"clusterId,omitempty"`
6464 // the cloud provider
65- CloudProvider string `json:"cloudProvider"`
65+ CloudProvider * string `json:"cloudProvider,omitempty "`
6666 // the cloud region
67- CloudRegion string `json:"cloudRegion"`
67+ CloudRegion * string `json:"cloudRegion,omitempty "`
6868 // the environment name
6969 EnvironmentName string `json:"environmentName"`
7070 // the cluster engine
@@ -84,7 +84,7 @@ type Backup struct {
8484// This constructor will assign default values to properties that have it defined,
8585// and makes sure properties required by API are set, but the set of arguments
8686// will change when the set of required properties is changed.
87- func NewBackup (autoBackup bool , backupMethod string , backupPolicyName string , backupType BackupType , creationTimestamp time.Time , name string , orgName string , snapshotVolumes bool , sourceCluster string , status BackupStatus , totalSize string , retentionPeriod string , cloudProvider string , cloudRegion string , environmentName string , engine string ) * Backup {
87+ func NewBackup (autoBackup bool , backupMethod string , backupPolicyName string , backupType BackupType , creationTimestamp time.Time , name string , orgName string , snapshotVolumes bool , sourceCluster string , status BackupStatus , totalSize string , retentionPeriod string , environmentName string , engine string ) * Backup {
8888 this := Backup {}
8989 this .AutoBackup = autoBackup
9090 this .BackupMethod = backupMethod
@@ -98,8 +98,6 @@ func NewBackup(autoBackup bool, backupMethod string, backupPolicyName string, ba
9898 this .Status = status
9999 this .TotalSize = totalSize
100100 this .RetentionPeriod = retentionPeriod
101- this .CloudProvider = cloudProvider
102- this .CloudRegion = cloudRegion
103101 this .EnvironmentName = environmentName
104102 this .Engine = engine
105103 return & this
@@ -808,50 +806,60 @@ func (o *Backup) SetClusterId(v string) {
808806 o .ClusterId = & v
809807}
810808
811- // GetCloudProvider returns the CloudProvider field value.
809+ // GetCloudProvider returns the CloudProvider field value if set, zero value otherwise .
812810func (o * Backup ) GetCloudProvider () string {
813- if o == nil {
811+ if o == nil || o . CloudProvider == nil {
814812 var ret string
815813 return ret
816814 }
817- return o .CloudProvider
815+ return * o .CloudProvider
818816}
819817
820- // GetCloudProviderOk returns a tuple with the CloudProvider field value
818+ // GetCloudProviderOk returns a tuple with the CloudProvider field value if set, nil otherwise
821819// and a boolean to check if the value has been set.
822820func (o * Backup ) GetCloudProviderOk () (* string , bool ) {
823- if o == nil {
821+ if o == nil || o . CloudProvider == nil {
824822 return nil , false
825823 }
826- return & o .CloudProvider , true
824+ return o .CloudProvider , true
825+ }
826+
827+ // HasCloudProvider returns a boolean if a field has been set.
828+ func (o * Backup ) HasCloudProvider () bool {
829+ return o != nil && o .CloudProvider != nil
827830}
828831
829- // SetCloudProvider sets field value .
832+ // SetCloudProvider gets a reference to the given string and assigns it to the CloudProvider field .
830833func (o * Backup ) SetCloudProvider (v string ) {
831- o .CloudProvider = v
834+ o .CloudProvider = & v
832835}
833836
834- // GetCloudRegion returns the CloudRegion field value.
837+ // GetCloudRegion returns the CloudRegion field value if set, zero value otherwise .
835838func (o * Backup ) GetCloudRegion () string {
836- if o == nil {
839+ if o == nil || o . CloudRegion == nil {
837840 var ret string
838841 return ret
839842 }
840- return o .CloudRegion
843+ return * o .CloudRegion
841844}
842845
843- // GetCloudRegionOk returns a tuple with the CloudRegion field value
846+ // GetCloudRegionOk returns a tuple with the CloudRegion field value if set, nil otherwise
844847// and a boolean to check if the value has been set.
845848func (o * Backup ) GetCloudRegionOk () (* string , bool ) {
846- if o == nil {
849+ if o == nil || o . CloudRegion == nil {
847850 return nil , false
848851 }
849- return & o .CloudRegion , true
852+ return o .CloudRegion , true
850853}
851854
852- // SetCloudRegion sets field value.
855+ // HasCloudRegion returns a boolean if a field has been set.
856+ func (o * Backup ) HasCloudRegion () bool {
857+ return o != nil && o .CloudRegion != nil
858+ }
859+
860+ // SetCloudRegion gets a reference to the given string and assigns it to the CloudRegion field.
853861func (o * Backup ) SetCloudRegion (v string ) {
854- o .CloudRegion = v
862+ o .CloudRegion = & v
855863}
856864
857865// GetEnvironmentName returns the EnvironmentName field value.
@@ -1045,8 +1053,12 @@ func (o Backup) MarshalJSON() ([]byte, error) {
10451053 if o .ClusterId != nil {
10461054 toSerialize ["clusterId" ] = o .ClusterId
10471055 }
1048- toSerialize ["cloudProvider" ] = o .CloudProvider
1049- toSerialize ["cloudRegion" ] = o .CloudRegion
1056+ if o .CloudProvider != nil {
1057+ toSerialize ["cloudProvider" ] = o .CloudProvider
1058+ }
1059+ if o .CloudRegion != nil {
1060+ toSerialize ["cloudRegion" ] = o .CloudRegion
1061+ }
10501062 toSerialize ["environmentName" ] = o .EnvironmentName
10511063 toSerialize ["engine" ] = o .Engine
10521064 if o .ParentBackupName != nil {
@@ -1093,8 +1105,8 @@ func (o *Backup) UnmarshalJSON(bytes []byte) (err error) {
10931105 Expiration common.NullableTime `json:"expiration,omitempty"`
10941106 Id * string `json:"id,omitempty"`
10951107 ClusterId * string `json:"clusterId,omitempty"`
1096- CloudProvider * string `json:"cloudProvider"`
1097- CloudRegion * string `json:"cloudRegion"`
1108+ CloudProvider * string `json:"cloudProvider,omitempty "`
1109+ CloudRegion * string `json:"cloudRegion,omitempty "`
10981110 EnvironmentName * string `json:"environmentName"`
10991111 Engine * string `json:"engine"`
11001112 ParentBackupName * string `json:"parentBackupName,omitempty"`
@@ -1140,12 +1152,6 @@ func (o *Backup) UnmarshalJSON(bytes []byte) (err error) {
11401152 if all .RetentionPeriod == nil {
11411153 return fmt .Errorf ("required field retentionPeriod missing" )
11421154 }
1143- if all .CloudProvider == nil {
1144- return fmt .Errorf ("required field cloudProvider missing" )
1145- }
1146- if all .CloudRegion == nil {
1147- return fmt .Errorf ("required field cloudRegion missing" )
1148- }
11491155 if all .EnvironmentName == nil {
11501156 return fmt .Errorf ("required field environmentName missing" )
11511157 }
@@ -1193,8 +1199,8 @@ func (o *Backup) UnmarshalJSON(bytes []byte) (err error) {
11931199 o .Expiration = all .Expiration
11941200 o .Id = all .Id
11951201 o .ClusterId = all .ClusterId
1196- o .CloudProvider = * all .CloudProvider
1197- o .CloudRegion = * all .CloudRegion
1202+ o .CloudProvider = all .CloudProvider
1203+ o .CloudRegion = all .CloudRegion
11981204 o .EnvironmentName = * all .EnvironmentName
11991205 o .Engine = * all .Engine
12001206 o .ParentBackupName = all .ParentBackupName
0 commit comments