diff --git a/services/sqlserverflex/CHANGELOG.md b/services/sqlserverflex/CHANGELOG.md index 4992040de..82dbfea65 100644 --- a/services/sqlserverflex/CHANGELOG.md +++ b/services/sqlserverflex/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.8.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.7.0 (2024-09-25) - **Breaking change**: Field `Item` in `ResetUserResponse` is now of type `SingleUser` (previously was `User`) diff --git a/services/sqlserverflex/model_acl.go b/services/sqlserverflex/model_acl.go index 830d62faa..31083b826 100644 --- a/services/sqlserverflex/model_acl.go +++ b/services/sqlserverflex/model_acl.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ACL{} + // ACL struct for ACL type ACL struct { Items *[]string `json:"items,omitempty"` } + +// NewACL instantiates a new ACL 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 NewACL() *ACL { + this := ACL{} + return &this +} + +// NewACLWithDefaults instantiates a new ACL 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 NewACLWithDefaults() *ACL { + this := ACL{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ACL) GetItems() *[]string { + if o == nil || IsNil(o.Items) { + var ret *[]string + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ACL) GetItemsOk() (*[]string, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ACL) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []string and assigns it to the Items field. +func (o *ACL) SetItems(v *[]string) { + o.Items = v +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableACL struct { + value *ACL + isSet bool +} + +func (v NullableACL) Get() *ACL { + return v.value +} + +func (v *NullableACL) Set(val *ACL) { + v.value = val + v.isSet = true +} + +func (v NullableACL) IsSet() bool { + return v.isSet +} + +func (v *NullableACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableACL(val *ACL) *NullableACL { + return &NullableACL{value: val, isSet: true} +} + +func (v NullableACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_backup.go b/services/sqlserverflex/model_backup.go index 5ca9f86f6..3696f0db4 100644 --- a/services/sqlserverflex/model_backup.go +++ b/services/sqlserverflex/model_backup.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the Backup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Backup{} + // Backup struct for Backup type Backup struct { EndTime *string `json:"endTime,omitempty"` @@ -21,3 +28,341 @@ type Backup struct { Size *int64 `json:"size,omitempty"` StartTime *string `json:"startTime,omitempty"` } + +// NewBackup instantiates a new Backup 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 NewBackup() *Backup { + this := Backup{} + return &this +} + +// NewBackupWithDefaults instantiates a new Backup 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 NewBackupWithDefaults() *Backup { + this := Backup{} + return &this +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *Backup) GetEndTime() *string { + if o == nil || IsNil(o.EndTime) { + var ret *string + return ret + } + return o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetEndTimeOk() (*string, bool) { + if o == nil || IsNil(o.EndTime) { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *Backup) HasEndTime() bool { + if o != nil && !IsNil(o.EndTime) { + return true + } + + return false +} + +// SetEndTime gets a reference to the given string and assigns it to the EndTime field. +func (o *Backup) SetEndTime(v *string) { + o.EndTime = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Backup) GetError() *string { + if o == nil || IsNil(o.Error) { + var ret *string + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Backup) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Backup) SetError(v *string) { + o.Error = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Backup) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *Backup) GetIdOk() (*string, 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 *Backup) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Backup) SetId(v *string) { + o.Id = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Backup) GetLabels() *[]string { + if o == nil || IsNil(o.Labels) { + var ret *[]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetLabelsOk() (*[]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Backup) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *Backup) SetLabels(v *[]string) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Backup) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Backup) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Backup) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Backup) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Backup) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Backup) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Backup) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Backup) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Backup) SetSize(v *int64) { + o.Size = v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *Backup) GetStartTime() *string { + if o == nil || IsNil(o.StartTime) { + var ret *string + return ret + } + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetStartTimeOk() (*string, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *Backup) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +func (o *Backup) SetStartTime(v *string) { + o.StartTime = v +} + +func (o Backup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EndTime) { + toSerialize["endTime"] = o.EndTime + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.StartTime) { + toSerialize["startTime"] = o.StartTime + } + return toSerialize, nil +} + +type NullableBackup struct { + value *Backup + isSet bool +} + +func (v NullableBackup) Get() *Backup { + return v.value +} + +func (v *NullableBackup) Set(val *Backup) { + v.value = val + v.isSet = true +} + +func (v NullableBackup) IsSet() bool { + return v.isSet +} + +func (v *NullableBackup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackup(val *Backup) *NullableBackup { + return &NullableBackup{value: val, isSet: true} +} + +func (v NullableBackup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_backup_list_backups_response_grouped.go b/services/sqlserverflex/model_backup_list_backups_response_grouped.go index f7314073f..cfffef328 100644 --- a/services/sqlserverflex/model_backup_list_backups_response_grouped.go +++ b/services/sqlserverflex/model_backup_list_backups_response_grouped.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the BackupListBackupsResponseGrouped type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BackupListBackupsResponseGrouped{} + // BackupListBackupsResponseGrouped struct for BackupListBackupsResponseGrouped type BackupListBackupsResponseGrouped struct { Backups *[]Backup `json:"backups,omitempty"` Name *string `json:"name,omitempty"` } + +// NewBackupListBackupsResponseGrouped instantiates a new BackupListBackupsResponseGrouped 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 NewBackupListBackupsResponseGrouped() *BackupListBackupsResponseGrouped { + this := BackupListBackupsResponseGrouped{} + return &this +} + +// NewBackupListBackupsResponseGroupedWithDefaults instantiates a new BackupListBackupsResponseGrouped 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 NewBackupListBackupsResponseGroupedWithDefaults() *BackupListBackupsResponseGrouped { + this := BackupListBackupsResponseGrouped{} + return &this +} + +// GetBackups returns the Backups field value if set, zero value otherwise. +func (o *BackupListBackupsResponseGrouped) GetBackups() *[]Backup { + if o == nil || IsNil(o.Backups) { + var ret *[]Backup + return ret + } + return o.Backups +} + +// GetBackupsOk returns a tuple with the Backups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupListBackupsResponseGrouped) GetBackupsOk() (*[]Backup, bool) { + if o == nil || IsNil(o.Backups) { + return nil, false + } + return o.Backups, true +} + +// HasBackups returns a boolean if a field has been set. +func (o *BackupListBackupsResponseGrouped) HasBackups() bool { + if o != nil && !IsNil(o.Backups) { + return true + } + + return false +} + +// SetBackups gets a reference to the given []Backup and assigns it to the Backups field. +func (o *BackupListBackupsResponseGrouped) SetBackups(v *[]Backup) { + o.Backups = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *BackupListBackupsResponseGrouped) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupListBackupsResponseGrouped) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *BackupListBackupsResponseGrouped) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *BackupListBackupsResponseGrouped) SetName(v *string) { + o.Name = v +} + +func (o BackupListBackupsResponseGrouped) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Backups) { + toSerialize["backups"] = o.Backups + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableBackupListBackupsResponseGrouped struct { + value *BackupListBackupsResponseGrouped + isSet bool +} + +func (v NullableBackupListBackupsResponseGrouped) Get() *BackupListBackupsResponseGrouped { + return v.value +} + +func (v *NullableBackupListBackupsResponseGrouped) Set(val *BackupListBackupsResponseGrouped) { + v.value = val + v.isSet = true +} + +func (v NullableBackupListBackupsResponseGrouped) IsSet() bool { + return v.isSet +} + +func (v *NullableBackupListBackupsResponseGrouped) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackupListBackupsResponseGrouped(val *BackupListBackupsResponseGrouped) *NullableBackupListBackupsResponseGrouped { + return &NullableBackupListBackupsResponseGrouped{value: val, isSet: true} +} + +func (v NullableBackupListBackupsResponseGrouped) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackupListBackupsResponseGrouped) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_database_payload.go b/services/sqlserverflex/model_create_database_payload.go index a7fc1d67c..6c3ba8df1 100644 --- a/services/sqlserverflex/model_create_database_payload.go +++ b/services/sqlserverflex/model_create_database_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateDatabasePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDatabasePayload{} + // CreateDatabasePayload struct for CreateDatabasePayload type CreateDatabasePayload struct { // REQUIRED @@ -17,3 +24,115 @@ type CreateDatabasePayload struct { // REQUIRED Options *DatabaseDocumentationCreateDatabaseRequestOptions `json:"options"` } + +type _CreateDatabasePayload CreateDatabasePayload + +// NewCreateDatabasePayload instantiates a new CreateDatabasePayload 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 NewCreateDatabasePayload(name *string, options *DatabaseDocumentationCreateDatabaseRequestOptions) *CreateDatabasePayload { + this := CreateDatabasePayload{} + this.Name = name + this.Options = options + return &this +} + +// NewCreateDatabasePayloadWithDefaults instantiates a new CreateDatabasePayload 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 NewCreateDatabasePayloadWithDefaults() *CreateDatabasePayload { + this := CreateDatabasePayload{} + return &this +} + +// GetName returns the Name field value +func (o *CreateDatabasePayload) GetName() *string { + if o == nil { + 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 *CreateDatabasePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateDatabasePayload) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value +func (o *CreateDatabasePayload) GetOptions() *DatabaseDocumentationCreateDatabaseRequestOptions { + if o == nil { + var ret *DatabaseDocumentationCreateDatabaseRequestOptions + return ret + } + + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *CreateDatabasePayload) GetOptionsOk() (*DatabaseDocumentationCreateDatabaseRequestOptions, bool) { + if o == nil { + return nil, false + } + return o.Options, true +} + +// SetOptions sets field value +func (o *CreateDatabasePayload) SetOptions(v *DatabaseDocumentationCreateDatabaseRequestOptions) { + o.Options = v +} + +func (o CreateDatabasePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + return toSerialize, nil +} + +type NullableCreateDatabasePayload struct { + value *CreateDatabasePayload + isSet bool +} + +func (v NullableCreateDatabasePayload) Get() *CreateDatabasePayload { + return v.value +} + +func (v *NullableCreateDatabasePayload) Set(val *CreateDatabasePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDatabasePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDatabasePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDatabasePayload(val *CreateDatabasePayload) *NullableCreateDatabasePayload { + return &NullableCreateDatabasePayload{value: val, isSet: true} +} + +func (v NullableCreateDatabasePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDatabasePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_database_response.go b/services/sqlserverflex/model_create_database_response.go index f92c24a91..72740e725 100644 --- a/services/sqlserverflex/model_create_database_response.go +++ b/services/sqlserverflex/model_create_database_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateDatabaseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDatabaseResponse{} + // CreateDatabaseResponse struct for CreateDatabaseResponse type CreateDatabaseResponse struct { Id *string `json:"id,omitempty"` } + +// NewCreateDatabaseResponse instantiates a new CreateDatabaseResponse 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 NewCreateDatabaseResponse() *CreateDatabaseResponse { + this := CreateDatabaseResponse{} + return &this +} + +// NewCreateDatabaseResponseWithDefaults instantiates a new CreateDatabaseResponse 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 NewCreateDatabaseResponseWithDefaults() *CreateDatabaseResponse { + this := CreateDatabaseResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateDatabaseResponse) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *CreateDatabaseResponse) GetIdOk() (*string, 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 *CreateDatabaseResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateDatabaseResponse) SetId(v *string) { + o.Id = v +} + +func (o CreateDatabaseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableCreateDatabaseResponse struct { + value *CreateDatabaseResponse + isSet bool +} + +func (v NullableCreateDatabaseResponse) Get() *CreateDatabaseResponse { + return v.value +} + +func (v *NullableCreateDatabaseResponse) Set(val *CreateDatabaseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDatabaseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDatabaseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDatabaseResponse(val *CreateDatabaseResponse) *NullableCreateDatabaseResponse { + return &NullableCreateDatabaseResponse{value: val, isSet: true} +} + +func (v NullableCreateDatabaseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDatabaseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_instance_payload.go b/services/sqlserverflex/model_create_instance_payload.go index dd1709cde..db9502da4 100644 --- a/services/sqlserverflex/model_create_instance_payload.go +++ b/services/sqlserverflex/model_create_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + // CreateInstancePayload struct for CreateInstancePayload type CreateInstancePayload struct { Acl *CreateInstancePayloadAcl `json:"acl,omitempty"` @@ -27,3 +34,329 @@ type CreateInstancePayload struct { // Version of the MSSQL Server Version *string `json:"version,omitempty"` } + +type _CreateInstancePayload CreateInstancePayload + +// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(flavorId *string, name *string) *CreateInstancePayload { + this := CreateInstancePayload{} + this.FlavorId = flavorId + this.Name = name + var version string = "2022" + this.Version = &version + return &this +} + +// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { + this := CreateInstancePayload{} + var version string = "2022" + this.Version = &version + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetAcl() *CreateInstancePayloadAcl { + if o == nil || IsNil(o.Acl) { + var ret *CreateInstancePayloadAcl + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetAclOk() (*CreateInstancePayloadAcl, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given CreateInstancePayloadAcl and assigns it to the Acl field. +func (o *CreateInstancePayload) SetAcl(v *CreateInstancePayloadAcl) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetBackupSchedule() *string { + if o == nil || IsNil(o.BackupSchedule) { + var ret *string + return ret + } + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *CreateInstancePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *CreateInstancePayload) GetFlavorId() *string { + if o == nil { + var ret *string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *CreateInstancePayload) SetFlavorId(v *string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *CreateInstancePayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *CreateInstancePayload) GetName() *string { + if o == nil { + 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 *CreateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetOptions() *CreateInstancePayloadOptions { + if o == nil || IsNil(o.Options) { + var ret *CreateInstancePayloadOptions + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetOptionsOk() (*CreateInstancePayloadOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given CreateInstancePayloadOptions and assigns it to the Options field. +func (o *CreateInstancePayload) SetOptions(v *CreateInstancePayloadOptions) { + o.Options = v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetStorage() *CreateInstancePayloadStorage { + if o == nil || IsNil(o.Storage) { + var ret *CreateInstancePayloadStorage + return ret + } + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetStorageOk() (*CreateInstancePayloadStorage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given CreateInstancePayloadStorage and assigns it to the Storage field. +func (o *CreateInstancePayload) SetStorage(v *CreateInstancePayloadStorage) { + o.Storage = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CreateInstancePayload) SetVersion(v *string) { + o.Version = v +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableCreateInstancePayload struct { + value *CreateInstancePayload + isSet bool +} + +func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { + return v.value +} + +func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { + return &NullableCreateInstancePayload{value: val, isSet: true} +} + +func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_instance_payload_acl.go b/services/sqlserverflex/model_create_instance_payload_acl.go index 3e03d1833..312816fdf 100644 --- a/services/sqlserverflex/model_create_instance_payload_acl.go +++ b/services/sqlserverflex/model_create_instance_payload_acl.go @@ -10,8 +10,108 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateInstancePayloadAcl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayloadAcl{} + // CreateInstancePayloadAcl ACL is the Access Control List defining the IP ranges allowed to connect to the database type CreateInstancePayloadAcl struct { // a simple list with IP addresses with CIDR. Items *[]string `json:"items,omitempty"` } + +// NewCreateInstancePayloadAcl instantiates a new CreateInstancePayloadAcl 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 NewCreateInstancePayloadAcl() *CreateInstancePayloadAcl { + this := CreateInstancePayloadAcl{} + return &this +} + +// NewCreateInstancePayloadAclWithDefaults instantiates a new CreateInstancePayloadAcl 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 NewCreateInstancePayloadAclWithDefaults() *CreateInstancePayloadAcl { + this := CreateInstancePayloadAcl{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *CreateInstancePayloadAcl) GetItems() *[]string { + if o == nil || IsNil(o.Items) { + var ret *[]string + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayloadAcl) GetItemsOk() (*[]string, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *CreateInstancePayloadAcl) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []string and assigns it to the Items field. +func (o *CreateInstancePayloadAcl) SetItems(v *[]string) { + o.Items = v +} + +func (o CreateInstancePayloadAcl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableCreateInstancePayloadAcl struct { + value *CreateInstancePayloadAcl + isSet bool +} + +func (v NullableCreateInstancePayloadAcl) Get() *CreateInstancePayloadAcl { + return v.value +} + +func (v *NullableCreateInstancePayloadAcl) Set(val *CreateInstancePayloadAcl) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayloadAcl) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayloadAcl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayloadAcl(val *CreateInstancePayloadAcl) *NullableCreateInstancePayloadAcl { + return &NullableCreateInstancePayloadAcl{value: val, isSet: true} +} + +func (v NullableCreateInstancePayloadAcl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayloadAcl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_instance_payload_options.go b/services/sqlserverflex/model_create_instance_payload_options.go index 4b6584d52..5f1235e15 100644 --- a/services/sqlserverflex/model_create_instance_payload_options.go +++ b/services/sqlserverflex/model_create_instance_payload_options.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateInstancePayloadOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayloadOptions{} + // CreateInstancePayloadOptions Database instance specific options are requested via this field type CreateInstancePayloadOptions struct { // Edition of the MSSQL server instance @@ -17,3 +24,139 @@ type CreateInstancePayloadOptions struct { // The days for how long the backup files should be stored before cleaned up. 30 to 365 RetentionDays *string `json:"retentionDays,omitempty"` } + +// NewCreateInstancePayloadOptions instantiates a new CreateInstancePayloadOptions 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 NewCreateInstancePayloadOptions() *CreateInstancePayloadOptions { + this := CreateInstancePayloadOptions{} + var edition string = "developer" + this.Edition = &edition + var retentionDays string = "32" + this.RetentionDays = &retentionDays + return &this +} + +// NewCreateInstancePayloadOptionsWithDefaults instantiates a new CreateInstancePayloadOptions 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 NewCreateInstancePayloadOptionsWithDefaults() *CreateInstancePayloadOptions { + this := CreateInstancePayloadOptions{} + var edition string = "developer" + this.Edition = &edition + var retentionDays string = "32" + this.RetentionDays = &retentionDays + return &this +} + +// GetEdition returns the Edition field value if set, zero value otherwise. +func (o *CreateInstancePayloadOptions) GetEdition() *string { + if o == nil || IsNil(o.Edition) { + var ret *string + return ret + } + return o.Edition +} + +// GetEditionOk returns a tuple with the Edition field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayloadOptions) GetEditionOk() (*string, bool) { + if o == nil || IsNil(o.Edition) { + return nil, false + } + return o.Edition, true +} + +// HasEdition returns a boolean if a field has been set. +func (o *CreateInstancePayloadOptions) HasEdition() bool { + if o != nil && !IsNil(o.Edition) { + return true + } + + return false +} + +// SetEdition gets a reference to the given string and assigns it to the Edition field. +func (o *CreateInstancePayloadOptions) SetEdition(v *string) { + o.Edition = v +} + +// GetRetentionDays returns the RetentionDays field value if set, zero value otherwise. +func (o *CreateInstancePayloadOptions) GetRetentionDays() *string { + if o == nil || IsNil(o.RetentionDays) { + var ret *string + return ret + } + return o.RetentionDays +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayloadOptions) GetRetentionDaysOk() (*string, bool) { + if o == nil || IsNil(o.RetentionDays) { + return nil, false + } + return o.RetentionDays, true +} + +// HasRetentionDays returns a boolean if a field has been set. +func (o *CreateInstancePayloadOptions) HasRetentionDays() bool { + if o != nil && !IsNil(o.RetentionDays) { + return true + } + + return false +} + +// SetRetentionDays gets a reference to the given string and assigns it to the RetentionDays field. +func (o *CreateInstancePayloadOptions) SetRetentionDays(v *string) { + o.RetentionDays = v +} + +func (o CreateInstancePayloadOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Edition) { + toSerialize["edition"] = o.Edition + } + if !IsNil(o.RetentionDays) { + toSerialize["retentionDays"] = o.RetentionDays + } + return toSerialize, nil +} + +type NullableCreateInstancePayloadOptions struct { + value *CreateInstancePayloadOptions + isSet bool +} + +func (v NullableCreateInstancePayloadOptions) Get() *CreateInstancePayloadOptions { + return v.value +} + +func (v *NullableCreateInstancePayloadOptions) Set(val *CreateInstancePayloadOptions) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayloadOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayloadOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayloadOptions(val *CreateInstancePayloadOptions) *NullableCreateInstancePayloadOptions { + return &NullableCreateInstancePayloadOptions{value: val, isSet: true} +} + +func (v NullableCreateInstancePayloadOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayloadOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_instance_payload_storage.go b/services/sqlserverflex/model_create_instance_payload_storage.go index 77e29eed0..113065809 100644 --- a/services/sqlserverflex/model_create_instance_payload_storage.go +++ b/services/sqlserverflex/model_create_instance_payload_storage.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateInstancePayloadStorage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayloadStorage{} + // CreateInstancePayloadStorage Storage for the instance type CreateInstancePayloadStorage struct { // Class of the instance. @@ -17,3 +24,135 @@ type CreateInstancePayloadStorage struct { // Size of the instance storage in GB Size *int64 `json:"size,omitempty"` } + +// NewCreateInstancePayloadStorage instantiates a new CreateInstancePayloadStorage 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 NewCreateInstancePayloadStorage() *CreateInstancePayloadStorage { + this := CreateInstancePayloadStorage{} + var class string = "premium-perf12-stackit" + this.Class = &class + return &this +} + +// NewCreateInstancePayloadStorageWithDefaults instantiates a new CreateInstancePayloadStorage 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 NewCreateInstancePayloadStorageWithDefaults() *CreateInstancePayloadStorage { + this := CreateInstancePayloadStorage{} + var class string = "premium-perf12-stackit" + this.Class = &class + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *CreateInstancePayloadStorage) GetClass() *string { + if o == nil || IsNil(o.Class) { + var ret *string + return ret + } + return o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayloadStorage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *CreateInstancePayloadStorage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *CreateInstancePayloadStorage) SetClass(v *string) { + o.Class = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *CreateInstancePayloadStorage) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayloadStorage) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *CreateInstancePayloadStorage) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *CreateInstancePayloadStorage) SetSize(v *int64) { + o.Size = v +} + +func (o CreateInstancePayloadStorage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableCreateInstancePayloadStorage struct { + value *CreateInstancePayloadStorage + isSet bool +} + +func (v NullableCreateInstancePayloadStorage) Get() *CreateInstancePayloadStorage { + return v.value +} + +func (v *NullableCreateInstancePayloadStorage) Set(val *CreateInstancePayloadStorage) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayloadStorage) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayloadStorage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayloadStorage(val *CreateInstancePayloadStorage) *NullableCreateInstancePayloadStorage { + return &NullableCreateInstancePayloadStorage{value: val, isSet: true} +} + +func (v NullableCreateInstancePayloadStorage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayloadStorage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_instance_response.go b/services/sqlserverflex/model_create_instance_response.go index cf9cff791..dcc0877be 100644 --- a/services/sqlserverflex/model_create_instance_response.go +++ b/services/sqlserverflex/model_create_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstanceResponse{} + // CreateInstanceResponse struct for CreateInstanceResponse type CreateInstanceResponse struct { Id *string `json:"id,omitempty"` } + +// NewCreateInstanceResponse instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponse() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateInstanceResponse) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *CreateInstanceResponse) GetIdOk() (*string, 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 *CreateInstanceResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateInstanceResponse) SetId(v *string) { + o.Id = v +} + +func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableCreateInstanceResponse struct { + value *CreateInstanceResponse + isSet bool +} + +func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { + return v.value +} + +func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { + return &NullableCreateInstanceResponse{value: val, isSet: true} +} + +func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_user_payload.go b/services/sqlserverflex/model_create_user_payload.go index 9559b3323..3b35e00f7 100644 --- a/services/sqlserverflex/model_create_user_payload.go +++ b/services/sqlserverflex/model_create_user_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserPayload{} + // CreateUserPayload struct for CreateUserPayload type CreateUserPayload struct { DefaultDatabase *string `json:"default_database,omitempty"` @@ -18,3 +25,150 @@ type CreateUserPayload struct { // REQUIRED Username *string `json:"username"` } + +type _CreateUserPayload CreateUserPayload + +// NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload(roles *[]string, username *string) *CreateUserPayload { + this := CreateUserPayload{} + this.Roles = roles + this.Username = username + return &this +} + +// NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { + this := CreateUserPayload{} + return &this +} + +// GetDefaultDatabase returns the DefaultDatabase field value if set, zero value otherwise. +func (o *CreateUserPayload) GetDefaultDatabase() *string { + if o == nil || IsNil(o.DefaultDatabase) { + var ret *string + return ret + } + return o.DefaultDatabase +} + +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetDefaultDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.DefaultDatabase) { + return nil, false + } + return o.DefaultDatabase, true +} + +// HasDefaultDatabase returns a boolean if a field has been set. +func (o *CreateUserPayload) HasDefaultDatabase() bool { + if o != nil && !IsNil(o.DefaultDatabase) { + return true + } + + return false +} + +// SetDefaultDatabase gets a reference to the given string and assigns it to the DefaultDatabase field. +func (o *CreateUserPayload) SetDefaultDatabase(v *string) { + o.DefaultDatabase = v +} + +// GetRoles returns the Roles field value +func (o *CreateUserPayload) GetRoles() *[]string { + if o == nil { + var ret *[]string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetRolesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *CreateUserPayload) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUsername returns the Username field value +func (o *CreateUserPayload) GetUsername() *string { + if o == nil { + var ret *string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Username, true +} + +// SetUsername sets field value +func (o *CreateUserPayload) SetUsername(v *string) { + o.Username = v +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultDatabase) { + toSerialize["default_database"] = o.DefaultDatabase + } + toSerialize["roles"] = o.Roles + toSerialize["username"] = o.Username + return toSerialize, nil +} + +type NullableCreateUserPayload struct { + value *CreateUserPayload + isSet bool +} + +func (v NullableCreateUserPayload) Get() *CreateUserPayload { + return v.value +} + +func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { + return &NullableCreateUserPayload{value: val, isSet: true} +} + +func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_create_user_response.go b/services/sqlserverflex/model_create_user_response.go index 732fa8377..eab53af6e 100644 --- a/services/sqlserverflex/model_create_user_response.go +++ b/services/sqlserverflex/model_create_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserResponse{} + // CreateUserResponse struct for CreateUserResponse type CreateUserResponse struct { Item *SingleUser `json:"item,omitempty"` } + +// NewCreateUserResponse instantiates a new CreateUserResponse 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 NewCreateUserResponse() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse 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 NewCreateUserResponseWithDefaults() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *CreateUserResponse) GetItem() *SingleUser { + if o == nil || IsNil(o.Item) { + var ret *SingleUser + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetItemOk() (*SingleUser, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *CreateUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given SingleUser and assigns it to the Item field. +func (o *CreateUserResponse) SetItem(v *SingleUser) { + o.Item = v +} + +func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableCreateUserResponse struct { + value *CreateUserResponse + isSet bool +} + +func (v NullableCreateUserResponse) Get() *CreateUserResponse { + return v.value +} + +func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse { + return &NullableCreateUserResponse{value: val, isSet: true} +} + +func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_database.go b/services/sqlserverflex/model_database.go index e5482e31c..8b3db5c50 100644 --- a/services/sqlserverflex/model_database.go +++ b/services/sqlserverflex/model_database.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the Database type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Database{} + // Database struct for Database type Database struct { Id *string `json:"id,omitempty"` @@ -17,3 +24,166 @@ type Database struct { // Database specific options Options *map[string]interface{} `json:"options,omitempty"` } + +// NewDatabase instantiates a new Database 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 NewDatabase() *Database { + this := Database{} + return &this +} + +// NewDatabaseWithDefaults instantiates a new Database 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 NewDatabaseWithDefaults() *Database { + this := Database{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Database) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *Database) GetIdOk() (*string, 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 *Database) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Database) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Database) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Database) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Database) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Database) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Database) GetOptions() *map[string]interface{} { + if o == nil || IsNil(o.Options) { + var ret *map[string]interface{} + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Database) GetOptionsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Options) { + return &map[string]interface{}{}, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Database) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]interface{} and assigns it to the Options field. +func (o *Database) SetOptions(v *map[string]interface{}) { + o.Options = v +} + +func (o Database) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + return toSerialize, nil +} + +type NullableDatabase struct { + value *Database + isSet bool +} + +func (v NullableDatabase) Get() *Database { + return v.value +} + +func (v *NullableDatabase) Set(val *Database) { + v.value = val + v.isSet = true +} + +func (v NullableDatabase) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabase(val *Database) *NullableDatabase { + return &NullableDatabase{value: val, isSet: true} +} + +func (v NullableDatabase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_database_documentation_create_database_request_options.go b/services/sqlserverflex/model_database_documentation_create_database_request_options.go index 511dacabb..d2eceb9d7 100644 --- a/services/sqlserverflex/model_database_documentation_create_database_request_options.go +++ b/services/sqlserverflex/model_database_documentation_create_database_request_options.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the DatabaseDocumentationCreateDatabaseRequestOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseDocumentationCreateDatabaseRequestOptions{} + // DatabaseDocumentationCreateDatabaseRequestOptions struct for DatabaseDocumentationCreateDatabaseRequestOptions type DatabaseDocumentationCreateDatabaseRequestOptions struct { // Collation of the database @@ -20,3 +27,159 @@ type DatabaseDocumentationCreateDatabaseRequestOptions struct { // REQUIRED Owner *string `json:"owner"` } + +type _DatabaseDocumentationCreateDatabaseRequestOptions DatabaseDocumentationCreateDatabaseRequestOptions + +// NewDatabaseDocumentationCreateDatabaseRequestOptions instantiates a new DatabaseDocumentationCreateDatabaseRequestOptions 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 NewDatabaseDocumentationCreateDatabaseRequestOptions(owner *string) *DatabaseDocumentationCreateDatabaseRequestOptions { + this := DatabaseDocumentationCreateDatabaseRequestOptions{} + this.Owner = owner + return &this +} + +// NewDatabaseDocumentationCreateDatabaseRequestOptionsWithDefaults instantiates a new DatabaseDocumentationCreateDatabaseRequestOptions 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 NewDatabaseDocumentationCreateDatabaseRequestOptionsWithDefaults() *DatabaseDocumentationCreateDatabaseRequestOptions { + this := DatabaseDocumentationCreateDatabaseRequestOptions{} + return &this +} + +// GetCollation returns the Collation field value if set, zero value otherwise. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) GetCollation() *string { + if o == nil || IsNil(o.Collation) { + var ret *string + return ret + } + return o.Collation +} + +// GetCollationOk returns a tuple with the Collation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) GetCollationOk() (*string, bool) { + if o == nil || IsNil(o.Collation) { + return nil, false + } + return o.Collation, true +} + +// HasCollation returns a boolean if a field has been set. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) HasCollation() bool { + if o != nil && !IsNil(o.Collation) { + return true + } + + return false +} + +// SetCollation gets a reference to the given string and assigns it to the Collation field. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) SetCollation(v *string) { + o.Collation = v +} + +// GetCompatibilityLevel returns the CompatibilityLevel field value if set, zero value otherwise. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) GetCompatibilityLevel() *string { + if o == nil || IsNil(o.CompatibilityLevel) { + var ret *string + return ret + } + return o.CompatibilityLevel +} + +// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) GetCompatibilityLevelOk() (*string, bool) { + if o == nil || IsNil(o.CompatibilityLevel) { + return nil, false + } + return o.CompatibilityLevel, true +} + +// HasCompatibilityLevel returns a boolean if a field has been set. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) HasCompatibilityLevel() bool { + if o != nil && !IsNil(o.CompatibilityLevel) { + return true + } + + return false +} + +// SetCompatibilityLevel gets a reference to the given string and assigns it to the CompatibilityLevel field. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) SetCompatibilityLevel(v *string) { + o.CompatibilityLevel = v +} + +// GetOwner returns the Owner field value +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) GetOwner() *string { + if o == nil { + var ret *string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Owner, true +} + +// SetOwner sets field value +func (o *DatabaseDocumentationCreateDatabaseRequestOptions) SetOwner(v *string) { + o.Owner = v +} + +func (o DatabaseDocumentationCreateDatabaseRequestOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Collation) { + toSerialize["collation"] = o.Collation + } + if !IsNil(o.CompatibilityLevel) { + toSerialize["compatibilityLevel"] = o.CompatibilityLevel + } + toSerialize["owner"] = o.Owner + return toSerialize, nil +} + +type NullableDatabaseDocumentationCreateDatabaseRequestOptions struct { + value *DatabaseDocumentationCreateDatabaseRequestOptions + isSet bool +} + +func (v NullableDatabaseDocumentationCreateDatabaseRequestOptions) Get() *DatabaseDocumentationCreateDatabaseRequestOptions { + return v.value +} + +func (v *NullableDatabaseDocumentationCreateDatabaseRequestOptions) Set(val *DatabaseDocumentationCreateDatabaseRequestOptions) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseDocumentationCreateDatabaseRequestOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseDocumentationCreateDatabaseRequestOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseDocumentationCreateDatabaseRequestOptions(val *DatabaseDocumentationCreateDatabaseRequestOptions) *NullableDatabaseDocumentationCreateDatabaseRequestOptions { + return &NullableDatabaseDocumentationCreateDatabaseRequestOptions{value: val, isSet: true} +} + +func (v NullableDatabaseDocumentationCreateDatabaseRequestOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseDocumentationCreateDatabaseRequestOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_database_options.go b/services/sqlserverflex/model_database_options.go index d26e05a91..59fd664f8 100644 --- a/services/sqlserverflex/model_database_options.go +++ b/services/sqlserverflex/model_database_options.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the DatabaseOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseOptions{} + // DatabaseOptions struct for DatabaseOptions type DatabaseOptions struct { // Name of the collation of the database @@ -19,3 +26,166 @@ type DatabaseOptions struct { // Name of the owner of the database. Owner *string `json:"owner,omitempty"` } + +// NewDatabaseOptions instantiates a new DatabaseOptions 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 NewDatabaseOptions() *DatabaseOptions { + this := DatabaseOptions{} + return &this +} + +// NewDatabaseOptionsWithDefaults instantiates a new DatabaseOptions 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 NewDatabaseOptionsWithDefaults() *DatabaseOptions { + this := DatabaseOptions{} + return &this +} + +// GetCollationName returns the CollationName field value if set, zero value otherwise. +func (o *DatabaseOptions) GetCollationName() *string { + if o == nil || IsNil(o.CollationName) { + var ret *string + return ret + } + return o.CollationName +} + +// GetCollationNameOk returns a tuple with the CollationName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseOptions) GetCollationNameOk() (*string, bool) { + if o == nil || IsNil(o.CollationName) { + return nil, false + } + return o.CollationName, true +} + +// HasCollationName returns a boolean if a field has been set. +func (o *DatabaseOptions) HasCollationName() bool { + if o != nil && !IsNil(o.CollationName) { + return true + } + + return false +} + +// SetCollationName gets a reference to the given string and assigns it to the CollationName field. +func (o *DatabaseOptions) SetCollationName(v *string) { + o.CollationName = v +} + +// GetCompatibilityLevel returns the CompatibilityLevel field value if set, zero value otherwise. +func (o *DatabaseOptions) GetCompatibilityLevel() *int64 { + if o == nil || IsNil(o.CompatibilityLevel) { + var ret *int64 + return ret + } + return o.CompatibilityLevel +} + +// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseOptions) GetCompatibilityLevelOk() (*int64, bool) { + if o == nil || IsNil(o.CompatibilityLevel) { + return nil, false + } + return o.CompatibilityLevel, true +} + +// HasCompatibilityLevel returns a boolean if a field has been set. +func (o *DatabaseOptions) HasCompatibilityLevel() bool { + if o != nil && !IsNil(o.CompatibilityLevel) { + return true + } + + return false +} + +// SetCompatibilityLevel gets a reference to the given int64 and assigns it to the CompatibilityLevel field. +func (o *DatabaseOptions) SetCompatibilityLevel(v *int64) { + o.CompatibilityLevel = v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *DatabaseOptions) GetOwner() *string { + if o == nil || IsNil(o.Owner) { + var ret *string + return ret + } + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseOptions) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *DatabaseOptions) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *DatabaseOptions) SetOwner(v *string) { + o.Owner = v +} + +func (o DatabaseOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CollationName) { + toSerialize["collationName"] = o.CollationName + } + if !IsNil(o.CompatibilityLevel) { + toSerialize["compatibilityLevel"] = o.CompatibilityLevel + } + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + return toSerialize, nil +} + +type NullableDatabaseOptions struct { + value *DatabaseOptions + isSet bool +} + +func (v NullableDatabaseOptions) Get() *DatabaseOptions { + return v.value +} + +func (v *NullableDatabaseOptions) Set(val *DatabaseOptions) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseOptions(val *DatabaseOptions) *NullableDatabaseOptions { + return &NullableDatabaseOptions{value: val, isSet: true} +} + +func (v NullableDatabaseOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_flavor.go b/services/sqlserverflex/model_flavor.go index 4139b338a..ff88385d7 100644 --- a/services/sqlserverflex/model_flavor.go +++ b/services/sqlserverflex/model_flavor.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the Flavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Flavor{} + // Flavor struct for Flavor type Flavor struct { Cpu *int64 `json:"cpu,omitempty"` @@ -17,3 +24,201 @@ type Flavor struct { Id *string `json:"id,omitempty"` Memory *int64 `json:"memory,omitempty"` } + +// NewFlavor instantiates a new Flavor 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 NewFlavor() *Flavor { + this := Flavor{} + return &this +} + +// NewFlavorWithDefaults instantiates a new Flavor 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 NewFlavorWithDefaults() *Flavor { + this := Flavor{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *Flavor) GetCpu() *int64 { + if o == nil || IsNil(o.Cpu) { + var ret *int64 + return ret + } + return o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetCpuOk() (*int64, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *Flavor) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +func (o *Flavor) SetCpu(v *int64) { + o.Cpu = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Flavor) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Flavor) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Flavor) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Flavor) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *Flavor) GetIdOk() (*string, 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 *Flavor) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Flavor) SetId(v *string) { + o.Id = v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *Flavor) GetMemory() *int64 { + if o == nil || IsNil(o.Memory) { + var ret *int64 + return ret + } + return o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetMemoryOk() (*int64, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *Flavor) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int64 and assigns it to the Memory field. +func (o *Flavor) SetMemory(v *int64) { + o.Memory = v +} + +func (o Flavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + return toSerialize, nil +} + +type NullableFlavor struct { + value *Flavor + isSet bool +} + +func (v NullableFlavor) Get() *Flavor { + return v.value +} + +func (v *NullableFlavor) Set(val *Flavor) { + v.value = val + v.isSet = true +} + +func (v NullableFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavor(val *Flavor) *NullableFlavor { + return &NullableFlavor{value: val, isSet: true} +} + +func (v NullableFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_get_backup_response.go b/services/sqlserverflex/model_get_backup_response.go index c1227a023..4f4dc110a 100644 --- a/services/sqlserverflex/model_get_backup_response.go +++ b/services/sqlserverflex/model_get_backup_response.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the GetBackupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetBackupResponse{} + // GetBackupResponse struct for GetBackupResponse type GetBackupResponse struct { // Backup end time in UTC @@ -29,3 +36,341 @@ type GetBackupResponse struct { // Backup start time in UTC StartTime *string `json:"startTime,omitempty"` } + +// NewGetBackupResponse instantiates a new GetBackupResponse 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 NewGetBackupResponse() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse 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 NewGetBackupResponseWithDefaults() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *GetBackupResponse) GetEndTime() *string { + if o == nil || IsNil(o.EndTime) { + var ret *string + return ret + } + return o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetEndTimeOk() (*string, bool) { + if o == nil || IsNil(o.EndTime) { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *GetBackupResponse) HasEndTime() bool { + if o != nil && !IsNil(o.EndTime) { + return true + } + + return false +} + +// SetEndTime gets a reference to the given string and assigns it to the EndTime field. +func (o *GetBackupResponse) SetEndTime(v *string) { + o.EndTime = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *GetBackupResponse) GetError() *string { + if o == nil || IsNil(o.Error) { + var ret *string + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *GetBackupResponse) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *GetBackupResponse) SetError(v *string) { + o.Error = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetBackupResponse) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *GetBackupResponse) GetIdOk() (*string, 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 *GetBackupResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GetBackupResponse) SetId(v *string) { + o.Id = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *GetBackupResponse) GetLabels() *[]string { + if o == nil || IsNil(o.Labels) { + var ret *[]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetLabelsOk() (*[]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *GetBackupResponse) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *GetBackupResponse) SetLabels(v *[]string) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetBackupResponse) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetBackupResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetBackupResponse) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *GetBackupResponse) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *GetBackupResponse) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *GetBackupResponse) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *GetBackupResponse) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *GetBackupResponse) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *GetBackupResponse) SetSize(v *int64) { + o.Size = v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *GetBackupResponse) GetStartTime() *string { + if o == nil || IsNil(o.StartTime) { + var ret *string + return ret + } + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetStartTimeOk() (*string, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *GetBackupResponse) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +func (o *GetBackupResponse) SetStartTime(v *string) { + o.StartTime = v +} + +func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EndTime) { + toSerialize["endTime"] = o.EndTime + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.StartTime) { + toSerialize["startTime"] = o.StartTime + } + return toSerialize, nil +} + +type NullableGetBackupResponse struct { + value *GetBackupResponse + isSet bool +} + +func (v NullableGetBackupResponse) Get() *GetBackupResponse { + return v.value +} + +func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetBackupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetBackupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse { + return &NullableGetBackupResponse{value: val, isSet: true} +} + +func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_get_database_response.go b/services/sqlserverflex/model_get_database_response.go index cd59778c8..e0e5030b9 100644 --- a/services/sqlserverflex/model_get_database_response.go +++ b/services/sqlserverflex/model_get_database_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the GetDatabaseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetDatabaseResponse{} + // GetDatabaseResponse struct for GetDatabaseResponse type GetDatabaseResponse struct { Database *SingleDatabase `json:"database,omitempty"` } + +// NewGetDatabaseResponse instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponse() *GetDatabaseResponse { + this := GetDatabaseResponse{} + return &this +} + +// NewGetDatabaseResponseWithDefaults instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponseWithDefaults() *GetDatabaseResponse { + this := GetDatabaseResponse{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *GetDatabaseResponse) GetDatabase() *SingleDatabase { + if o == nil || IsNil(o.Database) { + var ret *SingleDatabase + return ret + } + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetDatabaseResponse) GetDatabaseOk() (*SingleDatabase, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *GetDatabaseResponse) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given SingleDatabase and assigns it to the Database field. +func (o *GetDatabaseResponse) SetDatabase(v *SingleDatabase) { + o.Database = v +} + +func (o GetDatabaseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + return toSerialize, nil +} + +type NullableGetDatabaseResponse struct { + value *GetDatabaseResponse + isSet bool +} + +func (v NullableGetDatabaseResponse) Get() *GetDatabaseResponse { + return v.value +} + +func (v *NullableGetDatabaseResponse) Set(val *GetDatabaseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetDatabaseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetDatabaseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetDatabaseResponse(val *GetDatabaseResponse) *NullableGetDatabaseResponse { + return &NullableGetDatabaseResponse{value: val, isSet: true} +} + +func (v NullableGetDatabaseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetDatabaseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_get_instance_response.go b/services/sqlserverflex/model_get_instance_response.go index f149ea3cf..31e51a9f0 100644 --- a/services/sqlserverflex/model_get_instance_response.go +++ b/services/sqlserverflex/model_get_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the GetInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetInstanceResponse{} + // GetInstanceResponse struct for GetInstanceResponse type GetInstanceResponse struct { Item *Instance `json:"item,omitempty"` } + +// NewGetInstanceResponse instantiates a new GetInstanceResponse 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 NewGetInstanceResponse() *GetInstanceResponse { + this := GetInstanceResponse{} + return &this +} + +// NewGetInstanceResponseWithDefaults instantiates a new GetInstanceResponse 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 NewGetInstanceResponseWithDefaults() *GetInstanceResponse { + this := GetInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetItem() *Instance { + if o == nil || IsNil(o.Item) { + var ret *Instance + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *GetInstanceResponse) SetItem(v *Instance) { + o.Item = v +} + +func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetInstanceResponse struct { + value *GetInstanceResponse + isSet bool +} + +func (v NullableGetInstanceResponse) Get() *GetInstanceResponse { + return v.value +} + +func (v *NullableGetInstanceResponse) Set(val *GetInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetInstanceResponse(val *GetInstanceResponse) *NullableGetInstanceResponse { + return &NullableGetInstanceResponse{value: val, isSet: true} +} + +func (v NullableGetInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_get_user_response.go b/services/sqlserverflex/model_get_user_response.go index a6506bf2a..892144630 100644 --- a/services/sqlserverflex/model_get_user_response.go +++ b/services/sqlserverflex/model_get_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the GetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserResponse{} + // GetUserResponse struct for GetUserResponse type GetUserResponse struct { Item *UserResponseUser `json:"item,omitempty"` } + +// NewGetUserResponse instantiates a new GetUserResponse 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 NewGetUserResponse() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// NewGetUserResponseWithDefaults instantiates a new GetUserResponse 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 NewGetUserResponseWithDefaults() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetUserResponse) GetItem() *UserResponseUser { + if o == nil || IsNil(o.Item) { + var ret *UserResponseUser + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetItemOk() (*UserResponseUser, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given UserResponseUser and assigns it to the Item field. +func (o *GetUserResponse) SetItem(v *UserResponseUser) { + o.Item = v +} + +func (o GetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetUserResponse struct { + value *GetUserResponse + isSet bool +} + +func (v NullableGetUserResponse) Get() *GetUserResponse { + return v.value +} + +func (v *NullableGetUserResponse) Set(val *GetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { + return &NullableGetUserResponse{value: val, isSet: true} +} + +func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance.go b/services/sqlserverflex/model_instance.go index 76873607d..8ba3e995f 100644 --- a/services/sqlserverflex/model_instance.go +++ b/services/sqlserverflex/model_instance.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the Instance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Instance{} + // Instance struct for Instance type Instance struct { Acl *ACL `json:"acl,omitempty"` @@ -23,3 +30,411 @@ type Instance struct { Storage *Storage `json:"storage,omitempty"` Version *string `json:"version,omitempty"` } + +// NewInstance instantiates a new Instance 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 NewInstance() *Instance { + this := Instance{} + return &this +} + +// NewInstanceWithDefaults instantiates a new Instance 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 NewInstanceWithDefaults() *Instance { + this := Instance{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Instance) GetAcl() *ACL { + if o == nil || IsNil(o.Acl) { + var ret *ACL + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Instance) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *Instance) SetAcl(v *ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *Instance) GetBackupSchedule() *string { + if o == nil || IsNil(o.BackupSchedule) { + var ret *string + return ret + } + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *Instance) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *Instance) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise. +func (o *Instance) GetFlavor() *Flavor { + if o == nil || IsNil(o.Flavor) { + var ret *Flavor + return ret + } + return o.Flavor +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetFlavorOk() (*Flavor, bool) { + if o == nil || IsNil(o.Flavor) { + return nil, false + } + return o.Flavor, true +} + +// HasFlavor returns a boolean if a field has been set. +func (o *Instance) HasFlavor() bool { + if o != nil && !IsNil(o.Flavor) { + return true + } + + return false +} + +// SetFlavor gets a reference to the given Flavor and assigns it to the Flavor field. +func (o *Instance) SetFlavor(v *Flavor) { + o.Flavor = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Instance) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *Instance) GetIdOk() (*string, 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 *Instance) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Instance) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Instance) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Instance) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Instance) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Instance) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Instance) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Instance) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *Instance) GetReplicas() *int64 { + if o == nil || IsNil(o.Replicas) { + var ret *int64 + return ret + } + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetReplicasOk() (*int64, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *Instance) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. +func (o *Instance) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Instance) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Instance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Instance) SetStatus(v *string) { + o.Status = v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *Instance) GetStorage() *Storage { + if o == nil || IsNil(o.Storage) { + var ret *Storage + return ret + } + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *Instance) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *Instance) SetStorage(v *Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *Instance) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *Instance) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *Instance) SetVersion(v *string) { + o.Version = v +} + +func (o Instance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.Flavor) { + toSerialize["flavor"] = o.Flavor + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableInstance struct { + value *Instance + isSet bool +} + +func (v NullableInstance) Get() *Instance { + return v.value +} + +func (v *NullableInstance) Set(val *Instance) { + v.value = val + v.isSet = true +} + +func (v NullableInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstance(val *Instance) *NullableInstance { + return &NullableInstance{value: val, isSet: true} +} + +func (v NullableInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_documentation_acl.go b/services/sqlserverflex/model_instance_documentation_acl.go index d7f9565f5..c04b580cc 100644 --- a/services/sqlserverflex/model_instance_documentation_acl.go +++ b/services/sqlserverflex/model_instance_documentation_acl.go @@ -10,8 +10,108 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the InstanceDocumentationACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceDocumentationACL{} + // InstanceDocumentationACL struct for InstanceDocumentationACL type InstanceDocumentationACL struct { // a simple list with IP addresses with CIDR. Items *[]string `json:"items,omitempty"` } + +// NewInstanceDocumentationACL instantiates a new InstanceDocumentationACL 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 NewInstanceDocumentationACL() *InstanceDocumentationACL { + this := InstanceDocumentationACL{} + return &this +} + +// NewInstanceDocumentationACLWithDefaults instantiates a new InstanceDocumentationACL 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 NewInstanceDocumentationACLWithDefaults() *InstanceDocumentationACL { + this := InstanceDocumentationACL{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *InstanceDocumentationACL) GetItems() *[]string { + if o == nil || IsNil(o.Items) { + var ret *[]string + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDocumentationACL) GetItemsOk() (*[]string, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *InstanceDocumentationACL) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []string and assigns it to the Items field. +func (o *InstanceDocumentationACL) SetItems(v *[]string) { + o.Items = v +} + +func (o InstanceDocumentationACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableInstanceDocumentationACL struct { + value *InstanceDocumentationACL + isSet bool +} + +func (v NullableInstanceDocumentationACL) Get() *InstanceDocumentationACL { + return v.value +} + +func (v *NullableInstanceDocumentationACL) Set(val *InstanceDocumentationACL) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceDocumentationACL) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceDocumentationACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceDocumentationACL(val *InstanceDocumentationACL) *NullableInstanceDocumentationACL { + return &NullableInstanceDocumentationACL{value: val, isSet: true} +} + +func (v NullableInstanceDocumentationACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceDocumentationACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_documentation_options.go b/services/sqlserverflex/model_instance_documentation_options.go index a4c52513c..256c4c39e 100644 --- a/services/sqlserverflex/model_instance_documentation_options.go +++ b/services/sqlserverflex/model_instance_documentation_options.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the InstanceDocumentationOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceDocumentationOptions{} + // InstanceDocumentationOptions struct for InstanceDocumentationOptions type InstanceDocumentationOptions struct { // Edition of the MSSQL server instance @@ -17,3 +24,139 @@ type InstanceDocumentationOptions struct { // The days for how long the backup files should be stored before cleaned up. 30 to 365 RetentionDays *string `json:"retentionDays,omitempty"` } + +// NewInstanceDocumentationOptions instantiates a new InstanceDocumentationOptions 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 NewInstanceDocumentationOptions() *InstanceDocumentationOptions { + this := InstanceDocumentationOptions{} + var edition string = "developer" + this.Edition = &edition + var retentionDays string = "32" + this.RetentionDays = &retentionDays + return &this +} + +// NewInstanceDocumentationOptionsWithDefaults instantiates a new InstanceDocumentationOptions 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 NewInstanceDocumentationOptionsWithDefaults() *InstanceDocumentationOptions { + this := InstanceDocumentationOptions{} + var edition string = "developer" + this.Edition = &edition + var retentionDays string = "32" + this.RetentionDays = &retentionDays + return &this +} + +// GetEdition returns the Edition field value if set, zero value otherwise. +func (o *InstanceDocumentationOptions) GetEdition() *string { + if o == nil || IsNil(o.Edition) { + var ret *string + return ret + } + return o.Edition +} + +// GetEditionOk returns a tuple with the Edition field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDocumentationOptions) GetEditionOk() (*string, bool) { + if o == nil || IsNil(o.Edition) { + return nil, false + } + return o.Edition, true +} + +// HasEdition returns a boolean if a field has been set. +func (o *InstanceDocumentationOptions) HasEdition() bool { + if o != nil && !IsNil(o.Edition) { + return true + } + + return false +} + +// SetEdition gets a reference to the given string and assigns it to the Edition field. +func (o *InstanceDocumentationOptions) SetEdition(v *string) { + o.Edition = v +} + +// GetRetentionDays returns the RetentionDays field value if set, zero value otherwise. +func (o *InstanceDocumentationOptions) GetRetentionDays() *string { + if o == nil || IsNil(o.RetentionDays) { + var ret *string + return ret + } + return o.RetentionDays +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDocumentationOptions) GetRetentionDaysOk() (*string, bool) { + if o == nil || IsNil(o.RetentionDays) { + return nil, false + } + return o.RetentionDays, true +} + +// HasRetentionDays returns a boolean if a field has been set. +func (o *InstanceDocumentationOptions) HasRetentionDays() bool { + if o != nil && !IsNil(o.RetentionDays) { + return true + } + + return false +} + +// SetRetentionDays gets a reference to the given string and assigns it to the RetentionDays field. +func (o *InstanceDocumentationOptions) SetRetentionDays(v *string) { + o.RetentionDays = v +} + +func (o InstanceDocumentationOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Edition) { + toSerialize["edition"] = o.Edition + } + if !IsNil(o.RetentionDays) { + toSerialize["retentionDays"] = o.RetentionDays + } + return toSerialize, nil +} + +type NullableInstanceDocumentationOptions struct { + value *InstanceDocumentationOptions + isSet bool +} + +func (v NullableInstanceDocumentationOptions) Get() *InstanceDocumentationOptions { + return v.value +} + +func (v *NullableInstanceDocumentationOptions) Set(val *InstanceDocumentationOptions) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceDocumentationOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceDocumentationOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceDocumentationOptions(val *InstanceDocumentationOptions) *NullableInstanceDocumentationOptions { + return &NullableInstanceDocumentationOptions{value: val, isSet: true} +} + +func (v NullableInstanceDocumentationOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceDocumentationOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_documentation_storage.go b/services/sqlserverflex/model_instance_documentation_storage.go index 9abb818e5..d9685977e 100644 --- a/services/sqlserverflex/model_instance_documentation_storage.go +++ b/services/sqlserverflex/model_instance_documentation_storage.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the InstanceDocumentationStorage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceDocumentationStorage{} + // InstanceDocumentationStorage struct for InstanceDocumentationStorage type InstanceDocumentationStorage struct { // Class of the instance. @@ -17,3 +24,135 @@ type InstanceDocumentationStorage struct { // Size of the instance storage in GB Size *int64 `json:"size,omitempty"` } + +// NewInstanceDocumentationStorage instantiates a new InstanceDocumentationStorage 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 NewInstanceDocumentationStorage() *InstanceDocumentationStorage { + this := InstanceDocumentationStorage{} + var class string = "premium-perf12-stackit" + this.Class = &class + return &this +} + +// NewInstanceDocumentationStorageWithDefaults instantiates a new InstanceDocumentationStorage 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 NewInstanceDocumentationStorageWithDefaults() *InstanceDocumentationStorage { + this := InstanceDocumentationStorage{} + var class string = "premium-perf12-stackit" + this.Class = &class + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *InstanceDocumentationStorage) GetClass() *string { + if o == nil || IsNil(o.Class) { + var ret *string + return ret + } + return o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDocumentationStorage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *InstanceDocumentationStorage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *InstanceDocumentationStorage) SetClass(v *string) { + o.Class = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *InstanceDocumentationStorage) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDocumentationStorage) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *InstanceDocumentationStorage) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *InstanceDocumentationStorage) SetSize(v *int64) { + o.Size = v +} + +func (o InstanceDocumentationStorage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableInstanceDocumentationStorage struct { + value *InstanceDocumentationStorage + isSet bool +} + +func (v NullableInstanceDocumentationStorage) Get() *InstanceDocumentationStorage { + return v.value +} + +func (v *NullableInstanceDocumentationStorage) Set(val *InstanceDocumentationStorage) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceDocumentationStorage) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceDocumentationStorage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceDocumentationStorage(val *InstanceDocumentationStorage) *NullableInstanceDocumentationStorage { + return &NullableInstanceDocumentationStorage{value: val, isSet: true} +} + +func (v NullableInstanceDocumentationStorage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceDocumentationStorage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_error.go b/services/sqlserverflex/model_instance_error.go index 6f068cb67..05e47fcd9 100644 --- a/services/sqlserverflex/model_instance_error.go +++ b/services/sqlserverflex/model_instance_error.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the InstanceError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceError{} + // InstanceError struct for InstanceError type InstanceError struct { Code *int64 `json:"code,omitempty"` @@ -17,3 +24,201 @@ type InstanceError struct { Message *string `json:"message,omitempty"` Type *Type `json:"type,omitempty"` } + +// NewInstanceError instantiates a new InstanceError 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 NewInstanceError() *InstanceError { + this := InstanceError{} + return &this +} + +// NewInstanceErrorWithDefaults instantiates a new InstanceError 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 NewInstanceErrorWithDefaults() *InstanceError { + this := InstanceError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *InstanceError) GetCode() *int64 { + if o == nil || IsNil(o.Code) { + var ret *int64 + return ret + } + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceError) GetCodeOk() (*int64, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *InstanceError) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given int64 and assigns it to the Code field. +func (o *InstanceError) SetCode(v *int64) { + o.Code = v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *InstanceError) GetFields() *map[string][]string { + if o == nil || IsNil(o.Fields) { + var ret *map[string][]string + return ret + } + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceError) GetFieldsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *InstanceError) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given map[string][]string and assigns it to the Fields field. +func (o *InstanceError) SetFields(v *map[string][]string) { + o.Fields = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *InstanceError) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceError) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *InstanceError) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *InstanceError) SetMessage(v *string) { + o.Message = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *InstanceError) GetType() *Type { + if o == nil || IsNil(o.Type) { + var ret *Type + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceError) GetTypeOk() (*Type, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *InstanceError) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given Type and assigns it to the Type field. +func (o *InstanceError) SetType(v *Type) { + o.Type = v +} + +func (o InstanceError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableInstanceError struct { + value *InstanceError + isSet bool +} + +func (v NullableInstanceError) Get() *InstanceError { + return v.value +} + +func (v *NullableInstanceError) Set(val *InstanceError) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceError) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceError(val *InstanceError) *NullableInstanceError { + return &NullableInstanceError{value: val, isSet: true} +} + +func (v NullableInstanceError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_flavor_entry.go b/services/sqlserverflex/model_instance_flavor_entry.go index aa2a97658..10cc8c6c1 100644 --- a/services/sqlserverflex/model_instance_flavor_entry.go +++ b/services/sqlserverflex/model_instance_flavor_entry.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the InstanceFlavorEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceFlavorEntry{} + // InstanceFlavorEntry struct for InstanceFlavorEntry type InstanceFlavorEntry struct { Categories *string `json:"categories,omitempty"` @@ -18,3 +25,236 @@ type InstanceFlavorEntry struct { Id *string `json:"id,omitempty"` Memory *int64 `json:"memory,omitempty"` } + +// NewInstanceFlavorEntry instantiates a new InstanceFlavorEntry 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 NewInstanceFlavorEntry() *InstanceFlavorEntry { + this := InstanceFlavorEntry{} + return &this +} + +// NewInstanceFlavorEntryWithDefaults instantiates a new InstanceFlavorEntry 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 NewInstanceFlavorEntryWithDefaults() *InstanceFlavorEntry { + this := InstanceFlavorEntry{} + return &this +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *InstanceFlavorEntry) GetCategories() *string { + if o == nil || IsNil(o.Categories) { + var ret *string + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavorEntry) GetCategoriesOk() (*string, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *InstanceFlavorEntry) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given string and assigns it to the Categories field. +func (o *InstanceFlavorEntry) SetCategories(v *string) { + o.Categories = v +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *InstanceFlavorEntry) GetCpu() *int64 { + if o == nil || IsNil(o.Cpu) { + var ret *int64 + return ret + } + return o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavorEntry) GetCpuOk() (*int64, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *InstanceFlavorEntry) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +func (o *InstanceFlavorEntry) SetCpu(v *int64) { + o.Cpu = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *InstanceFlavorEntry) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavorEntry) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *InstanceFlavorEntry) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *InstanceFlavorEntry) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceFlavorEntry) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *InstanceFlavorEntry) GetIdOk() (*string, 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 *InstanceFlavorEntry) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InstanceFlavorEntry) SetId(v *string) { + o.Id = v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *InstanceFlavorEntry) GetMemory() *int64 { + if o == nil || IsNil(o.Memory) { + var ret *int64 + return ret + } + return o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavorEntry) GetMemoryOk() (*int64, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *InstanceFlavorEntry) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int64 and assigns it to the Memory field. +func (o *InstanceFlavorEntry) SetMemory(v *int64) { + o.Memory = v +} + +func (o InstanceFlavorEntry) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + return toSerialize, nil +} + +type NullableInstanceFlavorEntry struct { + value *InstanceFlavorEntry + isSet bool +} + +func (v NullableInstanceFlavorEntry) Get() *InstanceFlavorEntry { + return v.value +} + +func (v *NullableInstanceFlavorEntry) Set(val *InstanceFlavorEntry) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceFlavorEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceFlavorEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceFlavorEntry(val *InstanceFlavorEntry) *NullableInstanceFlavorEntry { + return &NullableInstanceFlavorEntry{value: val, isSet: true} +} + +func (v NullableInstanceFlavorEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceFlavorEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_list_instance.go b/services/sqlserverflex/model_instance_list_instance.go index fcfd4febd..0a6e5abec 100644 --- a/services/sqlserverflex/model_instance_list_instance.go +++ b/services/sqlserverflex/model_instance_list_instance.go @@ -10,9 +10,179 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the InstanceListInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceListInstance{} + // InstanceListInstance struct for InstanceListInstance type InstanceListInstance struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Status *string `json:"status,omitempty"` } + +// NewInstanceListInstance instantiates a new InstanceListInstance 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 NewInstanceListInstance() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// NewInstanceListInstanceWithDefaults instantiates a new InstanceListInstance 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 NewInstanceListInstanceWithDefaults() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceListInstance) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *InstanceListInstance) GetIdOk() (*string, 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 *InstanceListInstance) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InstanceListInstance) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InstanceListInstance) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListInstance) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InstanceListInstance) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InstanceListInstance) SetName(v *string) { + o.Name = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *InstanceListInstance) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListInstance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *InstanceListInstance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *InstanceListInstance) SetStatus(v *string) { + o.Status = v +} + +func (o InstanceListInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableInstanceListInstance struct { + value *InstanceListInstance + isSet bool +} + +func (v NullableInstanceListInstance) Get() *InstanceListInstance { + return v.value +} + +func (v *NullableInstanceListInstance) Set(val *InstanceListInstance) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceListInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceListInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceListInstance(val *InstanceListInstance) *NullableInstanceListInstance { + return &NullableInstanceListInstance{value: val, isSet: true} +} + +func (v NullableInstanceListInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceListInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_list_user.go b/services/sqlserverflex/model_instance_list_user.go index 54925b15f..d0aa817a7 100644 --- a/services/sqlserverflex/model_instance_list_user.go +++ b/services/sqlserverflex/model_instance_list_user.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the InstanceListUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceListUser{} + // InstanceListUser struct for InstanceListUser type InstanceListUser struct { Id *string `json:"id,omitempty"` Username *string `json:"username,omitempty"` } + +// NewInstanceListUser instantiates a new InstanceListUser 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 NewInstanceListUser() *InstanceListUser { + this := InstanceListUser{} + return &this +} + +// NewInstanceListUserWithDefaults instantiates a new InstanceListUser 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 NewInstanceListUserWithDefaults() *InstanceListUser { + this := InstanceListUser{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceListUser) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *InstanceListUser) GetIdOk() (*string, 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 *InstanceListUser) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InstanceListUser) SetId(v *string) { + o.Id = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *InstanceListUser) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *InstanceListUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *InstanceListUser) SetUsername(v *string) { + o.Username = v +} + +func (o InstanceListUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableInstanceListUser struct { + value *InstanceListUser + isSet bool +} + +func (v NullableInstanceListUser) Get() *InstanceListUser { + return v.value +} + +func (v *NullableInstanceListUser) Set(val *InstanceListUser) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceListUser) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceListUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceListUser(val *InstanceListUser) *NullableInstanceListUser { + return &NullableInstanceListUser{value: val, isSet: true} +} + +func (v NullableInstanceListUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceListUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_backups_response.go b/services/sqlserverflex/model_list_backups_response.go index cd928da74..00b1acea3 100644 --- a/services/sqlserverflex/model_list_backups_response.go +++ b/services/sqlserverflex/model_list_backups_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackupsResponse{} + // ListBackupsResponse struct for ListBackupsResponse type ListBackupsResponse struct { Databases *[]BackupListBackupsResponseGrouped `json:"databases,omitempty"` } + +// NewListBackupsResponse instantiates a new ListBackupsResponse 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 NewListBackupsResponse() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse 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 NewListBackupsResponseWithDefaults() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// GetDatabases returns the Databases field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetDatabases() *[]BackupListBackupsResponseGrouped { + if o == nil || IsNil(o.Databases) { + var ret *[]BackupListBackupsResponseGrouped + return ret + } + return o.Databases +} + +// GetDatabasesOk returns a tuple with the Databases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetDatabasesOk() (*[]BackupListBackupsResponseGrouped, bool) { + if o == nil || IsNil(o.Databases) { + return nil, false + } + return o.Databases, true +} + +// HasDatabases returns a boolean if a field has been set. +func (o *ListBackupsResponse) HasDatabases() bool { + if o != nil && !IsNil(o.Databases) { + return true + } + + return false +} + +// SetDatabases gets a reference to the given []BackupListBackupsResponseGrouped and assigns it to the Databases field. +func (o *ListBackupsResponse) SetDatabases(v *[]BackupListBackupsResponseGrouped) { + o.Databases = v +} + +func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Databases) { + toSerialize["databases"] = o.Databases + } + return toSerialize, nil +} + +type NullableListBackupsResponse struct { + value *ListBackupsResponse + isSet bool +} + +func (v NullableListBackupsResponse) Get() *ListBackupsResponse { + return v.value +} + +func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListBackupsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListBackupsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse { + return &NullableListBackupsResponse{value: val, isSet: true} +} + +func (v NullableListBackupsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBackupsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_collations_response.go b/services/sqlserverflex/model_list_collations_response.go index f4f10c2d9..68bb9bbb2 100644 --- a/services/sqlserverflex/model_list_collations_response.go +++ b/services/sqlserverflex/model_list_collations_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListCollationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCollationsResponse{} + // ListCollationsResponse struct for ListCollationsResponse type ListCollationsResponse struct { Collations *[]MssqlDatabaseCollation `json:"collations,omitempty"` } + +// NewListCollationsResponse instantiates a new ListCollationsResponse 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 NewListCollationsResponse() *ListCollationsResponse { + this := ListCollationsResponse{} + return &this +} + +// NewListCollationsResponseWithDefaults instantiates a new ListCollationsResponse 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 NewListCollationsResponseWithDefaults() *ListCollationsResponse { + this := ListCollationsResponse{} + return &this +} + +// GetCollations returns the Collations field value if set, zero value otherwise. +func (o *ListCollationsResponse) GetCollations() *[]MssqlDatabaseCollation { + if o == nil || IsNil(o.Collations) { + var ret *[]MssqlDatabaseCollation + return ret + } + return o.Collations +} + +// GetCollationsOk returns a tuple with the Collations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCollationsResponse) GetCollationsOk() (*[]MssqlDatabaseCollation, bool) { + if o == nil || IsNil(o.Collations) { + return nil, false + } + return o.Collations, true +} + +// HasCollations returns a boolean if a field has been set. +func (o *ListCollationsResponse) HasCollations() bool { + if o != nil && !IsNil(o.Collations) { + return true + } + + return false +} + +// SetCollations gets a reference to the given []MssqlDatabaseCollation and assigns it to the Collations field. +func (o *ListCollationsResponse) SetCollations(v *[]MssqlDatabaseCollation) { + o.Collations = v +} + +func (o ListCollationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Collations) { + toSerialize["collations"] = o.Collations + } + return toSerialize, nil +} + +type NullableListCollationsResponse struct { + value *ListCollationsResponse + isSet bool +} + +func (v NullableListCollationsResponse) Get() *ListCollationsResponse { + return v.value +} + +func (v *NullableListCollationsResponse) Set(val *ListCollationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCollationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCollationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCollationsResponse(val *ListCollationsResponse) *NullableListCollationsResponse { + return &NullableListCollationsResponse{value: val, isSet: true} +} + +func (v NullableListCollationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCollationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_compatibility_response.go b/services/sqlserverflex/model_list_compatibility_response.go index 1e33ac7ca..12d2de1ea 100644 --- a/services/sqlserverflex/model_list_compatibility_response.go +++ b/services/sqlserverflex/model_list_compatibility_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListCompatibilityResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCompatibilityResponse{} + // ListCompatibilityResponse struct for ListCompatibilityResponse type ListCompatibilityResponse struct { Compatibilities *[]MssqlDatabaseCompatibility `json:"compatibilities,omitempty"` } + +// NewListCompatibilityResponse instantiates a new ListCompatibilityResponse 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 NewListCompatibilityResponse() *ListCompatibilityResponse { + this := ListCompatibilityResponse{} + return &this +} + +// NewListCompatibilityResponseWithDefaults instantiates a new ListCompatibilityResponse 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 NewListCompatibilityResponseWithDefaults() *ListCompatibilityResponse { + this := ListCompatibilityResponse{} + return &this +} + +// GetCompatibilities returns the Compatibilities field value if set, zero value otherwise. +func (o *ListCompatibilityResponse) GetCompatibilities() *[]MssqlDatabaseCompatibility { + if o == nil || IsNil(o.Compatibilities) { + var ret *[]MssqlDatabaseCompatibility + return ret + } + return o.Compatibilities +} + +// GetCompatibilitiesOk returns a tuple with the Compatibilities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCompatibilityResponse) GetCompatibilitiesOk() (*[]MssqlDatabaseCompatibility, bool) { + if o == nil || IsNil(o.Compatibilities) { + return nil, false + } + return o.Compatibilities, true +} + +// HasCompatibilities returns a boolean if a field has been set. +func (o *ListCompatibilityResponse) HasCompatibilities() bool { + if o != nil && !IsNil(o.Compatibilities) { + return true + } + + return false +} + +// SetCompatibilities gets a reference to the given []MssqlDatabaseCompatibility and assigns it to the Compatibilities field. +func (o *ListCompatibilityResponse) SetCompatibilities(v *[]MssqlDatabaseCompatibility) { + o.Compatibilities = v +} + +func (o ListCompatibilityResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Compatibilities) { + toSerialize["compatibilities"] = o.Compatibilities + } + return toSerialize, nil +} + +type NullableListCompatibilityResponse struct { + value *ListCompatibilityResponse + isSet bool +} + +func (v NullableListCompatibilityResponse) Get() *ListCompatibilityResponse { + return v.value +} + +func (v *NullableListCompatibilityResponse) Set(val *ListCompatibilityResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCompatibilityResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCompatibilityResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCompatibilityResponse(val *ListCompatibilityResponse) *NullableListCompatibilityResponse { + return &NullableListCompatibilityResponse{value: val, isSet: true} +} + +func (v NullableListCompatibilityResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCompatibilityResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_databases_response.go b/services/sqlserverflex/model_list_databases_response.go index 5ab8db4b4..a3da66777 100644 --- a/services/sqlserverflex/model_list_databases_response.go +++ b/services/sqlserverflex/model_list_databases_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListDatabasesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListDatabasesResponse{} + // ListDatabasesResponse struct for ListDatabasesResponse type ListDatabasesResponse struct { Databases *[]Database `json:"databases,omitempty"` } + +// NewListDatabasesResponse instantiates a new ListDatabasesResponse 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 NewListDatabasesResponse() *ListDatabasesResponse { + this := ListDatabasesResponse{} + return &this +} + +// NewListDatabasesResponseWithDefaults instantiates a new ListDatabasesResponse 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 NewListDatabasesResponseWithDefaults() *ListDatabasesResponse { + this := ListDatabasesResponse{} + return &this +} + +// GetDatabases returns the Databases field value if set, zero value otherwise. +func (o *ListDatabasesResponse) GetDatabases() *[]Database { + if o == nil || IsNil(o.Databases) { + var ret *[]Database + return ret + } + return o.Databases +} + +// GetDatabasesOk returns a tuple with the Databases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListDatabasesResponse) GetDatabasesOk() (*[]Database, bool) { + if o == nil || IsNil(o.Databases) { + return nil, false + } + return o.Databases, true +} + +// HasDatabases returns a boolean if a field has been set. +func (o *ListDatabasesResponse) HasDatabases() bool { + if o != nil && !IsNil(o.Databases) { + return true + } + + return false +} + +// SetDatabases gets a reference to the given []Database and assigns it to the Databases field. +func (o *ListDatabasesResponse) SetDatabases(v *[]Database) { + o.Databases = v +} + +func (o ListDatabasesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Databases) { + toSerialize["databases"] = o.Databases + } + return toSerialize, nil +} + +type NullableListDatabasesResponse struct { + value *ListDatabasesResponse + isSet bool +} + +func (v NullableListDatabasesResponse) Get() *ListDatabasesResponse { + return v.value +} + +func (v *NullableListDatabasesResponse) Set(val *ListDatabasesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListDatabasesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListDatabasesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListDatabasesResponse(val *ListDatabasesResponse) *NullableListDatabasesResponse { + return &NullableListDatabasesResponse{value: val, isSet: true} +} + +func (v NullableListDatabasesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListDatabasesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_flavors_response.go b/services/sqlserverflex/model_list_flavors_response.go index 56ca125c6..4beea690e 100644 --- a/services/sqlserverflex/model_list_flavors_response.go +++ b/services/sqlserverflex/model_list_flavors_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListFlavorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavorsResponse{} + // ListFlavorsResponse struct for ListFlavorsResponse type ListFlavorsResponse struct { Flavors *[]InstanceFlavorEntry `json:"flavors,omitempty"` } + +// NewListFlavorsResponse instantiates a new ListFlavorsResponse 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 NewListFlavorsResponse() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// NewListFlavorsResponseWithDefaults instantiates a new ListFlavorsResponse 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 NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// GetFlavors returns the Flavors field value if set, zero value otherwise. +func (o *ListFlavorsResponse) GetFlavors() *[]InstanceFlavorEntry { + if o == nil || IsNil(o.Flavors) { + var ret *[]InstanceFlavorEntry + return ret + } + return o.Flavors +} + +// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFlavorsResponse) GetFlavorsOk() (*[]InstanceFlavorEntry, bool) { + if o == nil || IsNil(o.Flavors) { + return nil, false + } + return o.Flavors, true +} + +// HasFlavors returns a boolean if a field has been set. +func (o *ListFlavorsResponse) HasFlavors() bool { + if o != nil && !IsNil(o.Flavors) { + return true + } + + return false +} + +// SetFlavors gets a reference to the given []InstanceFlavorEntry and assigns it to the Flavors field. +func (o *ListFlavorsResponse) SetFlavors(v *[]InstanceFlavorEntry) { + o.Flavors = v +} + +func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Flavors) { + toSerialize["flavors"] = o.Flavors + } + return toSerialize, nil +} + +type NullableListFlavorsResponse struct { + value *ListFlavorsResponse + isSet bool +} + +func (v NullableListFlavorsResponse) Get() *ListFlavorsResponse { + return v.value +} + +func (v *NullableListFlavorsResponse) Set(val *ListFlavorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFlavorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFlavorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFlavorsResponse(val *ListFlavorsResponse) *NullableListFlavorsResponse { + return &NullableListFlavorsResponse{value: val, isSet: true} +} + +func (v NullableListFlavorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFlavorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_instances_response.go b/services/sqlserverflex/model_list_instances_response.go index 83ef3fdd6..3f95e9f87 100644 --- a/services/sqlserverflex/model_list_instances_response.go +++ b/services/sqlserverflex/model_list_instances_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstancesResponse{} + // ListInstancesResponse struct for ListInstancesResponse type ListInstancesResponse struct { Count *int64 `json:"count,omitempty"` Items *[]InstanceListInstance `json:"items,omitempty"` } + +// NewListInstancesResponse instantiates a new ListInstancesResponse 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 NewListInstancesResponse() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse 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 NewListInstancesResponseWithDefaults() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetCount() *int64 { + if o == nil || IsNil(o.Count) { + var ret *int64 + return ret + } + return o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListInstancesResponse) SetCount(v *int64) { + o.Count = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetItems() *[]InstanceListInstance { + if o == nil || IsNil(o.Items) { + var ret *[]InstanceListInstance + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetItemsOk() (*[]InstanceListInstance, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []InstanceListInstance and assigns it to the Items field. +func (o *ListInstancesResponse) SetItems(v *[]InstanceListInstance) { + o.Items = v +} + +func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListInstancesResponse struct { + value *ListInstancesResponse + isSet bool +} + +func (v NullableListInstancesResponse) Get() *ListInstancesResponse { + return v.value +} + +func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListInstancesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListInstancesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { + return &NullableListInstancesResponse{value: val, isSet: true} +} + +func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_restore_jobs_response.go b/services/sqlserverflex/model_list_restore_jobs_response.go index 612ff11e0..5e5ff5d9d 100644 --- a/services/sqlserverflex/model_list_restore_jobs_response.go +++ b/services/sqlserverflex/model_list_restore_jobs_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListRestoreJobsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRestoreJobsResponse{} + // ListRestoreJobsResponse struct for ListRestoreJobsResponse type ListRestoreJobsResponse struct { RunningRestores *[]RestoreRunningRestore `json:"runningRestores,omitempty"` } + +// NewListRestoreJobsResponse instantiates a new ListRestoreJobsResponse 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 NewListRestoreJobsResponse() *ListRestoreJobsResponse { + this := ListRestoreJobsResponse{} + return &this +} + +// NewListRestoreJobsResponseWithDefaults instantiates a new ListRestoreJobsResponse 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 NewListRestoreJobsResponseWithDefaults() *ListRestoreJobsResponse { + this := ListRestoreJobsResponse{} + return &this +} + +// GetRunningRestores returns the RunningRestores field value if set, zero value otherwise. +func (o *ListRestoreJobsResponse) GetRunningRestores() *[]RestoreRunningRestore { + if o == nil || IsNil(o.RunningRestores) { + var ret *[]RestoreRunningRestore + return ret + } + return o.RunningRestores +} + +// GetRunningRestoresOk returns a tuple with the RunningRestores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRestoreJobsResponse) GetRunningRestoresOk() (*[]RestoreRunningRestore, bool) { + if o == nil || IsNil(o.RunningRestores) { + return nil, false + } + return o.RunningRestores, true +} + +// HasRunningRestores returns a boolean if a field has been set. +func (o *ListRestoreJobsResponse) HasRunningRestores() bool { + if o != nil && !IsNil(o.RunningRestores) { + return true + } + + return false +} + +// SetRunningRestores gets a reference to the given []RestoreRunningRestore and assigns it to the RunningRestores field. +func (o *ListRestoreJobsResponse) SetRunningRestores(v *[]RestoreRunningRestore) { + o.RunningRestores = v +} + +func (o ListRestoreJobsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RunningRestores) { + toSerialize["runningRestores"] = o.RunningRestores + } + return toSerialize, nil +} + +type NullableListRestoreJobsResponse struct { + value *ListRestoreJobsResponse + isSet bool +} + +func (v NullableListRestoreJobsResponse) Get() *ListRestoreJobsResponse { + return v.value +} + +func (v *NullableListRestoreJobsResponse) Set(val *ListRestoreJobsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRestoreJobsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRestoreJobsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRestoreJobsResponse(val *ListRestoreJobsResponse) *NullableListRestoreJobsResponse { + return &NullableListRestoreJobsResponse{value: val, isSet: true} +} + +func (v NullableListRestoreJobsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRestoreJobsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_roles_response.go b/services/sqlserverflex/model_list_roles_response.go index 93d6c4f6c..d9a7dcc2a 100644 --- a/services/sqlserverflex/model_list_roles_response.go +++ b/services/sqlserverflex/model_list_roles_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListRolesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRolesResponse{} + // ListRolesResponse struct for ListRolesResponse type ListRolesResponse struct { Roles *[]string `json:"roles,omitempty"` } + +// NewListRolesResponse instantiates a new ListRolesResponse 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 NewListRolesResponse() *ListRolesResponse { + this := ListRolesResponse{} + return &this +} + +// NewListRolesResponseWithDefaults instantiates a new ListRolesResponse 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 NewListRolesResponseWithDefaults() *ListRolesResponse { + this := ListRolesResponse{} + return &this +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *ListRolesResponse) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRolesResponse) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *ListRolesResponse) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *ListRolesResponse) SetRoles(v *[]string) { + o.Roles = v +} + +func (o ListRolesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullableListRolesResponse struct { + value *ListRolesResponse + isSet bool +} + +func (v NullableListRolesResponse) Get() *ListRolesResponse { + return v.value +} + +func (v *NullableListRolesResponse) Set(val *ListRolesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRolesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRolesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRolesResponse(val *ListRolesResponse) *NullableListRolesResponse { + return &NullableListRolesResponse{value: val, isSet: true} +} + +func (v NullableListRolesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRolesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_storages_response.go b/services/sqlserverflex/model_list_storages_response.go index afdaf42b7..2e4d7e678 100644 --- a/services/sqlserverflex/model_list_storages_response.go +++ b/services/sqlserverflex/model_list_storages_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListStoragesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListStoragesResponse{} + // ListStoragesResponse struct for ListStoragesResponse type ListStoragesResponse struct { StorageClasses *[]string `json:"storageClasses,omitempty"` StorageRange *StorageRange `json:"storageRange,omitempty"` } + +// NewListStoragesResponse instantiates a new ListStoragesResponse 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 NewListStoragesResponse() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// NewListStoragesResponseWithDefaults instantiates a new ListStoragesResponse 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 NewListStoragesResponseWithDefaults() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// GetStorageClasses returns the StorageClasses field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageClasses() *[]string { + if o == nil || IsNil(o.StorageClasses) { + var ret *[]string + return ret + } + return o.StorageClasses +} + +// GetStorageClassesOk returns a tuple with the StorageClasses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageClassesOk() (*[]string, bool) { + if o == nil || IsNil(o.StorageClasses) { + return nil, false + } + return o.StorageClasses, true +} + +// HasStorageClasses returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageClasses() bool { + if o != nil && !IsNil(o.StorageClasses) { + return true + } + + return false +} + +// SetStorageClasses gets a reference to the given []string and assigns it to the StorageClasses field. +func (o *ListStoragesResponse) SetStorageClasses(v *[]string) { + o.StorageClasses = v +} + +// GetStorageRange returns the StorageRange field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageRange() *StorageRange { + if o == nil || IsNil(o.StorageRange) { + var ret *StorageRange + return ret + } + return o.StorageRange +} + +// GetStorageRangeOk returns a tuple with the StorageRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageRangeOk() (*StorageRange, bool) { + if o == nil || IsNil(o.StorageRange) { + return nil, false + } + return o.StorageRange, true +} + +// HasStorageRange returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageRange() bool { + if o != nil && !IsNil(o.StorageRange) { + return true + } + + return false +} + +// SetStorageRange gets a reference to the given StorageRange and assigns it to the StorageRange field. +func (o *ListStoragesResponse) SetStorageRange(v *StorageRange) { + o.StorageRange = v +} + +func (o ListStoragesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StorageClasses) { + toSerialize["storageClasses"] = o.StorageClasses + } + if !IsNil(o.StorageRange) { + toSerialize["storageRange"] = o.StorageRange + } + return toSerialize, nil +} + +type NullableListStoragesResponse struct { + value *ListStoragesResponse + isSet bool +} + +func (v NullableListStoragesResponse) Get() *ListStoragesResponse { + return v.value +} + +func (v *NullableListStoragesResponse) Set(val *ListStoragesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListStoragesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListStoragesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListStoragesResponse(val *ListStoragesResponse) *NullableListStoragesResponse { + return &NullableListStoragesResponse{value: val, isSet: true} +} + +func (v NullableListStoragesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListStoragesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_users_response.go b/services/sqlserverflex/model_list_users_response.go index 9e4bce94b..ea8e357dd 100644 --- a/services/sqlserverflex/model_list_users_response.go +++ b/services/sqlserverflex/model_list_users_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListUsersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUsersResponse{} + // ListUsersResponse struct for ListUsersResponse type ListUsersResponse struct { Count *int64 `json:"count,omitempty"` Items *[]InstanceListUser `json:"items,omitempty"` } + +// NewListUsersResponse instantiates a new ListUsersResponse 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 NewListUsersResponse() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// NewListUsersResponseWithDefaults instantiates a new ListUsersResponse 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 NewListUsersResponseWithDefaults() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListUsersResponse) GetCount() *int64 { + if o == nil || IsNil(o.Count) { + var ret *int64 + return ret + } + return o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListUsersResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListUsersResponse) SetCount(v *int64) { + o.Count = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListUsersResponse) GetItems() *[]InstanceListUser { + if o == nil || IsNil(o.Items) { + var ret *[]InstanceListUser + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetItemsOk() (*[]InstanceListUser, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListUsersResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []InstanceListUser and assigns it to the Items field. +func (o *ListUsersResponse) SetItems(v *[]InstanceListUser) { + o.Items = v +} + +func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListUsersResponse struct { + value *ListUsersResponse + isSet bool +} + +func (v NullableListUsersResponse) Get() *ListUsersResponse { + return v.value +} + +func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUsersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUsersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { + return &NullableListUsersResponse{value: val, isSet: true} +} + +func (v NullableListUsersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUsersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_versions_response.go b/services/sqlserverflex/model_list_versions_response.go index 37ce40d4f..7fb02db4c 100644 --- a/services/sqlserverflex/model_list_versions_response.go +++ b/services/sqlserverflex/model_list_versions_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ListVersionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListVersionsResponse{} + // ListVersionsResponse struct for ListVersionsResponse type ListVersionsResponse struct { Versions *[]string `json:"versions,omitempty"` } + +// NewListVersionsResponse instantiates a new ListVersionsResponse 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 NewListVersionsResponse() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// NewListVersionsResponseWithDefaults instantiates a new ListVersionsResponse 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 NewListVersionsResponseWithDefaults() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *ListVersionsResponse) GetVersions() *[]string { + if o == nil || IsNil(o.Versions) { + var ret *[]string + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListVersionsResponse) GetVersionsOk() (*[]string, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *ListVersionsResponse) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *ListVersionsResponse) SetVersions(v *[]string) { + o.Versions = v +} + +func (o ListVersionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + return toSerialize, nil +} + +type NullableListVersionsResponse struct { + value *ListVersionsResponse + isSet bool +} + +func (v NullableListVersionsResponse) Get() *ListVersionsResponse { + return v.value +} + +func (v *NullableListVersionsResponse) Set(val *ListVersionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListVersionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListVersionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListVersionsResponse(val *ListVersionsResponse) *NullableListVersionsResponse { + return &NullableListVersionsResponse{value: val, isSet: true} +} + +func (v NullableListVersionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListVersionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_mssql_database_collation.go b/services/sqlserverflex/model_mssql_database_collation.go index d723d14dd..d9047fc89 100644 --- a/services/sqlserverflex/model_mssql_database_collation.go +++ b/services/sqlserverflex/model_mssql_database_collation.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the MssqlDatabaseCollation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MssqlDatabaseCollation{} + // MssqlDatabaseCollation struct for MssqlDatabaseCollation type MssqlDatabaseCollation struct { CollationName *string `json:"collation_name,omitempty"` Description *string `json:"description,omitempty"` } + +// NewMssqlDatabaseCollation instantiates a new MssqlDatabaseCollation 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 NewMssqlDatabaseCollation() *MssqlDatabaseCollation { + this := MssqlDatabaseCollation{} + return &this +} + +// NewMssqlDatabaseCollationWithDefaults instantiates a new MssqlDatabaseCollation 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 NewMssqlDatabaseCollationWithDefaults() *MssqlDatabaseCollation { + this := MssqlDatabaseCollation{} + return &this +} + +// GetCollationName returns the CollationName field value if set, zero value otherwise. +func (o *MssqlDatabaseCollation) GetCollationName() *string { + if o == nil || IsNil(o.CollationName) { + var ret *string + return ret + } + return o.CollationName +} + +// GetCollationNameOk returns a tuple with the CollationName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MssqlDatabaseCollation) GetCollationNameOk() (*string, bool) { + if o == nil || IsNil(o.CollationName) { + return nil, false + } + return o.CollationName, true +} + +// HasCollationName returns a boolean if a field has been set. +func (o *MssqlDatabaseCollation) HasCollationName() bool { + if o != nil && !IsNil(o.CollationName) { + return true + } + + return false +} + +// SetCollationName gets a reference to the given string and assigns it to the CollationName field. +func (o *MssqlDatabaseCollation) SetCollationName(v *string) { + o.CollationName = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *MssqlDatabaseCollation) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MssqlDatabaseCollation) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *MssqlDatabaseCollation) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *MssqlDatabaseCollation) SetDescription(v *string) { + o.Description = v +} + +func (o MssqlDatabaseCollation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CollationName) { + toSerialize["collation_name"] = o.CollationName + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullableMssqlDatabaseCollation struct { + value *MssqlDatabaseCollation + isSet bool +} + +func (v NullableMssqlDatabaseCollation) Get() *MssqlDatabaseCollation { + return v.value +} + +func (v *NullableMssqlDatabaseCollation) Set(val *MssqlDatabaseCollation) { + v.value = val + v.isSet = true +} + +func (v NullableMssqlDatabaseCollation) IsSet() bool { + return v.isSet +} + +func (v *NullableMssqlDatabaseCollation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMssqlDatabaseCollation(val *MssqlDatabaseCollation) *NullableMssqlDatabaseCollation { + return &NullableMssqlDatabaseCollation{value: val, isSet: true} +} + +func (v NullableMssqlDatabaseCollation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMssqlDatabaseCollation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_mssql_database_compatibility.go b/services/sqlserverflex/model_mssql_database_compatibility.go index ec53d9ea2..500d98bd4 100644 --- a/services/sqlserverflex/model_mssql_database_compatibility.go +++ b/services/sqlserverflex/model_mssql_database_compatibility.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the MssqlDatabaseCompatibility type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MssqlDatabaseCompatibility{} + // MssqlDatabaseCompatibility struct for MssqlDatabaseCompatibility type MssqlDatabaseCompatibility struct { CompatibilityLevel *int64 `json:"compatibility_level,omitempty"` Description *string `json:"description,omitempty"` } + +// NewMssqlDatabaseCompatibility instantiates a new MssqlDatabaseCompatibility 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 NewMssqlDatabaseCompatibility() *MssqlDatabaseCompatibility { + this := MssqlDatabaseCompatibility{} + return &this +} + +// NewMssqlDatabaseCompatibilityWithDefaults instantiates a new MssqlDatabaseCompatibility 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 NewMssqlDatabaseCompatibilityWithDefaults() *MssqlDatabaseCompatibility { + this := MssqlDatabaseCompatibility{} + return &this +} + +// GetCompatibilityLevel returns the CompatibilityLevel field value if set, zero value otherwise. +func (o *MssqlDatabaseCompatibility) GetCompatibilityLevel() *int64 { + if o == nil || IsNil(o.CompatibilityLevel) { + var ret *int64 + return ret + } + return o.CompatibilityLevel +} + +// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MssqlDatabaseCompatibility) GetCompatibilityLevelOk() (*int64, bool) { + if o == nil || IsNil(o.CompatibilityLevel) { + return nil, false + } + return o.CompatibilityLevel, true +} + +// HasCompatibilityLevel returns a boolean if a field has been set. +func (o *MssqlDatabaseCompatibility) HasCompatibilityLevel() bool { + if o != nil && !IsNil(o.CompatibilityLevel) { + return true + } + + return false +} + +// SetCompatibilityLevel gets a reference to the given int64 and assigns it to the CompatibilityLevel field. +func (o *MssqlDatabaseCompatibility) SetCompatibilityLevel(v *int64) { + o.CompatibilityLevel = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *MssqlDatabaseCompatibility) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MssqlDatabaseCompatibility) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *MssqlDatabaseCompatibility) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *MssqlDatabaseCompatibility) SetDescription(v *string) { + o.Description = v +} + +func (o MssqlDatabaseCompatibility) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CompatibilityLevel) { + toSerialize["compatibility_level"] = o.CompatibilityLevel + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullableMssqlDatabaseCompatibility struct { + value *MssqlDatabaseCompatibility + isSet bool +} + +func (v NullableMssqlDatabaseCompatibility) Get() *MssqlDatabaseCompatibility { + return v.value +} + +func (v *NullableMssqlDatabaseCompatibility) Set(val *MssqlDatabaseCompatibility) { + v.value = val + v.isSet = true +} + +func (v NullableMssqlDatabaseCompatibility) IsSet() bool { + return v.isSet +} + +func (v *NullableMssqlDatabaseCompatibility) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMssqlDatabaseCompatibility(val *MssqlDatabaseCompatibility) *NullableMssqlDatabaseCompatibility { + return &NullableMssqlDatabaseCompatibility{value: val, isSet: true} +} + +func (v NullableMssqlDatabaseCompatibility) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMssqlDatabaseCompatibility) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_partial_update_instance_payload.go b/services/sqlserverflex/model_partial_update_instance_payload.go index 404977486..b41ed4007 100644 --- a/services/sqlserverflex/model_partial_update_instance_payload.go +++ b/services/sqlserverflex/model_partial_update_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstancePayload{} + // PartialUpdateInstancePayload struct for PartialUpdateInstancePayload type PartialUpdateInstancePayload struct { Acl *CreateInstancePayloadAcl `json:"acl,omitempty"` @@ -23,3 +30,275 @@ type PartialUpdateInstancePayload struct { // Version of the MSSQL Server Version *string `json:"version,omitempty"` } + +// NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + var version string = "2022" + this.Version = &version + return &this +} + +// NewPartialUpdateInstancePayloadWithDefaults instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + var version string = "2022" + this.Version = &version + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetAcl() *CreateInstancePayloadAcl { + if o == nil || IsNil(o.Acl) { + var ret *CreateInstancePayloadAcl + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetAclOk() (*CreateInstancePayloadAcl, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given CreateInstancePayloadAcl and assigns it to the Acl field. +func (o *PartialUpdateInstancePayload) SetAcl(v *CreateInstancePayloadAcl) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetBackupSchedule() *string { + if o == nil || IsNil(o.BackupSchedule) { + var ret *string + return ret + } + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *PartialUpdateInstancePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetFlavorId() *string { + if o == nil || IsNil(o.FlavorId) { + var ret *string + return ret + } + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil || IsNil(o.FlavorId) { + return nil, false + } + return o.FlavorId, true +} + +// HasFlavorId returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasFlavorId() bool { + if o != nil && !IsNil(o.FlavorId) { + return true + } + + return false +} + +// SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. +func (o *PartialUpdateInstancePayload) SetFlavorId(v *string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetLabels() *map[string]interface{} { + if o == nil || IsNil(o.Labels) { + var ret *map[string]interface{} + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Labels) { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +func (o *PartialUpdateInstancePayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PartialUpdateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PartialUpdateInstancePayload) SetVersion(v *string) { + o.Version = v +} + +func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.FlavorId) { + toSerialize["flavorId"] = o.FlavorId + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullablePartialUpdateInstancePayload struct { + value *PartialUpdateInstancePayload + isSet bool +} + +func (v NullablePartialUpdateInstancePayload) Get() *PartialUpdateInstancePayload { + return v.value +} + +func (v *NullablePartialUpdateInstancePayload) Set(val *PartialUpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateInstancePayload(val *PartialUpdateInstancePayload) *NullablePartialUpdateInstancePayload { + return &NullablePartialUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_reset_user_response.go b/services/sqlserverflex/model_reset_user_response.go index c6d700483..fc281c25c 100644 --- a/services/sqlserverflex/model_reset_user_response.go +++ b/services/sqlserverflex/model_reset_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the ResetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResetUserResponse{} + // ResetUserResponse struct for ResetUserResponse type ResetUserResponse struct { Item *SingleUser `json:"item,omitempty"` } + +// NewResetUserResponse instantiates a new ResetUserResponse 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 NewResetUserResponse() *ResetUserResponse { + this := ResetUserResponse{} + return &this +} + +// NewResetUserResponseWithDefaults instantiates a new ResetUserResponse 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 NewResetUserResponseWithDefaults() *ResetUserResponse { + this := ResetUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *ResetUserResponse) GetItem() *SingleUser { + if o == nil || IsNil(o.Item) { + var ret *SingleUser + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResetUserResponse) GetItemOk() (*SingleUser, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *ResetUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given SingleUser and assigns it to the Item field. +func (o *ResetUserResponse) SetItem(v *SingleUser) { + o.Item = v +} + +func (o ResetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableResetUserResponse struct { + value *ResetUserResponse + isSet bool +} + +func (v NullableResetUserResponse) Get() *ResetUserResponse { + return v.value +} + +func (v *NullableResetUserResponse) Set(val *ResetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableResetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableResetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResetUserResponse(val *ResetUserResponse) *NullableResetUserResponse { + return &NullableResetUserResponse{value: val, isSet: true} +} + +func (v NullableResetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_restore_running_restore.go b/services/sqlserverflex/model_restore_running_restore.go index ec9798191..e99d0f9a3 100644 --- a/services/sqlserverflex/model_restore_running_restore.go +++ b/services/sqlserverflex/model_restore_running_restore.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the RestoreRunningRestore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreRunningRestore{} + // RestoreRunningRestore struct for RestoreRunningRestore type RestoreRunningRestore struct { Command *string `json:"command,omitempty"` @@ -18,3 +25,236 @@ type RestoreRunningRestore struct { PercentComplete *int64 `json:"percent_complete,omitempty"` StartTime *string `json:"start_time,omitempty"` } + +// NewRestoreRunningRestore instantiates a new RestoreRunningRestore 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 NewRestoreRunningRestore() *RestoreRunningRestore { + this := RestoreRunningRestore{} + return &this +} + +// NewRestoreRunningRestoreWithDefaults instantiates a new RestoreRunningRestore 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 NewRestoreRunningRestoreWithDefaults() *RestoreRunningRestore { + this := RestoreRunningRestore{} + return &this +} + +// GetCommand returns the Command field value if set, zero value otherwise. +func (o *RestoreRunningRestore) GetCommand() *string { + if o == nil || IsNil(o.Command) { + var ret *string + return ret + } + return o.Command +} + +// GetCommandOk returns a tuple with the Command field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreRunningRestore) GetCommandOk() (*string, bool) { + if o == nil || IsNil(o.Command) { + return nil, false + } + return o.Command, true +} + +// HasCommand returns a boolean if a field has been set. +func (o *RestoreRunningRestore) HasCommand() bool { + if o != nil && !IsNil(o.Command) { + return true + } + + return false +} + +// SetCommand gets a reference to the given string and assigns it to the Command field. +func (o *RestoreRunningRestore) SetCommand(v *string) { + o.Command = v +} + +// GetDatabaseName returns the DatabaseName field value if set, zero value otherwise. +func (o *RestoreRunningRestore) GetDatabaseName() *string { + if o == nil || IsNil(o.DatabaseName) { + var ret *string + return ret + } + return o.DatabaseName +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreRunningRestore) GetDatabaseNameOk() (*string, bool) { + if o == nil || IsNil(o.DatabaseName) { + return nil, false + } + return o.DatabaseName, true +} + +// HasDatabaseName returns a boolean if a field has been set. +func (o *RestoreRunningRestore) HasDatabaseName() bool { + if o != nil && !IsNil(o.DatabaseName) { + return true + } + + return false +} + +// SetDatabaseName gets a reference to the given string and assigns it to the DatabaseName field. +func (o *RestoreRunningRestore) SetDatabaseName(v *string) { + o.DatabaseName = v +} + +// GetEstimatedCompletionTime returns the EstimatedCompletionTime field value if set, zero value otherwise. +func (o *RestoreRunningRestore) GetEstimatedCompletionTime() *string { + if o == nil || IsNil(o.EstimatedCompletionTime) { + var ret *string + return ret + } + return o.EstimatedCompletionTime +} + +// GetEstimatedCompletionTimeOk returns a tuple with the EstimatedCompletionTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreRunningRestore) GetEstimatedCompletionTimeOk() (*string, bool) { + if o == nil || IsNil(o.EstimatedCompletionTime) { + return nil, false + } + return o.EstimatedCompletionTime, true +} + +// HasEstimatedCompletionTime returns a boolean if a field has been set. +func (o *RestoreRunningRestore) HasEstimatedCompletionTime() bool { + if o != nil && !IsNil(o.EstimatedCompletionTime) { + return true + } + + return false +} + +// SetEstimatedCompletionTime gets a reference to the given string and assigns it to the EstimatedCompletionTime field. +func (o *RestoreRunningRestore) SetEstimatedCompletionTime(v *string) { + o.EstimatedCompletionTime = v +} + +// GetPercentComplete returns the PercentComplete field value if set, zero value otherwise. +func (o *RestoreRunningRestore) GetPercentComplete() *int64 { + if o == nil || IsNil(o.PercentComplete) { + var ret *int64 + return ret + } + return o.PercentComplete +} + +// GetPercentCompleteOk returns a tuple with the PercentComplete field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreRunningRestore) GetPercentCompleteOk() (*int64, bool) { + if o == nil || IsNil(o.PercentComplete) { + return nil, false + } + return o.PercentComplete, true +} + +// HasPercentComplete returns a boolean if a field has been set. +func (o *RestoreRunningRestore) HasPercentComplete() bool { + if o != nil && !IsNil(o.PercentComplete) { + return true + } + + return false +} + +// SetPercentComplete gets a reference to the given int64 and assigns it to the PercentComplete field. +func (o *RestoreRunningRestore) SetPercentComplete(v *int64) { + o.PercentComplete = v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *RestoreRunningRestore) GetStartTime() *string { + if o == nil || IsNil(o.StartTime) { + var ret *string + return ret + } + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreRunningRestore) GetStartTimeOk() (*string, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *RestoreRunningRestore) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +func (o *RestoreRunningRestore) SetStartTime(v *string) { + o.StartTime = v +} + +func (o RestoreRunningRestore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Command) { + toSerialize["command"] = o.Command + } + if !IsNil(o.DatabaseName) { + toSerialize["database_name"] = o.DatabaseName + } + if !IsNil(o.EstimatedCompletionTime) { + toSerialize["estimated_completion_time"] = o.EstimatedCompletionTime + } + if !IsNil(o.PercentComplete) { + toSerialize["percent_complete"] = o.PercentComplete + } + if !IsNil(o.StartTime) { + toSerialize["start_time"] = o.StartTime + } + return toSerialize, nil +} + +type NullableRestoreRunningRestore struct { + value *RestoreRunningRestore + isSet bool +} + +func (v NullableRestoreRunningRestore) Get() *RestoreRunningRestore { + return v.value +} + +func (v *NullableRestoreRunningRestore) Set(val *RestoreRunningRestore) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreRunningRestore) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreRunningRestore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreRunningRestore(val *RestoreRunningRestore) *NullableRestoreRunningRestore { + return &NullableRestoreRunningRestore{value: val, isSet: true} +} + +func (v NullableRestoreRunningRestore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreRunningRestore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_single_database.go b/services/sqlserverflex/model_single_database.go index 24cc02f03..38dd8ce16 100644 --- a/services/sqlserverflex/model_single_database.go +++ b/services/sqlserverflex/model_single_database.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the SingleDatabase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SingleDatabase{} + // SingleDatabase struct for SingleDatabase type SingleDatabase struct { // Database id @@ -18,3 +25,166 @@ type SingleDatabase struct { Name *string `json:"name,omitempty"` Options *SingleDatabaseOptions `json:"options,omitempty"` } + +// NewSingleDatabase instantiates a new SingleDatabase 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 NewSingleDatabase() *SingleDatabase { + this := SingleDatabase{} + return &this +} + +// NewSingleDatabaseWithDefaults instantiates a new SingleDatabase 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 NewSingleDatabaseWithDefaults() *SingleDatabase { + this := SingleDatabase{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SingleDatabase) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *SingleDatabase) GetIdOk() (*string, 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 *SingleDatabase) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SingleDatabase) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SingleDatabase) 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 if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleDatabase) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SingleDatabase) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SingleDatabase) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *SingleDatabase) GetOptions() *SingleDatabaseOptions { + if o == nil || IsNil(o.Options) { + var ret *SingleDatabaseOptions + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleDatabase) GetOptionsOk() (*SingleDatabaseOptions, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *SingleDatabase) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given SingleDatabaseOptions and assigns it to the Options field. +func (o *SingleDatabase) SetOptions(v *SingleDatabaseOptions) { + o.Options = v +} + +func (o SingleDatabase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + return toSerialize, nil +} + +type NullableSingleDatabase struct { + value *SingleDatabase + isSet bool +} + +func (v NullableSingleDatabase) Get() *SingleDatabase { + return v.value +} + +func (v *NullableSingleDatabase) Set(val *SingleDatabase) { + v.value = val + v.isSet = true +} + +func (v NullableSingleDatabase) IsSet() bool { + return v.isSet +} + +func (v *NullableSingleDatabase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSingleDatabase(val *SingleDatabase) *NullableSingleDatabase { + return &NullableSingleDatabase{value: val, isSet: true} +} + +func (v NullableSingleDatabase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSingleDatabase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_single_database_options.go b/services/sqlserverflex/model_single_database_options.go index 6e569fe6a..e29473c88 100644 --- a/services/sqlserverflex/model_single_database_options.go +++ b/services/sqlserverflex/model_single_database_options.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the SingleDatabaseOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SingleDatabaseOptions{} + // SingleDatabaseOptions Database specific options type SingleDatabaseOptions struct { // Name of the collation of the database @@ -19,3 +26,166 @@ type SingleDatabaseOptions struct { // Name of the owner of the database. Owner *string `json:"owner,omitempty"` } + +// NewSingleDatabaseOptions instantiates a new SingleDatabaseOptions 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 NewSingleDatabaseOptions() *SingleDatabaseOptions { + this := SingleDatabaseOptions{} + return &this +} + +// NewSingleDatabaseOptionsWithDefaults instantiates a new SingleDatabaseOptions 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 NewSingleDatabaseOptionsWithDefaults() *SingleDatabaseOptions { + this := SingleDatabaseOptions{} + return &this +} + +// GetCollationName returns the CollationName field value if set, zero value otherwise. +func (o *SingleDatabaseOptions) GetCollationName() *string { + if o == nil || IsNil(o.CollationName) { + var ret *string + return ret + } + return o.CollationName +} + +// GetCollationNameOk returns a tuple with the CollationName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleDatabaseOptions) GetCollationNameOk() (*string, bool) { + if o == nil || IsNil(o.CollationName) { + return nil, false + } + return o.CollationName, true +} + +// HasCollationName returns a boolean if a field has been set. +func (o *SingleDatabaseOptions) HasCollationName() bool { + if o != nil && !IsNil(o.CollationName) { + return true + } + + return false +} + +// SetCollationName gets a reference to the given string and assigns it to the CollationName field. +func (o *SingleDatabaseOptions) SetCollationName(v *string) { + o.CollationName = v +} + +// GetCompatibilityLevel returns the CompatibilityLevel field value if set, zero value otherwise. +func (o *SingleDatabaseOptions) GetCompatibilityLevel() *int64 { + if o == nil || IsNil(o.CompatibilityLevel) { + var ret *int64 + return ret + } + return o.CompatibilityLevel +} + +// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleDatabaseOptions) GetCompatibilityLevelOk() (*int64, bool) { + if o == nil || IsNil(o.CompatibilityLevel) { + return nil, false + } + return o.CompatibilityLevel, true +} + +// HasCompatibilityLevel returns a boolean if a field has been set. +func (o *SingleDatabaseOptions) HasCompatibilityLevel() bool { + if o != nil && !IsNil(o.CompatibilityLevel) { + return true + } + + return false +} + +// SetCompatibilityLevel gets a reference to the given int64 and assigns it to the CompatibilityLevel field. +func (o *SingleDatabaseOptions) SetCompatibilityLevel(v *int64) { + o.CompatibilityLevel = v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *SingleDatabaseOptions) GetOwner() *string { + if o == nil || IsNil(o.Owner) { + var ret *string + return ret + } + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleDatabaseOptions) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *SingleDatabaseOptions) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *SingleDatabaseOptions) SetOwner(v *string) { + o.Owner = v +} + +func (o SingleDatabaseOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CollationName) { + toSerialize["collationName"] = o.CollationName + } + if !IsNil(o.CompatibilityLevel) { + toSerialize["compatibilityLevel"] = o.CompatibilityLevel + } + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + return toSerialize, nil +} + +type NullableSingleDatabaseOptions struct { + value *SingleDatabaseOptions + isSet bool +} + +func (v NullableSingleDatabaseOptions) Get() *SingleDatabaseOptions { + return v.value +} + +func (v *NullableSingleDatabaseOptions) Set(val *SingleDatabaseOptions) { + v.value = val + v.isSet = true +} + +func (v NullableSingleDatabaseOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableSingleDatabaseOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSingleDatabaseOptions(val *SingleDatabaseOptions) *NullableSingleDatabaseOptions { + return &NullableSingleDatabaseOptions{value: val, isSet: true} +} + +func (v NullableSingleDatabaseOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSingleDatabaseOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_single_user.go b/services/sqlserverflex/model_single_user.go index b83066747..a058298f0 100644 --- a/services/sqlserverflex/model_single_user.go +++ b/services/sqlserverflex/model_single_user.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the SingleUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SingleUser{} + // SingleUser struct for SingleUser type SingleUser struct { DefaultDatabase *string `json:"default_database,omitempty"` @@ -21,3 +28,341 @@ type SingleUser struct { Uri *string `json:"uri,omitempty"` Username *string `json:"username,omitempty"` } + +// NewSingleUser instantiates a new SingleUser 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 NewSingleUser() *SingleUser { + this := SingleUser{} + return &this +} + +// NewSingleUserWithDefaults instantiates a new SingleUser 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 NewSingleUserWithDefaults() *SingleUser { + this := SingleUser{} + return &this +} + +// GetDefaultDatabase returns the DefaultDatabase field value if set, zero value otherwise. +func (o *SingleUser) GetDefaultDatabase() *string { + if o == nil || IsNil(o.DefaultDatabase) { + var ret *string + return ret + } + return o.DefaultDatabase +} + +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleUser) GetDefaultDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.DefaultDatabase) { + return nil, false + } + return o.DefaultDatabase, true +} + +// HasDefaultDatabase returns a boolean if a field has been set. +func (o *SingleUser) HasDefaultDatabase() bool { + if o != nil && !IsNil(o.DefaultDatabase) { + return true + } + + return false +} + +// SetDefaultDatabase gets a reference to the given string and assigns it to the DefaultDatabase field. +func (o *SingleUser) SetDefaultDatabase(v *string) { + o.DefaultDatabase = v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *SingleUser) GetHost() *string { + if o == nil || IsNil(o.Host) { + var ret *string + return ret + } + return o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleUser) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *SingleUser) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *SingleUser) SetHost(v *string) { + o.Host = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SingleUser) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *SingleUser) GetIdOk() (*string, 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 *SingleUser) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SingleUser) SetId(v *string) { + o.Id = v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *SingleUser) GetPassword() *string { + if o == nil || IsNil(o.Password) { + var ret *string + return ret + } + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleUser) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *SingleUser) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *SingleUser) SetPassword(v *string) { + o.Password = v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *SingleUser) GetPort() *int64 { + if o == nil || IsNil(o.Port) { + var ret *int64 + return ret + } + return o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleUser) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *SingleUser) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *SingleUser) SetPort(v *int64) { + o.Port = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *SingleUser) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleUser) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *SingleUser) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *SingleUser) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *SingleUser) GetUri() *string { + if o == nil || IsNil(o.Uri) { + var ret *string + return ret + } + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleUser) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *SingleUser) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *SingleUser) SetUri(v *string) { + o.Uri = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *SingleUser) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SingleUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *SingleUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *SingleUser) SetUsername(v *string) { + o.Username = v +} + +func (o SingleUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultDatabase) { + toSerialize["default_database"] = o.DefaultDatabase + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableSingleUser struct { + value *SingleUser + isSet bool +} + +func (v NullableSingleUser) Get() *SingleUser { + return v.value +} + +func (v *NullableSingleUser) Set(val *SingleUser) { + v.value = val + v.isSet = true +} + +func (v NullableSingleUser) IsSet() bool { + return v.isSet +} + +func (v *NullableSingleUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSingleUser(val *SingleUser) *NullableSingleUser { + return &NullableSingleUser{value: val, isSet: true} +} + +func (v NullableSingleUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSingleUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_storage.go b/services/sqlserverflex/model_storage.go index 19166a04e..e9c4eafe5 100644 --- a/services/sqlserverflex/model_storage.go +++ b/services/sqlserverflex/model_storage.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the Storage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Storage{} + // Storage struct for Storage type Storage struct { Class *string `json:"class,omitempty"` Size *int64 `json:"size,omitempty"` } + +// NewStorage instantiates a new Storage 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 NewStorage() *Storage { + this := Storage{} + return &this +} + +// NewStorageWithDefaults instantiates a new Storage 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 NewStorageWithDefaults() *Storage { + this := Storage{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *Storage) GetClass() *string { + if o == nil || IsNil(o.Class) { + var ret *string + return ret + } + return o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Storage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Storage) SetClass(v *string) { + o.Class = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Storage) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Storage) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Storage) SetSize(v *int64) { + o.Size = v +} + +func (o Storage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableStorage struct { + value *Storage + isSet bool +} + +func (v NullableStorage) Get() *Storage { + return v.value +} + +func (v *NullableStorage) Set(val *Storage) { + v.value = val + v.isSet = true +} + +func (v NullableStorage) IsSet() bool { + return v.isSet +} + +func (v *NullableStorage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorage(val *Storage) *NullableStorage { + return &NullableStorage{value: val, isSet: true} +} + +func (v NullableStorage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_storage_range.go b/services/sqlserverflex/model_storage_range.go index 488ec7e8d..5c896808b 100644 --- a/services/sqlserverflex/model_storage_range.go +++ b/services/sqlserverflex/model_storage_range.go @@ -10,8 +10,143 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the StorageRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageRange{} + // StorageRange struct for StorageRange type StorageRange struct { Max *int64 `json:"max,omitempty"` Min *int64 `json:"min,omitempty"` } + +// NewStorageRange instantiates a new StorageRange 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 NewStorageRange() *StorageRange { + this := StorageRange{} + return &this +} + +// NewStorageRangeWithDefaults instantiates a new StorageRange 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 NewStorageRangeWithDefaults() *StorageRange { + this := StorageRange{} + return &this +} + +// GetMax returns the Max field value if set, zero value otherwise. +func (o *StorageRange) GetMax() *int64 { + if o == nil || IsNil(o.Max) { + var ret *int64 + return ret + } + return o.Max +} + +// GetMaxOk returns a tuple with the Max field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMaxOk() (*int64, bool) { + if o == nil || IsNil(o.Max) { + return nil, false + } + return o.Max, true +} + +// HasMax returns a boolean if a field has been set. +func (o *StorageRange) HasMax() bool { + if o != nil && !IsNil(o.Max) { + return true + } + + return false +} + +// SetMax gets a reference to the given int64 and assigns it to the Max field. +func (o *StorageRange) SetMax(v *int64) { + o.Max = v +} + +// GetMin returns the Min field value if set, zero value otherwise. +func (o *StorageRange) GetMin() *int64 { + if o == nil || IsNil(o.Min) { + var ret *int64 + return ret + } + return o.Min +} + +// GetMinOk returns a tuple with the Min field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMinOk() (*int64, bool) { + if o == nil || IsNil(o.Min) { + return nil, false + } + return o.Min, true +} + +// HasMin returns a boolean if a field has been set. +func (o *StorageRange) HasMin() bool { + if o != nil && !IsNil(o.Min) { + return true + } + + return false +} + +// SetMin gets a reference to the given int64 and assigns it to the Min field. +func (o *StorageRange) SetMin(v *int64) { + o.Min = v +} + +func (o StorageRange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Max) { + toSerialize["max"] = o.Max + } + if !IsNil(o.Min) { + toSerialize["min"] = o.Min + } + return toSerialize, nil +} + +type NullableStorageRange struct { + value *StorageRange + isSet bool +} + +func (v NullableStorageRange) Get() *StorageRange { + return v.value +} + +func (v *NullableStorageRange) Set(val *StorageRange) { + v.value = val + v.isSet = true +} + +func (v NullableStorageRange) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageRange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageRange(val *StorageRange) *NullableStorageRange { + return &NullableStorageRange{value: val, isSet: true} +} + +func (v NullableStorageRange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageRange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_trigger_database_restore_payload.go b/services/sqlserverflex/model_trigger_database_restore_payload.go index d5b9a705b..d26710b0c 100644 --- a/services/sqlserverflex/model_trigger_database_restore_payload.go +++ b/services/sqlserverflex/model_trigger_database_restore_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the TriggerDatabaseRestorePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TriggerDatabaseRestorePayload{} + // TriggerDatabaseRestorePayload struct for TriggerDatabaseRestorePayload type TriggerDatabaseRestorePayload struct { // Name for the restored database no overwrite allowed at the moment @@ -19,3 +26,115 @@ type TriggerDatabaseRestorePayload struct { // REQUIRED RestoreDateTime *string `json:"restoreDateTime"` } + +type _TriggerDatabaseRestorePayload TriggerDatabaseRestorePayload + +// NewTriggerDatabaseRestorePayload instantiates a new TriggerDatabaseRestorePayload 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 NewTriggerDatabaseRestorePayload(name *string, restoreDateTime *string) *TriggerDatabaseRestorePayload { + this := TriggerDatabaseRestorePayload{} + this.Name = name + this.RestoreDateTime = restoreDateTime + return &this +} + +// NewTriggerDatabaseRestorePayloadWithDefaults instantiates a new TriggerDatabaseRestorePayload 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 NewTriggerDatabaseRestorePayloadWithDefaults() *TriggerDatabaseRestorePayload { + this := TriggerDatabaseRestorePayload{} + return &this +} + +// GetName returns the Name field value +func (o *TriggerDatabaseRestorePayload) GetName() *string { + if o == nil { + 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 *TriggerDatabaseRestorePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *TriggerDatabaseRestorePayload) SetName(v *string) { + o.Name = v +} + +// GetRestoreDateTime returns the RestoreDateTime field value +func (o *TriggerDatabaseRestorePayload) GetRestoreDateTime() *string { + if o == nil { + var ret *string + return ret + } + + return o.RestoreDateTime +} + +// GetRestoreDateTimeOk returns a tuple with the RestoreDateTime field value +// and a boolean to check if the value has been set. +func (o *TriggerDatabaseRestorePayload) GetRestoreDateTimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.RestoreDateTime, true +} + +// SetRestoreDateTime sets field value +func (o *TriggerDatabaseRestorePayload) SetRestoreDateTime(v *string) { + o.RestoreDateTime = v +} + +func (o TriggerDatabaseRestorePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["restoreDateTime"] = o.RestoreDateTime + return toSerialize, nil +} + +type NullableTriggerDatabaseRestorePayload struct { + value *TriggerDatabaseRestorePayload + isSet bool +} + +func (v NullableTriggerDatabaseRestorePayload) Get() *TriggerDatabaseRestorePayload { + return v.value +} + +func (v *NullableTriggerDatabaseRestorePayload) Set(val *TriggerDatabaseRestorePayload) { + v.value = val + v.isSet = true +} + +func (v NullableTriggerDatabaseRestorePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableTriggerDatabaseRestorePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTriggerDatabaseRestorePayload(val *TriggerDatabaseRestorePayload) *NullableTriggerDatabaseRestorePayload { + return &NullableTriggerDatabaseRestorePayload{value: val, isSet: true} +} + +func (v NullableTriggerDatabaseRestorePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTriggerDatabaseRestorePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_update_instance_payload.go b/services/sqlserverflex/model_update_instance_payload.go index 7660427b9..50731c576 100644 --- a/services/sqlserverflex/model_update_instance_payload.go +++ b/services/sqlserverflex/model_update_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + // UpdateInstancePayload struct for UpdateInstancePayload type UpdateInstancePayload struct { // REQUIRED @@ -29,3 +36,221 @@ type UpdateInstancePayload struct { // REQUIRED Version *string `json:"version"` } + +type _UpdateInstancePayload UpdateInstancePayload + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload(acl *CreateInstancePayloadAcl, backupSchedule *string, flavorId *string, labels *map[string]interface{}, name *string, version *string) *UpdateInstancePayload { + this := UpdateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Labels = labels + this.Name = name + this.Version = version + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + var version string = "2022" + this.Version = &version + return &this +} + +// GetAcl returns the Acl field value +func (o *UpdateInstancePayload) GetAcl() *CreateInstancePayloadAcl { + if o == nil { + var ret *CreateInstancePayloadAcl + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetAclOk() (*CreateInstancePayloadAcl, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *UpdateInstancePayload) SetAcl(v *CreateInstancePayloadAcl) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *UpdateInstancePayload) GetBackupSchedule() *string { + if o == nil { + var ret *string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *UpdateInstancePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *UpdateInstancePayload) GetFlavorId() *string { + if o == nil { + var ret *string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *UpdateInstancePayload) SetFlavorId(v *string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value +func (o *UpdateInstancePayload) GetLabels() *map[string]interface{} { + if o == nil { + var ret *map[string]interface{} + return ret + } + + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetLabelsOk() (*map[string]interface{}, bool) { + if o == nil { + return &map[string]interface{}{}, false + } + return o.Labels, true +} + +// SetLabels sets field value +func (o *UpdateInstancePayload) SetLabels(v *map[string]interface{}) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *UpdateInstancePayload) GetName() *string { + if o == nil { + 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 *UpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *UpdateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetVersion returns the Version field value +func (o *UpdateInstancePayload) GetVersion() *string { + if o == nil { + var ret *string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version, true +} + +// SetVersion sets field value +func (o *UpdateInstancePayload) SetVersion(v *string) { + o.Version = v +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + toSerialize["labels"] = o.Labels + toSerialize["name"] = o.Name + toSerialize["version"] = o.Version + return toSerialize, nil +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_update_instance_response.go b/services/sqlserverflex/model_update_instance_response.go index 0469040b3..05036dd73 100644 --- a/services/sqlserverflex/model_update_instance_response.go +++ b/services/sqlserverflex/model_update_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the UpdateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceResponse{} + // UpdateInstanceResponse struct for UpdateInstanceResponse type UpdateInstanceResponse struct { Item *Instance `json:"item,omitempty"` } + +// NewUpdateInstanceResponse instantiates a new UpdateInstanceResponse 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 NewUpdateInstanceResponse() *UpdateInstanceResponse { + this := UpdateInstanceResponse{} + return &this +} + +// NewUpdateInstanceResponseWithDefaults instantiates a new UpdateInstanceResponse 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 NewUpdateInstanceResponseWithDefaults() *UpdateInstanceResponse { + this := UpdateInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *UpdateInstanceResponse) GetItem() *Instance { + if o == nil || IsNil(o.Item) { + var ret *Instance + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *UpdateInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *UpdateInstanceResponse) SetItem(v *Instance) { + o.Item = v +} + +func (o UpdateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableUpdateInstanceResponse struct { + value *UpdateInstanceResponse + isSet bool +} + +func (v NullableUpdateInstanceResponse) Get() *UpdateInstanceResponse { + return v.value +} + +func (v *NullableUpdateInstanceResponse) Set(val *UpdateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstanceResponse(val *UpdateInstanceResponse) *NullableUpdateInstanceResponse { + return &NullableUpdateInstanceResponse{value: val, isSet: true} +} + +func (v NullableUpdateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_user.go b/services/sqlserverflex/model_user.go index fa1bb99b6..6fa459c10 100644 --- a/services/sqlserverflex/model_user.go +++ b/services/sqlserverflex/model_user.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + // User struct for User type User struct { Database *string `json:"database,omitempty"` @@ -21,3 +28,341 @@ type User struct { Uri *string `json:"uri,omitempty"` Username *string `json:"username,omitempty"` } + +// NewUser instantiates a new User 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 NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *User) GetDatabase() *string { + if o == nil || IsNil(o.Database) { + var ret *string + return ret + } + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *User) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *User) SetDatabase(v *string) { + o.Database = v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *User) GetHost() *string { + if o == nil || IsNil(o.Host) { + var ret *string + return ret + } + return o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *User) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *User) SetHost(v *string) { + o.Host = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *User) GetIdOk() (*string, 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 *User) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *User) SetId(v *string) { + o.Id = v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *User) GetPassword() *string { + if o == nil || IsNil(o.Password) { + var ret *string + return ret + } + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v *string) { + o.Password = v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *User) GetPort() *int64 { + if o == nil || IsNil(o.Port) { + var ret *int64 + return ret + } + return o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *User) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *User) SetPort(v *int64) { + o.Port = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *User) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *User) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *User) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *User) GetUri() *string { + if o == nil || IsNil(o.Uri) { + var ret *string + return ret + } + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *User) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *User) SetUri(v *string) { + o.Uri = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *User) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v *string) { + o.Username = v +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_user_response_user.go b/services/sqlserverflex/model_user_response_user.go index c8846c98a..6d53b2e80 100644 --- a/services/sqlserverflex/model_user_response_user.go +++ b/services/sqlserverflex/model_user_response_user.go @@ -10,6 +10,13 @@ API version: 1.0.0 package sqlserverflex +import ( + "encoding/json" +) + +// checks if the UserResponseUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserResponseUser{} + // UserResponseUser struct for UserResponseUser type UserResponseUser struct { DefaultDatabase *string `json:"default_database,omitempty"` @@ -19,3 +26,271 @@ type UserResponseUser struct { Roles *[]string `json:"roles,omitempty"` Username *string `json:"username,omitempty"` } + +// NewUserResponseUser instantiates a new UserResponseUser 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 NewUserResponseUser() *UserResponseUser { + this := UserResponseUser{} + return &this +} + +// NewUserResponseUserWithDefaults instantiates a new UserResponseUser 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 NewUserResponseUserWithDefaults() *UserResponseUser { + this := UserResponseUser{} + return &this +} + +// GetDefaultDatabase returns the DefaultDatabase field value if set, zero value otherwise. +func (o *UserResponseUser) GetDefaultDatabase() *string { + if o == nil || IsNil(o.DefaultDatabase) { + var ret *string + return ret + } + return o.DefaultDatabase +} + +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponseUser) GetDefaultDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.DefaultDatabase) { + return nil, false + } + return o.DefaultDatabase, true +} + +// HasDefaultDatabase returns a boolean if a field has been set. +func (o *UserResponseUser) HasDefaultDatabase() bool { + if o != nil && !IsNil(o.DefaultDatabase) { + return true + } + + return false +} + +// SetDefaultDatabase gets a reference to the given string and assigns it to the DefaultDatabase field. +func (o *UserResponseUser) SetDefaultDatabase(v *string) { + o.DefaultDatabase = v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *UserResponseUser) GetHost() *string { + if o == nil || IsNil(o.Host) { + var ret *string + return ret + } + return o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponseUser) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *UserResponseUser) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *UserResponseUser) SetHost(v *string) { + o.Host = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UserResponseUser) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + 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 *UserResponseUser) GetIdOk() (*string, 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 *UserResponseUser) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UserResponseUser) SetId(v *string) { + o.Id = v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *UserResponseUser) GetPort() *int64 { + if o == nil || IsNil(o.Port) { + var ret *int64 + return ret + } + return o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponseUser) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *UserResponseUser) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *UserResponseUser) SetPort(v *int64) { + o.Port = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *UserResponseUser) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponseUser) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *UserResponseUser) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *UserResponseUser) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UserResponseUser) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponseUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UserResponseUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UserResponseUser) SetUsername(v *string) { + o.Username = v +} + +func (o UserResponseUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultDatabase) { + toSerialize["default_database"] = o.DefaultDatabase + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUserResponseUser struct { + value *UserResponseUser + isSet bool +} + +func (v NullableUserResponseUser) Get() *UserResponseUser { + return v.value +} + +func (v *NullableUserResponseUser) Set(val *UserResponseUser) { + v.value = val + v.isSet = true +} + +func (v NullableUserResponseUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUserResponseUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserResponseUser(val *UserResponseUser) *NullableUserResponseUser { + return &NullableUserResponseUser{value: val, isSet: true} +} + +func (v NullableUserResponseUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserResponseUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}