From 1ff9c4586f79c65af5a6171cd0ad7c08c1390082 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 27 Jan 2025 12:40:21 +0000 Subject: [PATCH] Generate serverupdate --- .../serverupdate/model_backup_properties.go | 177 ------------------ .../model_create_update_payload.go | 38 +--- .../model_create_update_schedule_payload.go | 37 ---- .../serverupdate/model_update_schedule.go | 37 ---- .../model_update_update_schedule_payload.go | 37 ---- 5 files changed, 1 insertion(+), 325 deletions(-) delete mode 100644 services/serverupdate/model_backup_properties.go diff --git a/services/serverupdate/model_backup_properties.go b/services/serverupdate/model_backup_properties.go deleted file mode 100644 index b690bfbe5..000000000 --- a/services/serverupdate/model_backup_properties.go +++ /dev/null @@ -1,177 +0,0 @@ -/* -STACKIT Server Update Management API - -API endpoints for Server Update Operations on STACKIT Servers. - -API version: 1.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package serverupdate - -import ( - "encoding/json" -) - -// checks if the BackupProperties type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BackupProperties{} - -// BackupProperties struct for BackupProperties -type BackupProperties struct { - // Max 255 characters - // REQUIRED - Name *string `json:"name"` - // Values are set in days (1-36500) - // Can be cast to int32 without loss of precision. - // REQUIRED - RetentionPeriod *int64 `json:"retentionPeriod"` - VolumeIds *[]string `json:"volumeIds,omitempty"` -} - -type _BackupProperties BackupProperties - -// NewBackupProperties instantiates a new BackupProperties 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 NewBackupProperties(name *string, retentionPeriod *int64) *BackupProperties { - this := BackupProperties{} - this.Name = name - this.RetentionPeriod = retentionPeriod - return &this -} - -// NewBackupPropertiesWithDefaults instantiates a new BackupProperties 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 NewBackupPropertiesWithDefaults() *BackupProperties { - this := BackupProperties{} - return &this -} - -// GetName returns the Name field value -func (o *BackupProperties) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *BackupProperties) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true -} - -// SetName sets field value -func (o *BackupProperties) SetName(v *string) { - o.Name = v -} - -// GetRetentionPeriod returns the RetentionPeriod field value -func (o *BackupProperties) GetRetentionPeriod() *int64 { - if o == nil || IsNil(o.RetentionPeriod) { - var ret *int64 - return ret - } - - return o.RetentionPeriod -} - -// GetRetentionPeriodOk returns a tuple with the RetentionPeriod field value -// and a boolean to check if the value has been set. -func (o *BackupProperties) GetRetentionPeriodOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.RetentionPeriod, true -} - -// SetRetentionPeriod sets field value -func (o *BackupProperties) SetRetentionPeriod(v *int64) { - o.RetentionPeriod = v -} - -// GetVolumeIds returns the VolumeIds field value if set, zero value otherwise. -func (o *BackupProperties) GetVolumeIds() *[]string { - if o == nil || IsNil(o.VolumeIds) { - var ret *[]string - return ret - } - return o.VolumeIds -} - -// GetVolumeIdsOk returns a tuple with the VolumeIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BackupProperties) GetVolumeIdsOk() (*[]string, bool) { - if o == nil || IsNil(o.VolumeIds) { - return nil, false - } - return o.VolumeIds, true -} - -// HasVolumeIds returns a boolean if a field has been set. -func (o *BackupProperties) HasVolumeIds() bool { - if o != nil && !IsNil(o.VolumeIds) { - return true - } - - return false -} - -// SetVolumeIds gets a reference to the given []string and assigns it to the VolumeIds field. -func (o *BackupProperties) SetVolumeIds(v *[]string) { - o.VolumeIds = v -} - -func (o BackupProperties) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["retentionPeriod"] = o.RetentionPeriod - if !IsNil(o.VolumeIds) { - toSerialize["volumeIds"] = o.VolumeIds - } - return toSerialize, nil -} - -type NullableBackupProperties struct { - value *BackupProperties - isSet bool -} - -func (v NullableBackupProperties) Get() *BackupProperties { - return v.value -} - -func (v *NullableBackupProperties) Set(val *BackupProperties) { - v.value = val - v.isSet = true -} - -func (v NullableBackupProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableBackupProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBackupProperties(val *BackupProperties) *NullableBackupProperties { - return &NullableBackupProperties{value: val, isSet: true} -} - -func (v NullableBackupProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBackupProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serverupdate/model_create_update_payload.go b/services/serverupdate/model_create_update_payload.go index 9a919eec7..52e2ed62c 100644 --- a/services/serverupdate/model_create_update_payload.go +++ b/services/serverupdate/model_create_update_payload.go @@ -19,8 +19,7 @@ var _ MappedNullable = &CreateUpdatePayload{} // CreateUpdatePayload struct for CreateUpdatePayload type CreateUpdatePayload struct { - BackupBeforeUpdate *bool `json:"backupBeforeUpdate,omitempty"` - BackupProperties *BackupProperties `json:"backupProperties,omitempty"` + BackupBeforeUpdate *bool `json:"backupBeforeUpdate,omitempty"` // Can be cast to int32 without loss of precision. // REQUIRED MaintenanceWindow *int64 `json:"maintenanceWindow"` @@ -78,38 +77,6 @@ func (o *CreateUpdatePayload) SetBackupBeforeUpdate(v *bool) { o.BackupBeforeUpdate = v } -// GetBackupProperties returns the BackupProperties field value if set, zero value otherwise. -func (o *CreateUpdatePayload) GetBackupProperties() *BackupProperties { - if o == nil || IsNil(o.BackupProperties) { - var ret *BackupProperties - return ret - } - return o.BackupProperties -} - -// GetBackupPropertiesOk returns a tuple with the BackupProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateUpdatePayload) GetBackupPropertiesOk() (*BackupProperties, bool) { - if o == nil || IsNil(o.BackupProperties) { - return nil, false - } - return o.BackupProperties, true -} - -// HasBackupProperties returns a boolean if a field has been set. -func (o *CreateUpdatePayload) HasBackupProperties() bool { - if o != nil && !IsNil(o.BackupProperties) { - return true - } - - return false -} - -// SetBackupProperties gets a reference to the given BackupProperties and assigns it to the BackupProperties field. -func (o *CreateUpdatePayload) SetBackupProperties(v *BackupProperties) { - o.BackupProperties = v -} - // GetMaintenanceWindow returns the MaintenanceWindow field value func (o *CreateUpdatePayload) GetMaintenanceWindow() *int64 { if o == nil || IsNil(o.MaintenanceWindow) { @@ -139,9 +106,6 @@ func (o CreateUpdatePayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.BackupBeforeUpdate) { toSerialize["backupBeforeUpdate"] = o.BackupBeforeUpdate } - if !IsNil(o.BackupProperties) { - toSerialize["backupProperties"] = o.BackupProperties - } toSerialize["maintenanceWindow"] = o.MaintenanceWindow return toSerialize, nil } diff --git a/services/serverupdate/model_create_update_schedule_payload.go b/services/serverupdate/model_create_update_schedule_payload.go index cdea3b566..5f07ff31a 100644 --- a/services/serverupdate/model_create_update_schedule_payload.go +++ b/services/serverupdate/model_create_update_schedule_payload.go @@ -22,8 +22,6 @@ type CreateUpdateSchedulePayload struct { // REQUIRED Enabled *bool `json:"enabled"` // Can be cast to int32 without loss of precision. - Id *int64 `json:"id,omitempty"` - // Can be cast to int32 without loss of precision. // REQUIRED MaintenanceWindow *int64 `json:"maintenanceWindow"` // REQUIRED @@ -79,38 +77,6 @@ func (o *CreateUpdateSchedulePayload) SetEnabled(v *bool) { o.Enabled = v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreateUpdateSchedulePayload) GetId() *int64 { - if o == nil || IsNil(o.Id) { - var ret *int64 - 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 *CreateUpdateSchedulePayload) GetIdOk() (*int64, 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 *CreateUpdateSchedulePayload) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *CreateUpdateSchedulePayload) SetId(v *int64) { - o.Id = v -} - // GetMaintenanceWindow returns the MaintenanceWindow field value func (o *CreateUpdateSchedulePayload) GetMaintenanceWindow() *int64 { if o == nil || IsNil(o.MaintenanceWindow) { @@ -186,9 +152,6 @@ func (o *CreateUpdateSchedulePayload) SetRrule(v *string) { func (o CreateUpdateSchedulePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["enabled"] = o.Enabled - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } toSerialize["maintenanceWindow"] = o.MaintenanceWindow toSerialize["name"] = o.Name toSerialize["rrule"] = o.Rrule diff --git a/services/serverupdate/model_update_schedule.go b/services/serverupdate/model_update_schedule.go index ec9670f93..faf8b0f4c 100644 --- a/services/serverupdate/model_update_schedule.go +++ b/services/serverupdate/model_update_schedule.go @@ -22,8 +22,6 @@ type UpdateSchedule struct { // REQUIRED Enabled *bool `json:"enabled"` // Can be cast to int32 without loss of precision. - Id *int64 `json:"id,omitempty"` - // Can be cast to int32 without loss of precision. // REQUIRED MaintenanceWindow *int64 `json:"maintenanceWindow"` // REQUIRED @@ -79,38 +77,6 @@ func (o *UpdateSchedule) SetEnabled(v *bool) { o.Enabled = v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *UpdateSchedule) GetId() *int64 { - if o == nil || IsNil(o.Id) { - var ret *int64 - 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 *UpdateSchedule) GetIdOk() (*int64, 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 *UpdateSchedule) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *UpdateSchedule) SetId(v *int64) { - o.Id = v -} - // GetMaintenanceWindow returns the MaintenanceWindow field value func (o *UpdateSchedule) GetMaintenanceWindow() *int64 { if o == nil || IsNil(o.MaintenanceWindow) { @@ -186,9 +152,6 @@ func (o *UpdateSchedule) SetRrule(v *string) { func (o UpdateSchedule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["enabled"] = o.Enabled - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } toSerialize["maintenanceWindow"] = o.MaintenanceWindow toSerialize["name"] = o.Name toSerialize["rrule"] = o.Rrule diff --git a/services/serverupdate/model_update_update_schedule_payload.go b/services/serverupdate/model_update_update_schedule_payload.go index 75d67b1bd..b928d8f82 100644 --- a/services/serverupdate/model_update_update_schedule_payload.go +++ b/services/serverupdate/model_update_update_schedule_payload.go @@ -22,8 +22,6 @@ type UpdateUpdateSchedulePayload struct { // REQUIRED Enabled *bool `json:"enabled"` // Can be cast to int32 without loss of precision. - Id *int64 `json:"id,omitempty"` - // Can be cast to int32 without loss of precision. // REQUIRED MaintenanceWindow *int64 `json:"maintenanceWindow"` // REQUIRED @@ -79,38 +77,6 @@ func (o *UpdateUpdateSchedulePayload) SetEnabled(v *bool) { o.Enabled = v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *UpdateUpdateSchedulePayload) GetId() *int64 { - if o == nil || IsNil(o.Id) { - var ret *int64 - 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 *UpdateUpdateSchedulePayload) GetIdOk() (*int64, 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 *UpdateUpdateSchedulePayload) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int64 and assigns it to the Id field. -func (o *UpdateUpdateSchedulePayload) SetId(v *int64) { - o.Id = v -} - // GetMaintenanceWindow returns the MaintenanceWindow field value func (o *UpdateUpdateSchedulePayload) GetMaintenanceWindow() *int64 { if o == nil || IsNil(o.MaintenanceWindow) { @@ -186,9 +152,6 @@ func (o *UpdateUpdateSchedulePayload) SetRrule(v *string) { func (o UpdateUpdateSchedulePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["enabled"] = o.Enabled - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } toSerialize["maintenanceWindow"] = o.MaintenanceWindow toSerialize["name"] = o.Name toSerialize["rrule"] = o.Rrule