diff --git a/services/mongodbflex/CHANGELOG.md b/services/mongodbflex/CHANGELOG.md index 3fce7c8e..224bb2f3 100644 --- a/services/mongodbflex/CHANGELOG.md +++ b/services/mongodbflex/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.16.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.15.0 (2024-09-02) - **Feature**: New method `ListAdvisorSlowQueries` that gets slow queries from the Opsmanager performance advisor. diff --git a/services/mongodbflex/model_acl.go b/services/mongodbflex/model_acl.go index bd7c563e..a3317926 100644 --- a/services/mongodbflex/model_acl.go +++ b/services/mongodbflex/model_acl.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_backup.go b/services/mongodbflex/model_backup.go index d396b5df..4afa30ab 100644 --- a/services/mongodbflex/model_backup.go +++ b/services/mongodbflex/model_backup.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_backup_schedule.go b/services/mongodbflex/model_backup_schedule.go index f4bb1565..eee12a95 100644 --- a/services/mongodbflex/model_backup_schedule.go +++ b/services/mongodbflex/model_backup_schedule.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the BackupSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BackupSchedule{} + // BackupSchedule struct for BackupSchedule type BackupSchedule struct { BackupSchedule *string `json:"backupSchedule,omitempty"` @@ -19,3 +26,271 @@ type BackupSchedule struct { SnapshotRetentionDays *int64 `json:"snapshotRetentionDays,omitempty"` WeeklySnapshotRetentionWeeks *int64 `json:"weeklySnapshotRetentionWeeks,omitempty"` } + +// NewBackupSchedule instantiates a new BackupSchedule 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 NewBackupSchedule() *BackupSchedule { + this := BackupSchedule{} + return &this +} + +// NewBackupScheduleWithDefaults instantiates a new BackupSchedule 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 NewBackupScheduleWithDefaults() *BackupSchedule { + this := BackupSchedule{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *BackupSchedule) 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 *BackupSchedule) 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 *BackupSchedule) 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 *BackupSchedule) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. +func (o *BackupSchedule) GetDailySnapshotRetentionDays() *int64 { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + var ret *int64 + return ret + } + return o.DailySnapshotRetentionDays +} + +// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetDailySnapshotRetentionDaysOk() (*int64, bool) { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + return nil, false + } + return o.DailySnapshotRetentionDays, true +} + +// HasDailySnapshotRetentionDays returns a boolean if a field has been set. +func (o *BackupSchedule) HasDailySnapshotRetentionDays() bool { + if o != nil && !IsNil(o.DailySnapshotRetentionDays) { + return true + } + + return false +} + +// SetDailySnapshotRetentionDays gets a reference to the given int64 and assigns it to the DailySnapshotRetentionDays field. +func (o *BackupSchedule) SetDailySnapshotRetentionDays(v *int64) { + o.DailySnapshotRetentionDays = v +} + +// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. +func (o *BackupSchedule) GetMonthlySnapshotRetentionMonths() *int64 { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + var ret *int64 + return ret + } + return o.MonthlySnapshotRetentionMonths +} + +// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetMonthlySnapshotRetentionMonthsOk() (*int64, bool) { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + return nil, false + } + return o.MonthlySnapshotRetentionMonths, true +} + +// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. +func (o *BackupSchedule) HasMonthlySnapshotRetentionMonths() bool { + if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { + return true + } + + return false +} + +// SetMonthlySnapshotRetentionMonths gets a reference to the given int64 and assigns it to the MonthlySnapshotRetentionMonths field. +func (o *BackupSchedule) SetMonthlySnapshotRetentionMonths(v *int64) { + o.MonthlySnapshotRetentionMonths = v +} + +// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. +func (o *BackupSchedule) GetPointInTimeWindowHours() *int64 { + if o == nil || IsNil(o.PointInTimeWindowHours) { + var ret *int64 + return ret + } + return o.PointInTimeWindowHours +} + +// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetPointInTimeWindowHoursOk() (*int64, bool) { + if o == nil || IsNil(o.PointInTimeWindowHours) { + return nil, false + } + return o.PointInTimeWindowHours, true +} + +// HasPointInTimeWindowHours returns a boolean if a field has been set. +func (o *BackupSchedule) HasPointInTimeWindowHours() bool { + if o != nil && !IsNil(o.PointInTimeWindowHours) { + return true + } + + return false +} + +// SetPointInTimeWindowHours gets a reference to the given int64 and assigns it to the PointInTimeWindowHours field. +func (o *BackupSchedule) SetPointInTimeWindowHours(v *int64) { + o.PointInTimeWindowHours = v +} + +// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. +func (o *BackupSchedule) GetSnapshotRetentionDays() *int64 { + if o == nil || IsNil(o.SnapshotRetentionDays) { + var ret *int64 + return ret + } + return o.SnapshotRetentionDays +} + +// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetSnapshotRetentionDaysOk() (*int64, bool) { + if o == nil || IsNil(o.SnapshotRetentionDays) { + return nil, false + } + return o.SnapshotRetentionDays, true +} + +// HasSnapshotRetentionDays returns a boolean if a field has been set. +func (o *BackupSchedule) HasSnapshotRetentionDays() bool { + if o != nil && !IsNil(o.SnapshotRetentionDays) { + return true + } + + return false +} + +// SetSnapshotRetentionDays gets a reference to the given int64 and assigns it to the SnapshotRetentionDays field. +func (o *BackupSchedule) SetSnapshotRetentionDays(v *int64) { + o.SnapshotRetentionDays = v +} + +// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. +func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeks() *int64 { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + var ret *int64 + return ret + } + return o.WeeklySnapshotRetentionWeeks +} + +// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeksOk() (*int64, bool) { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + return nil, false + } + return o.WeeklySnapshotRetentionWeeks, true +} + +// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. +func (o *BackupSchedule) HasWeeklySnapshotRetentionWeeks() bool { + if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { + return true + } + + return false +} + +// SetWeeklySnapshotRetentionWeeks gets a reference to the given int64 and assigns it to the WeeklySnapshotRetentionWeeks field. +func (o *BackupSchedule) SetWeeklySnapshotRetentionWeeks(v *int64) { + o.WeeklySnapshotRetentionWeeks = v +} + +func (o BackupSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.DailySnapshotRetentionDays) { + toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays + } + if !IsNil(o.MonthlySnapshotRetentionMonths) { + toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths + } + if !IsNil(o.PointInTimeWindowHours) { + toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours + } + if !IsNil(o.SnapshotRetentionDays) { + toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays + } + if !IsNil(o.WeeklySnapshotRetentionWeeks) { + toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks + } + return toSerialize, nil +} + +type NullableBackupSchedule struct { + value *BackupSchedule + isSet bool +} + +func (v NullableBackupSchedule) Get() *BackupSchedule { + return v.value +} + +func (v *NullableBackupSchedule) Set(val *BackupSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableBackupSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableBackupSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackupSchedule(val *BackupSchedule) *NullableBackupSchedule { + return &NullableBackupSchedule{value: val, isSet: true} +} + +func (v NullableBackupSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackupSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_clone_instance_payload.go b/services/mongodbflex/model_clone_instance_payload.go index 63f084b0..4f6784f9 100644 --- a/services/mongodbflex/model_clone_instance_payload.go +++ b/services/mongodbflex/model_clone_instance_payload.go @@ -10,9 +10,137 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the CloneInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstancePayload{} + // CloneInstancePayload struct for CloneInstancePayload type CloneInstancePayload struct { // REQUIRED InstanceId *string `json:"instanceId"` Timestamp *string `json:"timestamp,omitempty"` } + +type _CloneInstancePayload CloneInstancePayload + +// NewCloneInstancePayload instantiates a new CloneInstancePayload 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 NewCloneInstancePayload(instanceId *string) *CloneInstancePayload { + this := CloneInstancePayload{} + this.InstanceId = instanceId + return &this +} + +// NewCloneInstancePayloadWithDefaults instantiates a new CloneInstancePayload 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 NewCloneInstancePayloadWithDefaults() *CloneInstancePayload { + this := CloneInstancePayload{} + return &this +} + +// GetInstanceId returns the InstanceId field value +func (o *CloneInstancePayload) GetInstanceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *CloneInstancePayload) SetInstanceId(v *string) { + o.InstanceId = v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *CloneInstancePayload) GetTimestamp() *string { + if o == nil || IsNil(o.Timestamp) { + var ret *string + return ret + } + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *CloneInstancePayload) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *CloneInstancePayload) SetTimestamp(v *string) { + o.Timestamp = v +} + +func (o CloneInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["instanceId"] = o.InstanceId + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + return toSerialize, nil +} + +type NullableCloneInstancePayload struct { + value *CloneInstancePayload + isSet bool +} + +func (v NullableCloneInstancePayload) Get() *CloneInstancePayload { + return v.value +} + +func (v *NullableCloneInstancePayload) Set(val *CloneInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstancePayload(val *CloneInstancePayload) *NullableCloneInstancePayload { + return &NullableCloneInstancePayload{value: val, isSet: true} +} + +func (v NullableCloneInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_clone_instance_response.go b/services/mongodbflex/model_clone_instance_response.go index a9230884..d80fcf11 100644 --- a/services/mongodbflex/model_clone_instance_response.go +++ b/services/mongodbflex/model_clone_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the CloneInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstanceResponse{} + // CloneInstanceResponse struct for CloneInstanceResponse type CloneInstanceResponse struct { InstanceId *string `json:"instanceId,omitempty"` } + +// NewCloneInstanceResponse instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponse() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// NewCloneInstanceResponseWithDefaults instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponseWithDefaults() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// GetInstanceId returns the InstanceId field value if set, zero value otherwise. +func (o *CloneInstanceResponse) GetInstanceId() *string { + if o == nil || IsNil(o.InstanceId) { + var ret *string + return ret + } + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstanceResponse) GetInstanceIdOk() (*string, bool) { + if o == nil || IsNil(o.InstanceId) { + return nil, false + } + return o.InstanceId, true +} + +// HasInstanceId returns a boolean if a field has been set. +func (o *CloneInstanceResponse) HasInstanceId() bool { + if o != nil && !IsNil(o.InstanceId) { + return true + } + + return false +} + +// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +func (o *CloneInstanceResponse) SetInstanceId(v *string) { + o.InstanceId = v +} + +func (o CloneInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.InstanceId) { + toSerialize["instanceId"] = o.InstanceId + } + return toSerialize, nil +} + +type NullableCloneInstanceResponse struct { + value *CloneInstanceResponse + isSet bool +} + +func (v NullableCloneInstanceResponse) Get() *CloneInstanceResponse { + return v.value +} + +func (v *NullableCloneInstanceResponse) Set(val *CloneInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstanceResponse(val *CloneInstanceResponse) *NullableCloneInstanceResponse { + return &NullableCloneInstanceResponse{value: val, isSet: true} +} + +func (v NullableCloneInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_create_instance_payload.go b/services/mongodbflex/model_create_instance_payload.go index 69e94e6c..552cc007 100644 --- a/services/mongodbflex/model_create_instance_payload.go +++ b/services/mongodbflex/model_create_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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 { // REQUIRED @@ -31,3 +38,306 @@ type CreateInstancePayload struct { // REQUIRED Version *string `json:"version"` } + +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(acl *ACL, backupSchedule *string, flavorId *string, name *string, options *map[string]string, replicas *int64, storage *Storage, version *string) *CreateInstancePayload { + this := CreateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Options = options + this.Replicas = replicas + this.Storage = storage + 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{} + return &this +} + +// GetAcl returns the Acl field value +func (o *CreateInstancePayload) GetAcl() *ACL { + if o == nil { + var ret *ACL + 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 *CreateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *CreateInstancePayload) SetAcl(v *ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *CreateInstancePayload) 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 *CreateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +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]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]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 *CreateInstancePayload) GetLabelsOk() (*map[string]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 *CreateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateInstancePayload) SetLabels(v *map[string]string) { + 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 +func (o *CreateInstancePayload) GetOptions() *map[string]string { + if o == nil { + var ret *map[string]string + 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 *CreateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return o.Options, true +} + +// SetOptions sets field value +func (o *CreateInstancePayload) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value +func (o *CreateInstancePayload) GetReplicas() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetReplicasOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Replicas, true +} + +// SetReplicas sets field value +func (o *CreateInstancePayload) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStorage returns the Storage field value +func (o *CreateInstancePayload) GetStorage() *Storage { + if o == nil { + var ret *Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return o.Storage, true +} + +// SetStorage sets field value +func (o *CreateInstancePayload) SetStorage(v *Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *CreateInstancePayload) 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 *CreateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version, true +} + +// SetVersion sets field value +func (o *CreateInstancePayload) SetVersion(v *string) { + o.Version = v +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + toSerialize["replicas"] = o.Replicas + toSerialize["storage"] = o.Storage + 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/mongodbflex/model_create_instance_response.go b/services/mongodbflex/model_create_instance_response.go index 285e88ba..ac44dbdf 100644 --- a/services/mongodbflex/model_create_instance_response.go +++ b/services/mongodbflex/model_create_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_create_user_payload.go b/services/mongodbflex/model_create_user_payload.go index 57d73a8e..6a69edd1 100644 --- a/services/mongodbflex/model_create_user_payload.go +++ b/services/mongodbflex/model_create_user_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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 { // REQUIRED @@ -18,3 +25,150 @@ type CreateUserPayload struct { Roles *[]string `json:"roles"` Username *string `json:"username,omitempty"` } + +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(database *string, roles *[]string) *CreateUserPayload { + this := CreateUserPayload{} + this.Database = database + this.Roles = roles + 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 +} + +// GetDatabase returns the Database field value +func (o *CreateUserPayload) GetDatabase() *string { + if o == nil { + var ret *string + return ret + } + + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Database, true +} + +// SetDatabase sets field value +func (o *CreateUserPayload) SetDatabase(v *string) { + o.Database = 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 if set, zero value otherwise. +func (o *CreateUserPayload) 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 *CreateUserPayload) 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 *CreateUserPayload) 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 *CreateUserPayload) SetUsername(v *string) { + o.Username = v +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database"] = o.Database + toSerialize["roles"] = o.Roles + if !IsNil(o.Username) { + 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/mongodbflex/model_create_user_response.go b/services/mongodbflex/model_create_user_response.go index 33b1b134..741482aa 100644 --- a/services/mongodbflex/model_create_user_response.go +++ b/services/mongodbflex/model_create_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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 *User `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() *User { + if o == nil || IsNil(o.Item) { + var ret *User + 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() (*User, 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 User and assigns it to the Item field. +func (o *CreateUserResponse) SetItem(v *User) { + 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/mongodbflex/model_data_point.go b/services/mongodbflex/model_data_point.go index 51ace599..536464ba 100644 --- a/services/mongodbflex/model_data_point.go +++ b/services/mongodbflex/model_data_point.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the DataPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataPoint{} + // DataPoint struct for DataPoint type DataPoint struct { Timestamp *string `json:"timestamp,omitempty"` Value *float64 `json:"value,omitempty"` } + +// NewDataPoint instantiates a new DataPoint 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 NewDataPoint() *DataPoint { + this := DataPoint{} + return &this +} + +// NewDataPointWithDefaults instantiates a new DataPoint 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 NewDataPointWithDefaults() *DataPoint { + this := DataPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *DataPoint) GetTimestamp() *string { + if o == nil || IsNil(o.Timestamp) { + var ret *string + return ret + } + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataPoint) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *DataPoint) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *DataPoint) SetTimestamp(v *string) { + o.Timestamp = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DataPoint) GetValue() *float64 { + if o == nil || IsNil(o.Value) { + var ret *float64 + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataPoint) GetValueOk() (*float64, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DataPoint) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *DataPoint) SetValue(v *float64) { + o.Value = v +} + +func (o DataPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableDataPoint struct { + value *DataPoint + isSet bool +} + +func (v NullableDataPoint) Get() *DataPoint { + return v.value +} + +func (v *NullableDataPoint) Set(val *DataPoint) { + v.value = val + v.isSet = true +} + +func (v NullableDataPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableDataPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataPoint(val *DataPoint) *NullableDataPoint { + return &NullableDataPoint{value: val, isSet: true} +} + +func (v NullableDataPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_error.go b/services/mongodbflex/model_error.go index a80570fb..52512138 100644 --- a/services/mongodbflex/model_error.go +++ b/services/mongodbflex/model_error.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + // Error struct for Error type Error struct { Code *int64 `json:"code,omitempty"` @@ -17,3 +24,201 @@ type Error struct { Message *string `json:"message,omitempty"` Type *string `json:"type,omitempty"` } + +// NewError instantiates a new Error 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 NewError() *Error { + this := Error{} + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *Error) SetCode(v *int64) { + o.Code = v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *Error) SetFields(v *map[string][]string) { + o.Fields = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *Error) SetMessage(v *string) { + o.Message = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Error) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + 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 *Error) GetTypeOk() (*string, 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 *Error) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Error) SetType(v *string) { + o.Type = v +} + +func (o Error) 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 NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_flavor.go b/services/mongodbflex/model_flavor.go index 7cbe4b31..ab91dadd 100644 --- a/services/mongodbflex/model_flavor.go +++ b/services/mongodbflex/model_flavor.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_get_backup_response.go b/services/mongodbflex/model_get_backup_response.go index c3d555db..98aa1808 100644 --- a/services/mongodbflex/model_get_backup_response.go +++ b/services/mongodbflex/model_get_backup_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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 { Item *Backup `json:"item,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 +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetBackupResponse) GetItem() *Backup { + if o == nil || IsNil(o.Item) { + var ret *Backup + 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 *GetBackupResponse) GetItemOk() (*Backup, 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 *GetBackupResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Backup and assigns it to the Item field. +func (o *GetBackupResponse) SetItem(v *Backup) { + o.Item = v +} + +func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + 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/mongodbflex/model_get_instance_response.go b/services/mongodbflex/model_get_instance_response.go index cde846cd..98b8cb44 100644 --- a/services/mongodbflex/model_get_instance_response.go +++ b/services/mongodbflex/model_get_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_get_user_response.go b/services/mongodbflex/model_get_user_response.go index 6b70288f..e618f985 100644 --- a/services/mongodbflex/model_get_user_response.go +++ b/services/mongodbflex/model_get_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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 *InstanceResponseUser `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() *InstanceResponseUser { + if o == nil || IsNil(o.Item) { + var ret *InstanceResponseUser + 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() (*InstanceResponseUser, 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 InstanceResponseUser and assigns it to the Item field. +func (o *GetUserResponse) SetItem(v *InstanceResponseUser) { + 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/mongodbflex/model_handlers_infra_flavor.go b/services/mongodbflex/model_handlers_infra_flavor.go index 7528c9c7..9a7240ac 100644 --- a/services/mongodbflex/model_handlers_infra_flavor.go +++ b/services/mongodbflex/model_handlers_infra_flavor.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the HandlersInfraFlavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInfraFlavor{} + // HandlersInfraFlavor struct for HandlersInfraFlavor type HandlersInfraFlavor struct { Categories *[]string `json:"categories,omitempty"` @@ -18,3 +25,236 @@ type HandlersInfraFlavor struct { Id *string `json:"id,omitempty"` Memory *int64 `json:"memory,omitempty"` } + +// NewHandlersInfraFlavor instantiates a new HandlersInfraFlavor 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 NewHandlersInfraFlavor() *HandlersInfraFlavor { + this := HandlersInfraFlavor{} + return &this +} + +// NewHandlersInfraFlavorWithDefaults instantiates a new HandlersInfraFlavor 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 NewHandlersInfraFlavorWithDefaults() *HandlersInfraFlavor { + this := HandlersInfraFlavor{} + return &this +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) SetCategories(v *[]string) { + o.Categories = v +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) SetCpu(v *int64) { + o.Cpu = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) SetId(v *string) { + o.Id = v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) SetMemory(v *int64) { + o.Memory = v +} + +func (o HandlersInfraFlavor) 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 NullableHandlersInfraFlavor struct { + value *HandlersInfraFlavor + isSet bool +} + +func (v NullableHandlersInfraFlavor) Get() *HandlersInfraFlavor { + return v.value +} + +func (v *NullableHandlersInfraFlavor) Set(val *HandlersInfraFlavor) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInfraFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInfraFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInfraFlavor(val *HandlersInfraFlavor) *NullableHandlersInfraFlavor { + return &NullableHandlersInfraFlavor{value: val, isSet: true} +} + +func (v NullableHandlersInfraFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInfraFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_handlers_infra_get_flavors_response.go b/services/mongodbflex/model_handlers_infra_get_flavors_response.go index c56ff751..aafa411b 100644 --- a/services/mongodbflex/model_handlers_infra_get_flavors_response.go +++ b/services/mongodbflex/model_handlers_infra_get_flavors_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the HandlersInfraGetFlavorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInfraGetFlavorsResponse{} + // HandlersInfraGetFlavorsResponse struct for HandlersInfraGetFlavorsResponse type HandlersInfraGetFlavorsResponse struct { Flavors *[]HandlersInfraFlavor `json:"flavors,omitempty"` } + +// NewHandlersInfraGetFlavorsResponse instantiates a new HandlersInfraGetFlavorsResponse 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 NewHandlersInfraGetFlavorsResponse() *HandlersInfraGetFlavorsResponse { + this := HandlersInfraGetFlavorsResponse{} + return &this +} + +// NewHandlersInfraGetFlavorsResponseWithDefaults instantiates a new HandlersInfraGetFlavorsResponse 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 NewHandlersInfraGetFlavorsResponseWithDefaults() *HandlersInfraGetFlavorsResponse { + this := HandlersInfraGetFlavorsResponse{} + return &this +} + +// GetFlavors returns the Flavors field value if set, zero value otherwise. +func (o *HandlersInfraGetFlavorsResponse) GetFlavors() *[]HandlersInfraFlavor { + if o == nil || IsNil(o.Flavors) { + var ret *[]HandlersInfraFlavor + 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 *HandlersInfraGetFlavorsResponse) GetFlavorsOk() (*[]HandlersInfraFlavor, 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 *HandlersInfraGetFlavorsResponse) HasFlavors() bool { + if o != nil && !IsNil(o.Flavors) { + return true + } + + return false +} + +// SetFlavors gets a reference to the given []HandlersInfraFlavor and assigns it to the Flavors field. +func (o *HandlersInfraGetFlavorsResponse) SetFlavors(v *[]HandlersInfraFlavor) { + o.Flavors = v +} + +func (o HandlersInfraGetFlavorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Flavors) { + toSerialize["flavors"] = o.Flavors + } + return toSerialize, nil +} + +type NullableHandlersInfraGetFlavorsResponse struct { + value *HandlersInfraGetFlavorsResponse + isSet bool +} + +func (v NullableHandlersInfraGetFlavorsResponse) Get() *HandlersInfraGetFlavorsResponse { + return v.value +} + +func (v *NullableHandlersInfraGetFlavorsResponse) Set(val *HandlersInfraGetFlavorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInfraGetFlavorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInfraGetFlavorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInfraGetFlavorsResponse(val *HandlersInfraGetFlavorsResponse) *NullableHandlersInfraGetFlavorsResponse { + return &NullableHandlersInfraGetFlavorsResponse{value: val, isSet: true} +} + +func (v NullableHandlersInfraGetFlavorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInfraGetFlavorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_handlers_instances_get_instance_response.go b/services/mongodbflex/model_handlers_instances_get_instance_response.go index 88fd64af..de049b13 100644 --- a/services/mongodbflex/model_handlers_instances_get_instance_response.go +++ b/services/mongodbflex/model_handlers_instances_get_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the HandlersInstancesGetInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesGetInstanceResponse{} + // HandlersInstancesGetInstanceResponse struct for HandlersInstancesGetInstanceResponse type HandlersInstancesGetInstanceResponse struct { Item *Instance `json:"item,omitempty"` } + +// NewHandlersInstancesGetInstanceResponse instantiates a new HandlersInstancesGetInstanceResponse 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 NewHandlersInstancesGetInstanceResponse() *HandlersInstancesGetInstanceResponse { + this := HandlersInstancesGetInstanceResponse{} + return &this +} + +// NewHandlersInstancesGetInstanceResponseWithDefaults instantiates a new HandlersInstancesGetInstanceResponse 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 NewHandlersInstancesGetInstanceResponseWithDefaults() *HandlersInstancesGetInstanceResponse { + this := HandlersInstancesGetInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *HandlersInstancesGetInstanceResponse) 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 *HandlersInstancesGetInstanceResponse) 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 *HandlersInstancesGetInstanceResponse) 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 *HandlersInstancesGetInstanceResponse) SetItem(v *Instance) { + o.Item = v +} + +func (o HandlersInstancesGetInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableHandlersInstancesGetInstanceResponse struct { + value *HandlersInstancesGetInstanceResponse + isSet bool +} + +func (v NullableHandlersInstancesGetInstanceResponse) Get() *HandlersInstancesGetInstanceResponse { + return v.value +} + +func (v *NullableHandlersInstancesGetInstanceResponse) Set(val *HandlersInstancesGetInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesGetInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesGetInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesGetInstanceResponse(val *HandlersInstancesGetInstanceResponse) *NullableHandlersInstancesGetInstanceResponse { + return &NullableHandlersInstancesGetInstanceResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesGetInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesGetInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_handlers_instances_slow_queries_response.go b/services/mongodbflex/model_handlers_instances_slow_queries_response.go index b0aea7bc..7c21fe6b 100644 --- a/services/mongodbflex/model_handlers_instances_slow_queries_response.go +++ b/services/mongodbflex/model_handlers_instances_slow_queries_response.go @@ -10,8 +10,108 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the HandlersInstancesSlowQueriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesSlowQueriesResponse{} + // HandlersInstancesSlowQueriesResponse struct for HandlersInstancesSlowQueriesResponse type HandlersInstancesSlowQueriesResponse struct { // A list of documents with information about slow queries as detected by the Performance Advisor. SlowQueries *[]SlowQuery `json:"slowQueries,omitempty"` } + +// NewHandlersInstancesSlowQueriesResponse instantiates a new HandlersInstancesSlowQueriesResponse 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 NewHandlersInstancesSlowQueriesResponse() *HandlersInstancesSlowQueriesResponse { + this := HandlersInstancesSlowQueriesResponse{} + return &this +} + +// NewHandlersInstancesSlowQueriesResponseWithDefaults instantiates a new HandlersInstancesSlowQueriesResponse 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 NewHandlersInstancesSlowQueriesResponseWithDefaults() *HandlersInstancesSlowQueriesResponse { + this := HandlersInstancesSlowQueriesResponse{} + return &this +} + +// GetSlowQueries returns the SlowQueries field value if set, zero value otherwise. +func (o *HandlersInstancesSlowQueriesResponse) GetSlowQueries() *[]SlowQuery { + if o == nil || IsNil(o.SlowQueries) { + var ret *[]SlowQuery + return ret + } + return o.SlowQueries +} + +// GetSlowQueriesOk returns a tuple with the SlowQueries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSlowQueriesResponse) GetSlowQueriesOk() (*[]SlowQuery, bool) { + if o == nil || IsNil(o.SlowQueries) { + return nil, false + } + return o.SlowQueries, true +} + +// HasSlowQueries returns a boolean if a field has been set. +func (o *HandlersInstancesSlowQueriesResponse) HasSlowQueries() bool { + if o != nil && !IsNil(o.SlowQueries) { + return true + } + + return false +} + +// SetSlowQueries gets a reference to the given []SlowQuery and assigns it to the SlowQueries field. +func (o *HandlersInstancesSlowQueriesResponse) SetSlowQueries(v *[]SlowQuery) { + o.SlowQueries = v +} + +func (o HandlersInstancesSlowQueriesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SlowQueries) { + toSerialize["slowQueries"] = o.SlowQueries + } + return toSerialize, nil +} + +type NullableHandlersInstancesSlowQueriesResponse struct { + value *HandlersInstancesSlowQueriesResponse + isSet bool +} + +func (v NullableHandlersInstancesSlowQueriesResponse) Get() *HandlersInstancesSlowQueriesResponse { + return v.value +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) Set(val *HandlersInstancesSlowQueriesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesSlowQueriesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesSlowQueriesResponse(val *HandlersInstancesSlowQueriesResponse) *NullableHandlersInstancesSlowQueriesResponse { + return &NullableHandlersInstancesSlowQueriesResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesSlowQueriesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go index 13cf0931..000b808d 100644 --- a/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go +++ b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the HandlersInstancesSuggestedIndexesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesSuggestedIndexesResponse{} + // HandlersInstancesSuggestedIndexesResponse struct for HandlersInstancesSuggestedIndexesResponse type HandlersInstancesSuggestedIndexesResponse struct { // Documents with information about the query shapes that are served by the suggested indexes. @@ -17,3 +24,131 @@ type HandlersInstancesSuggestedIndexesResponse struct { // Documents with information about the indexes suggested by the Performance Advisor. SuggestedIndexes *[]SuggestedIndex `json:"suggestedIndexes,omitempty"` } + +// NewHandlersInstancesSuggestedIndexesResponse instantiates a new HandlersInstancesSuggestedIndexesResponse 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 NewHandlersInstancesSuggestedIndexesResponse() *HandlersInstancesSuggestedIndexesResponse { + this := HandlersInstancesSuggestedIndexesResponse{} + return &this +} + +// NewHandlersInstancesSuggestedIndexesResponseWithDefaults instantiates a new HandlersInstancesSuggestedIndexesResponse 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 NewHandlersInstancesSuggestedIndexesResponseWithDefaults() *HandlersInstancesSuggestedIndexesResponse { + this := HandlersInstancesSuggestedIndexesResponse{} + return &this +} + +// GetShapes returns the Shapes field value if set, zero value otherwise. +func (o *HandlersInstancesSuggestedIndexesResponse) GetShapes() *[]Shape { + if o == nil || IsNil(o.Shapes) { + var ret *[]Shape + return ret + } + return o.Shapes +} + +// GetShapesOk returns a tuple with the Shapes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) GetShapesOk() (*[]Shape, bool) { + if o == nil || IsNil(o.Shapes) { + return nil, false + } + return o.Shapes, true +} + +// HasShapes returns a boolean if a field has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) HasShapes() bool { + if o != nil && !IsNil(o.Shapes) { + return true + } + + return false +} + +// SetShapes gets a reference to the given []Shape and assigns it to the Shapes field. +func (o *HandlersInstancesSuggestedIndexesResponse) SetShapes(v *[]Shape) { + o.Shapes = v +} + +// GetSuggestedIndexes returns the SuggestedIndexes field value if set, zero value otherwise. +func (o *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexes() *[]SuggestedIndex { + if o == nil || IsNil(o.SuggestedIndexes) { + var ret *[]SuggestedIndex + return ret + } + return o.SuggestedIndexes +} + +// GetSuggestedIndexesOk returns a tuple with the SuggestedIndexes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexesOk() (*[]SuggestedIndex, bool) { + if o == nil || IsNil(o.SuggestedIndexes) { + return nil, false + } + return o.SuggestedIndexes, true +} + +// HasSuggestedIndexes returns a boolean if a field has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) HasSuggestedIndexes() bool { + if o != nil && !IsNil(o.SuggestedIndexes) { + return true + } + + return false +} + +// SetSuggestedIndexes gets a reference to the given []SuggestedIndex and assigns it to the SuggestedIndexes field. +func (o *HandlersInstancesSuggestedIndexesResponse) SetSuggestedIndexes(v *[]SuggestedIndex) { + o.SuggestedIndexes = v +} + +func (o HandlersInstancesSuggestedIndexesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Shapes) { + toSerialize["shapes"] = o.Shapes + } + if !IsNil(o.SuggestedIndexes) { + toSerialize["suggestedIndexes"] = o.SuggestedIndexes + } + return toSerialize, nil +} + +type NullableHandlersInstancesSuggestedIndexesResponse struct { + value *HandlersInstancesSuggestedIndexesResponse + isSet bool +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) Get() *HandlersInstancesSuggestedIndexesResponse { + return v.value +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) Set(val *HandlersInstancesSuggestedIndexesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesSuggestedIndexesResponse(val *HandlersInstancesSuggestedIndexesResponse) *NullableHandlersInstancesSuggestedIndexesResponse { + return &NullableHandlersInstancesSuggestedIndexesResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_host.go b/services/mongodbflex/model_host.go index 3ed38737..108bf3b2 100644 --- a/services/mongodbflex/model_host.go +++ b/services/mongodbflex/model_host.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the Host type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Host{} + // Host struct for Host type Host struct { HostMetrics *[]HostMetric `json:"hostMetrics,omitempty"` Id *string `json:"id,omitempty"` } + +// NewHost instantiates a new Host 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 NewHost() *Host { + this := Host{} + return &this +} + +// NewHostWithDefaults instantiates a new Host 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 NewHostWithDefaults() *Host { + this := Host{} + return &this +} + +// GetHostMetrics returns the HostMetrics field value if set, zero value otherwise. +func (o *Host) GetHostMetrics() *[]HostMetric { + if o == nil || IsNil(o.HostMetrics) { + var ret *[]HostMetric + return ret + } + return o.HostMetrics +} + +// GetHostMetricsOk returns a tuple with the HostMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Host) GetHostMetricsOk() (*[]HostMetric, bool) { + if o == nil || IsNil(o.HostMetrics) { + return nil, false + } + return o.HostMetrics, true +} + +// HasHostMetrics returns a boolean if a field has been set. +func (o *Host) HasHostMetrics() bool { + if o != nil && !IsNil(o.HostMetrics) { + return true + } + + return false +} + +// SetHostMetrics gets a reference to the given []HostMetric and assigns it to the HostMetrics field. +func (o *Host) SetHostMetrics(v *[]HostMetric) { + o.HostMetrics = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Host) 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 *Host) 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 *Host) 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 *Host) SetId(v *string) { + o.Id = v +} + +func (o Host) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.HostMetrics) { + toSerialize["hostMetrics"] = o.HostMetrics + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableHost struct { + value *Host + isSet bool +} + +func (v NullableHost) Get() *Host { + return v.value +} + +func (v *NullableHost) Set(val *Host) { + v.value = val + v.isSet = true +} + +func (v NullableHost) IsSet() bool { + return v.isSet +} + +func (v *NullableHost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHost(val *Host) *NullableHost { + return &NullableHost{value: val, isSet: true} +} + +func (v NullableHost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_host_metric.go b/services/mongodbflex/model_host_metric.go index 7b893a26..ac5a8602 100644 --- a/services/mongodbflex/model_host_metric.go +++ b/services/mongodbflex/model_host_metric.go @@ -10,9 +10,179 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the HostMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HostMetric{} + // HostMetric struct for HostMetric type HostMetric struct { Datapoints *[]DataPoint `json:"datapoints,omitempty"` Name *string `json:"name,omitempty"` Units *string `json:"units,omitempty"` } + +// NewHostMetric instantiates a new HostMetric 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 NewHostMetric() *HostMetric { + this := HostMetric{} + return &this +} + +// NewHostMetricWithDefaults instantiates a new HostMetric 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 NewHostMetricWithDefaults() *HostMetric { + this := HostMetric{} + return &this +} + +// GetDatapoints returns the Datapoints field value if set, zero value otherwise. +func (o *HostMetric) GetDatapoints() *[]DataPoint { + if o == nil || IsNil(o.Datapoints) { + var ret *[]DataPoint + return ret + } + return o.Datapoints +} + +// GetDatapointsOk returns a tuple with the Datapoints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostMetric) GetDatapointsOk() (*[]DataPoint, bool) { + if o == nil || IsNil(o.Datapoints) { + return nil, false + } + return o.Datapoints, true +} + +// HasDatapoints returns a boolean if a field has been set. +func (o *HostMetric) HasDatapoints() bool { + if o != nil && !IsNil(o.Datapoints) { + return true + } + + return false +} + +// SetDatapoints gets a reference to the given []DataPoint and assigns it to the Datapoints field. +func (o *HostMetric) SetDatapoints(v *[]DataPoint) { + o.Datapoints = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HostMetric) 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 *HostMetric) 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 *HostMetric) 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 *HostMetric) SetName(v *string) { + o.Name = v +} + +// GetUnits returns the Units field value if set, zero value otherwise. +func (o *HostMetric) GetUnits() *string { + if o == nil || IsNil(o.Units) { + var ret *string + return ret + } + return o.Units +} + +// GetUnitsOk returns a tuple with the Units field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostMetric) GetUnitsOk() (*string, bool) { + if o == nil || IsNil(o.Units) { + return nil, false + } + return o.Units, true +} + +// HasUnits returns a boolean if a field has been set. +func (o *HostMetric) HasUnits() bool { + if o != nil && !IsNil(o.Units) { + return true + } + + return false +} + +// SetUnits gets a reference to the given string and assigns it to the Units field. +func (o *HostMetric) SetUnits(v *string) { + o.Units = v +} + +func (o HostMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Datapoints) { + toSerialize["datapoints"] = o.Datapoints + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Units) { + toSerialize["units"] = o.Units + } + return toSerialize, nil +} + +type NullableHostMetric struct { + value *HostMetric + isSet bool +} + +func (v NullableHostMetric) Get() *HostMetric { + return v.value +} + +func (v *NullableHostMetric) Set(val *HostMetric) { + v.value = val + v.isSet = true +} + +func (v NullableHostMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableHostMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHostMetric(val *HostMetric) *NullableHostMetric { + return &NullableHostMetric{value: val, isSet: true} +} + +func (v NullableHostMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHostMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_instance.go b/services/mongodbflex/model_instance.go index de2231ab..395013e8 100644 --- a/services/mongodbflex/model_instance.go +++ b/services/mongodbflex/model_instance.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_instance_list_instance.go b/services/mongodbflex/model_instance_list_instance.go index b3a49fde..38ae2ea1 100644 --- a/services/mongodbflex/model_instance_list_instance.go +++ b/services/mongodbflex/model_instance_list_instance.go @@ -10,9 +10,179 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_instance_response_user.go b/services/mongodbflex/model_instance_response_user.go index f06e5261..b29de997 100644 --- a/services/mongodbflex/model_instance_response_user.go +++ b/services/mongodbflex/model_instance_response_user.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the InstanceResponseUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceResponseUser{} + // InstanceResponseUser struct for InstanceResponseUser type InstanceResponseUser struct { Database *string `json:"database,omitempty"` @@ -19,3 +26,271 @@ type InstanceResponseUser struct { Roles *[]string `json:"roles,omitempty"` Username *string `json:"username,omitempty"` } + +// NewInstanceResponseUser instantiates a new InstanceResponseUser 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 NewInstanceResponseUser() *InstanceResponseUser { + this := InstanceResponseUser{} + return &this +} + +// NewInstanceResponseUserWithDefaults instantiates a new InstanceResponseUser 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 NewInstanceResponseUserWithDefaults() *InstanceResponseUser { + this := InstanceResponseUser{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetDatabase(v *string) { + o.Database = v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetHost(v *string) { + o.Host = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetId(v *string) { + o.Id = v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetPort(v *int64) { + o.Port = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetUsername(v *string) { + o.Username = v +} + +func (o InstanceResponseUser) 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.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 NullableInstanceResponseUser struct { + value *InstanceResponseUser + isSet bool +} + +func (v NullableInstanceResponseUser) Get() *InstanceResponseUser { + return v.value +} + +func (v *NullableInstanceResponseUser) Set(val *InstanceResponseUser) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceResponseUser) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceResponseUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceResponseUser(val *InstanceResponseUser) *NullableInstanceResponseUser { + return &NullableInstanceResponseUser{value: val, isSet: true} +} + +func (v NullableInstanceResponseUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceResponseUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_list_backups_response.go b/services/mongodbflex/model_list_backups_response.go index 3836a458..e53dd33a 100644 --- a/services/mongodbflex/model_list_backups_response.go +++ b/services/mongodbflex/model_list_backups_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +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 { Count *int64 `json:"count,omitempty"` Items *[]Backup `json:"items,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 +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListBackupsResponse) 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 *ListBackupsResponse) 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 *ListBackupsResponse) 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 *ListBackupsResponse) SetCount(v *int64) { + o.Count = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetItems() *[]Backup { + if o == nil || IsNil(o.Items) { + var ret *[]Backup + 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 *ListBackupsResponse) GetItemsOk() (*[]Backup, 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 *ListBackupsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Backup and assigns it to the Items field. +func (o *ListBackupsResponse) SetItems(v *[]Backup) { + o.Items = v +} + +func (o ListBackupsResponse) 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 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/mongodbflex/model_list_flavors_response.go b/services/mongodbflex/model_list_flavors_response.go index 53519f98..3ee76b4c 100644 --- a/services/mongodbflex/model_list_flavors_response.go +++ b/services/mongodbflex/model_list_flavors_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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 *[]HandlersInfraFlavor `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() *[]HandlersInfraFlavor { + if o == nil || IsNil(o.Flavors) { + var ret *[]HandlersInfraFlavor + 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() (*[]HandlersInfraFlavor, 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 []HandlersInfraFlavor and assigns it to the Flavors field. +func (o *ListFlavorsResponse) SetFlavors(v *[]HandlersInfraFlavor) { + 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/mongodbflex/model_list_instances_response.go b/services/mongodbflex/model_list_instances_response.go index d09c2f4a..7effc027 100644 --- a/services/mongodbflex/model_list_instances_response.go +++ b/services/mongodbflex/model_list_instances_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_list_metrics_response.go b/services/mongodbflex/model_list_metrics_response.go index e59777f1..c1302458 100644 --- a/services/mongodbflex/model_list_metrics_response.go +++ b/services/mongodbflex/model_list_metrics_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the ListMetricsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMetricsResponse{} + // ListMetricsResponse struct for ListMetricsResponse type ListMetricsResponse struct { Hosts *[]Host `json:"hosts,omitempty"` } + +// NewListMetricsResponse instantiates a new ListMetricsResponse 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 NewListMetricsResponse() *ListMetricsResponse { + this := ListMetricsResponse{} + return &this +} + +// NewListMetricsResponseWithDefaults instantiates a new ListMetricsResponse 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 NewListMetricsResponseWithDefaults() *ListMetricsResponse { + this := ListMetricsResponse{} + return &this +} + +// GetHosts returns the Hosts field value if set, zero value otherwise. +func (o *ListMetricsResponse) GetHosts() *[]Host { + if o == nil || IsNil(o.Hosts) { + var ret *[]Host + return ret + } + return o.Hosts +} + +// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMetricsResponse) GetHostsOk() (*[]Host, bool) { + if o == nil || IsNil(o.Hosts) { + return nil, false + } + return o.Hosts, true +} + +// HasHosts returns a boolean if a field has been set. +func (o *ListMetricsResponse) HasHosts() bool { + if o != nil && !IsNil(o.Hosts) { + return true + } + + return false +} + +// SetHosts gets a reference to the given []Host and assigns it to the Hosts field. +func (o *ListMetricsResponse) SetHosts(v *[]Host) { + o.Hosts = v +} + +func (o ListMetricsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hosts) { + toSerialize["hosts"] = o.Hosts + } + return toSerialize, nil +} + +type NullableListMetricsResponse struct { + value *ListMetricsResponse + isSet bool +} + +func (v NullableListMetricsResponse) Get() *ListMetricsResponse { + return v.value +} + +func (v *NullableListMetricsResponse) Set(val *ListMetricsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListMetricsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListMetricsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMetricsResponse(val *ListMetricsResponse) *NullableListMetricsResponse { + return &NullableListMetricsResponse{value: val, isSet: true} +} + +func (v NullableListMetricsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMetricsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_list_restore_jobs_response.go b/services/mongodbflex/model_list_restore_jobs_response.go index 404558ec..5e6d44db 100644 --- a/services/mongodbflex/model_list_restore_jobs_response.go +++ b/services/mongodbflex/model_list_restore_jobs_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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 { Items *[]RestoreInstanceStatus `json:"items,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 +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListRestoreJobsResponse) GetItems() *[]RestoreInstanceStatus { + if o == nil || IsNil(o.Items) { + var ret *[]RestoreInstanceStatus + 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 *ListRestoreJobsResponse) GetItemsOk() (*[]RestoreInstanceStatus, 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 *ListRestoreJobsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []RestoreInstanceStatus and assigns it to the Items field. +func (o *ListRestoreJobsResponse) SetItems(v *[]RestoreInstanceStatus) { + o.Items = v +} + +func (o ListRestoreJobsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + 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/mongodbflex/model_list_storages_response.go b/services/mongodbflex/model_list_storages_response.go index fe6e2380..58920acf 100644 --- a/services/mongodbflex/model_list_storages_response.go +++ b/services/mongodbflex/model_list_storages_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_list_user.go b/services/mongodbflex/model_list_user.go index ea790446..bbbc06b4 100644 --- a/services/mongodbflex/model_list_user.go +++ b/services/mongodbflex/model_list_user.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the ListUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUser{} + // ListUser struct for ListUser type ListUser struct { Id *string `json:"id,omitempty"` Username *string `json:"username,omitempty"` } + +// NewListUser instantiates a new ListUser 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 NewListUser() *ListUser { + this := ListUser{} + return &this +} + +// NewListUserWithDefaults instantiates a new ListUser 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 NewListUserWithDefaults() *ListUser { + this := ListUser{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListUser) 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 *ListUser) 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 *ListUser) 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 *ListUser) SetId(v *string) { + o.Id = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *ListUser) 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 *ListUser) 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 *ListUser) 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 *ListUser) SetUsername(v *string) { + o.Username = v +} + +func (o ListUser) 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 NullableListUser struct { + value *ListUser + isSet bool +} + +func (v NullableListUser) Get() *ListUser { + return v.value +} + +func (v *NullableListUser) Set(val *ListUser) { + v.value = val + v.isSet = true +} + +func (v NullableListUser) IsSet() bool { + return v.isSet +} + +func (v *NullableListUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUser(val *ListUser) *NullableListUser { + return &NullableListUser{value: val, isSet: true} +} + +func (v NullableListUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_list_users_response.go b/services/mongodbflex/model_list_users_response.go index 2dc63e37..e38c9432 100644 --- a/services/mongodbflex/model_list_users_response.go +++ b/services/mongodbflex/model_list_users_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +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 *[]ListUser `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() *[]ListUser { + if o == nil || IsNil(o.Items) { + var ret *[]ListUser + 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() (*[]ListUser, 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 []ListUser and assigns it to the Items field. +func (o *ListUsersResponse) SetItems(v *[]ListUser) { + 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/mongodbflex/model_list_versions_response.go b/services/mongodbflex/model_list_versions_response.go index 6dd4e385..9245e3eb 100644 --- a/services/mongodbflex/model_list_versions_response.go +++ b/services/mongodbflex/model_list_versions_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_mongodbatlas_operation.go b/services/mongodbflex/model_mongodbatlas_operation.go index f8351f93..654b66c2 100644 --- a/services/mongodbflex/model_mongodbatlas_operation.go +++ b/services/mongodbflex/model_mongodbatlas_operation.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the MongodbatlasOperation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MongodbatlasOperation{} + // MongodbatlasOperation struct for MongodbatlasOperation type MongodbatlasOperation struct { // Documents containing the search criteria used by the query. @@ -18,3 +25,166 @@ type MongodbatlasOperation struct { Raw *string `json:"raw,omitempty"` Stats *MongodbatlasOperationStats `json:"stats,omitempty"` } + +// NewMongodbatlasOperation instantiates a new MongodbatlasOperation 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 NewMongodbatlasOperation() *MongodbatlasOperation { + this := MongodbatlasOperation{} + return &this +} + +// NewMongodbatlasOperationWithDefaults instantiates a new MongodbatlasOperation 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 NewMongodbatlasOperationWithDefaults() *MongodbatlasOperation { + this := MongodbatlasOperation{} + return &this +} + +// GetPredicates returns the Predicates field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetPredicates() *[]map[string]interface{} { + if o == nil || IsNil(o.Predicates) { + var ret *[]map[string]interface{} + return ret + } + return o.Predicates +} + +// GetPredicatesOk returns a tuple with the Predicates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetPredicatesOk() (*[]map[string]interface{}, bool) { + if o == nil || IsNil(o.Predicates) { + return nil, false + } + return o.Predicates, true +} + +// HasPredicates returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasPredicates() bool { + if o != nil && !IsNil(o.Predicates) { + return true + } + + return false +} + +// SetPredicates gets a reference to the given []map[string]interface{} and assigns it to the Predicates field. +func (o *MongodbatlasOperation) SetPredicates(v *[]map[string]interface{}) { + o.Predicates = v +} + +// GetRaw returns the Raw field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetRaw() *string { + if o == nil || IsNil(o.Raw) { + var ret *string + return ret + } + return o.Raw +} + +// GetRawOk returns a tuple with the Raw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetRawOk() (*string, bool) { + if o == nil || IsNil(o.Raw) { + return nil, false + } + return o.Raw, true +} + +// HasRaw returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasRaw() bool { + if o != nil && !IsNil(o.Raw) { + return true + } + + return false +} + +// SetRaw gets a reference to the given string and assigns it to the Raw field. +func (o *MongodbatlasOperation) SetRaw(v *string) { + o.Raw = v +} + +// GetStats returns the Stats field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetStats() *MongodbatlasOperationStats { + if o == nil || IsNil(o.Stats) { + var ret *MongodbatlasOperationStats + return ret + } + return o.Stats +} + +// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetStatsOk() (*MongodbatlasOperationStats, bool) { + if o == nil || IsNil(o.Stats) { + return nil, false + } + return o.Stats, true +} + +// HasStats returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasStats() bool { + if o != nil && !IsNil(o.Stats) { + return true + } + + return false +} + +// SetStats gets a reference to the given MongodbatlasOperationStats and assigns it to the Stats field. +func (o *MongodbatlasOperation) SetStats(v *MongodbatlasOperationStats) { + o.Stats = v +} + +func (o MongodbatlasOperation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Predicates) { + toSerialize["predicates"] = o.Predicates + } + if !IsNil(o.Raw) { + toSerialize["raw"] = o.Raw + } + if !IsNil(o.Stats) { + toSerialize["stats"] = o.Stats + } + return toSerialize, nil +} + +type NullableMongodbatlasOperation struct { + value *MongodbatlasOperation + isSet bool +} + +func (v NullableMongodbatlasOperation) Get() *MongodbatlasOperation { + return v.value +} + +func (v *NullableMongodbatlasOperation) Set(val *MongodbatlasOperation) { + v.value = val + v.isSet = true +} + +func (v NullableMongodbatlasOperation) IsSet() bool { + return v.isSet +} + +func (v *NullableMongodbatlasOperation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMongodbatlasOperation(val *MongodbatlasOperation) *NullableMongodbatlasOperation { + return &NullableMongodbatlasOperation{value: val, isSet: true} +} + +func (v NullableMongodbatlasOperation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMongodbatlasOperation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_mongodbatlas_operation_stats.go b/services/mongodbflex/model_mongodbatlas_operation_stats.go index 7602241f..61827ce4 100644 --- a/services/mongodbflex/model_mongodbatlas_operation_stats.go +++ b/services/mongodbflex/model_mongodbatlas_operation_stats.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the MongodbatlasOperationStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MongodbatlasOperationStats{} + // MongodbatlasOperationStats Query statistics. type MongodbatlasOperationStats struct { // Duration in milliseconds of the query. @@ -21,3 +28,201 @@ type MongodbatlasOperationStats struct { // Query timestamp, in seconds since epoch. Ts *int64 `json:"ts,omitempty"` } + +// NewMongodbatlasOperationStats instantiates a new MongodbatlasOperationStats 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 NewMongodbatlasOperationStats() *MongodbatlasOperationStats { + this := MongodbatlasOperationStats{} + return &this +} + +// NewMongodbatlasOperationStatsWithDefaults instantiates a new MongodbatlasOperationStats 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 NewMongodbatlasOperationStatsWithDefaults() *MongodbatlasOperationStats { + this := MongodbatlasOperationStats{} + return &this +} + +// GetMs returns the Ms field value if set, zero value otherwise. +func (o *MongodbatlasOperationStats) GetMs() *float64 { + if o == nil || IsNil(o.Ms) { + var ret *float64 + return ret + } + return o.Ms +} + +// GetMsOk returns a tuple with the Ms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperationStats) GetMsOk() (*float64, bool) { + if o == nil || IsNil(o.Ms) { + return nil, false + } + return o.Ms, true +} + +// HasMs returns a boolean if a field has been set. +func (o *MongodbatlasOperationStats) HasMs() bool { + if o != nil && !IsNil(o.Ms) { + return true + } + + return false +} + +// SetMs gets a reference to the given float64 and assigns it to the Ms field. +func (o *MongodbatlasOperationStats) SetMs(v *float64) { + o.Ms = v +} + +// GetNReturned returns the NReturned field value if set, zero value otherwise. +func (o *MongodbatlasOperationStats) GetNReturned() *int64 { + if o == nil || IsNil(o.NReturned) { + var ret *int64 + return ret + } + return o.NReturned +} + +// GetNReturnedOk returns a tuple with the NReturned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperationStats) GetNReturnedOk() (*int64, bool) { + if o == nil || IsNil(o.NReturned) { + return nil, false + } + return o.NReturned, true +} + +// HasNReturned returns a boolean if a field has been set. +func (o *MongodbatlasOperationStats) HasNReturned() bool { + if o != nil && !IsNil(o.NReturned) { + return true + } + + return false +} + +// SetNReturned gets a reference to the given int64 and assigns it to the NReturned field. +func (o *MongodbatlasOperationStats) SetNReturned(v *int64) { + o.NReturned = v +} + +// GetNScanned returns the NScanned field value if set, zero value otherwise. +func (o *MongodbatlasOperationStats) GetNScanned() *int64 { + if o == nil || IsNil(o.NScanned) { + var ret *int64 + return ret + } + return o.NScanned +} + +// GetNScannedOk returns a tuple with the NScanned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperationStats) GetNScannedOk() (*int64, bool) { + if o == nil || IsNil(o.NScanned) { + return nil, false + } + return o.NScanned, true +} + +// HasNScanned returns a boolean if a field has been set. +func (o *MongodbatlasOperationStats) HasNScanned() bool { + if o != nil && !IsNil(o.NScanned) { + return true + } + + return false +} + +// SetNScanned gets a reference to the given int64 and assigns it to the NScanned field. +func (o *MongodbatlasOperationStats) SetNScanned(v *int64) { + o.NScanned = v +} + +// GetTs returns the Ts field value if set, zero value otherwise. +func (o *MongodbatlasOperationStats) GetTs() *int64 { + if o == nil || IsNil(o.Ts) { + var ret *int64 + return ret + } + return o.Ts +} + +// GetTsOk returns a tuple with the Ts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperationStats) GetTsOk() (*int64, bool) { + if o == nil || IsNil(o.Ts) { + return nil, false + } + return o.Ts, true +} + +// HasTs returns a boolean if a field has been set. +func (o *MongodbatlasOperationStats) HasTs() bool { + if o != nil && !IsNil(o.Ts) { + return true + } + + return false +} + +// SetTs gets a reference to the given int64 and assigns it to the Ts field. +func (o *MongodbatlasOperationStats) SetTs(v *int64) { + o.Ts = v +} + +func (o MongodbatlasOperationStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ms) { + toSerialize["ms"] = o.Ms + } + if !IsNil(o.NReturned) { + toSerialize["nReturned"] = o.NReturned + } + if !IsNil(o.NScanned) { + toSerialize["nScanned"] = o.NScanned + } + if !IsNil(o.Ts) { + toSerialize["ts"] = o.Ts + } + return toSerialize, nil +} + +type NullableMongodbatlasOperationStats struct { + value *MongodbatlasOperationStats + isSet bool +} + +func (v NullableMongodbatlasOperationStats) Get() *MongodbatlasOperationStats { + return v.value +} + +func (v *NullableMongodbatlasOperationStats) Set(val *MongodbatlasOperationStats) { + v.value = val + v.isSet = true +} + +func (v NullableMongodbatlasOperationStats) IsSet() bool { + return v.isSet +} + +func (v *NullableMongodbatlasOperationStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMongodbatlasOperationStats(val *MongodbatlasOperationStats) *NullableMongodbatlasOperationStats { + return &NullableMongodbatlasOperationStats{value: val, isSet: true} +} + +func (v NullableMongodbatlasOperationStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMongodbatlasOperationStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_mongodbatlas_stats.go b/services/mongodbflex/model_mongodbatlas_stats.go index 43bcb42c..61f5fe68 100644 --- a/services/mongodbflex/model_mongodbatlas_stats.go +++ b/services/mongodbflex/model_mongodbatlas_stats.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the MongodbatlasStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MongodbatlasStats{} + // MongodbatlasStats struct for MongodbatlasStats type MongodbatlasStats struct { // Duration in milliseconds of the query. @@ -21,3 +28,201 @@ type MongodbatlasStats struct { // Query timestamp, in seconds since epoch. Ts *int64 `json:"ts,omitempty"` } + +// NewMongodbatlasStats instantiates a new MongodbatlasStats 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 NewMongodbatlasStats() *MongodbatlasStats { + this := MongodbatlasStats{} + return &this +} + +// NewMongodbatlasStatsWithDefaults instantiates a new MongodbatlasStats 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 NewMongodbatlasStatsWithDefaults() *MongodbatlasStats { + this := MongodbatlasStats{} + return &this +} + +// GetMs returns the Ms field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetMs() *float64 { + if o == nil || IsNil(o.Ms) { + var ret *float64 + return ret + } + return o.Ms +} + +// GetMsOk returns a tuple with the Ms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetMsOk() (*float64, bool) { + if o == nil || IsNil(o.Ms) { + return nil, false + } + return o.Ms, true +} + +// HasMs returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasMs() bool { + if o != nil && !IsNil(o.Ms) { + return true + } + + return false +} + +// SetMs gets a reference to the given float64 and assigns it to the Ms field. +func (o *MongodbatlasStats) SetMs(v *float64) { + o.Ms = v +} + +// GetNReturned returns the NReturned field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetNReturned() *int64 { + if o == nil || IsNil(o.NReturned) { + var ret *int64 + return ret + } + return o.NReturned +} + +// GetNReturnedOk returns a tuple with the NReturned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetNReturnedOk() (*int64, bool) { + if o == nil || IsNil(o.NReturned) { + return nil, false + } + return o.NReturned, true +} + +// HasNReturned returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasNReturned() bool { + if o != nil && !IsNil(o.NReturned) { + return true + } + + return false +} + +// SetNReturned gets a reference to the given int64 and assigns it to the NReturned field. +func (o *MongodbatlasStats) SetNReturned(v *int64) { + o.NReturned = v +} + +// GetNScanned returns the NScanned field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetNScanned() *int64 { + if o == nil || IsNil(o.NScanned) { + var ret *int64 + return ret + } + return o.NScanned +} + +// GetNScannedOk returns a tuple with the NScanned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetNScannedOk() (*int64, bool) { + if o == nil || IsNil(o.NScanned) { + return nil, false + } + return o.NScanned, true +} + +// HasNScanned returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasNScanned() bool { + if o != nil && !IsNil(o.NScanned) { + return true + } + + return false +} + +// SetNScanned gets a reference to the given int64 and assigns it to the NScanned field. +func (o *MongodbatlasStats) SetNScanned(v *int64) { + o.NScanned = v +} + +// GetTs returns the Ts field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetTs() *int64 { + if o == nil || IsNil(o.Ts) { + var ret *int64 + return ret + } + return o.Ts +} + +// GetTsOk returns a tuple with the Ts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetTsOk() (*int64, bool) { + if o == nil || IsNil(o.Ts) { + return nil, false + } + return o.Ts, true +} + +// HasTs returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasTs() bool { + if o != nil && !IsNil(o.Ts) { + return true + } + + return false +} + +// SetTs gets a reference to the given int64 and assigns it to the Ts field. +func (o *MongodbatlasStats) SetTs(v *int64) { + o.Ts = v +} + +func (o MongodbatlasStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ms) { + toSerialize["ms"] = o.Ms + } + if !IsNil(o.NReturned) { + toSerialize["nReturned"] = o.NReturned + } + if !IsNil(o.NScanned) { + toSerialize["nScanned"] = o.NScanned + } + if !IsNil(o.Ts) { + toSerialize["ts"] = o.Ts + } + return toSerialize, nil +} + +type NullableMongodbatlasStats struct { + value *MongodbatlasStats + isSet bool +} + +func (v NullableMongodbatlasStats) Get() *MongodbatlasStats { + return v.value +} + +func (v *NullableMongodbatlasStats) Set(val *MongodbatlasStats) { + v.value = val + v.isSet = true +} + +func (v NullableMongodbatlasStats) IsSet() bool { + return v.isSet +} + +func (v *NullableMongodbatlasStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMongodbatlasStats(val *MongodbatlasStats) *NullableMongodbatlasStats { + return &NullableMongodbatlasStats{value: val, isSet: true} +} + +func (v NullableMongodbatlasStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMongodbatlasStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_partial_update_instance_payload.go b/services/mongodbflex/model_partial_update_instance_payload.go index 1662acb0..c1f0f2b2 100644 --- a/services/mongodbflex/model_partial_update_instance_payload.go +++ b/services/mongodbflex/model_partial_update_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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 *ACL `json:"acl,omitempty"` @@ -23,3 +30,376 @@ type PartialUpdateInstancePayload struct { Storage *Storage `json:"storage,omitempty"` 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{} + 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{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetAcl(v *ACL) { + 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]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]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 *PartialUpdateInstancePayload) GetLabelsOk() (*map[string]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 *PartialUpdateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *PartialUpdateInstancePayload) SetLabels(v *map[string]string) { + 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 +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetStorage(v *Storage) { + o.Storage = 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.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + 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/mongodbflex/model_partial_update_user_payload.go b/services/mongodbflex/model_partial_update_user_payload.go index 9b01df37..bf28aa96 100644 --- a/services/mongodbflex/model_partial_update_user_payload.go +++ b/services/mongodbflex/model_partial_update_user_payload.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the PartialUpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateUserPayload{} + // PartialUpdateUserPayload struct for PartialUpdateUserPayload type PartialUpdateUserPayload struct { Database *string `json:"database,omitempty"` Roles *[]string `json:"roles,omitempty"` } + +// NewPartialUpdateUserPayload instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayload() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// NewPartialUpdateUserPayloadWithDefaults instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayloadWithDefaults() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) 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 *PartialUpdateUserPayload) 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 *PartialUpdateUserPayload) 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 *PartialUpdateUserPayload) SetDatabase(v *string) { + o.Database = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) 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 *PartialUpdateUserPayload) 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 *PartialUpdateUserPayload) 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 *PartialUpdateUserPayload) SetRoles(v *[]string) { + o.Roles = v +} + +func (o PartialUpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullablePartialUpdateUserPayload struct { + value *PartialUpdateUserPayload + isSet bool +} + +func (v NullablePartialUpdateUserPayload) Get() *PartialUpdateUserPayload { + return v.value +} + +func (v *NullablePartialUpdateUserPayload) Set(val *PartialUpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateUserPayload(val *PartialUpdateUserPayload) *NullablePartialUpdateUserPayload { + return &NullablePartialUpdateUserPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_restore_instance_payload.go b/services/mongodbflex/model_restore_instance_payload.go index 3e473c12..89310cb1 100644 --- a/services/mongodbflex/model_restore_instance_payload.go +++ b/services/mongodbflex/model_restore_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the RestoreInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstancePayload{} + // RestoreInstancePayload struct for RestoreInstancePayload type RestoreInstancePayload struct { // REQUIRED @@ -17,3 +24,115 @@ type RestoreInstancePayload struct { // REQUIRED InstanceId *string `json:"instanceId"` } + +type _RestoreInstancePayload RestoreInstancePayload + +// NewRestoreInstancePayload instantiates a new RestoreInstancePayload 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 NewRestoreInstancePayload(backupId *string, instanceId *string) *RestoreInstancePayload { + this := RestoreInstancePayload{} + this.BackupId = backupId + this.InstanceId = instanceId + return &this +} + +// NewRestoreInstancePayloadWithDefaults instantiates a new RestoreInstancePayload 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 NewRestoreInstancePayloadWithDefaults() *RestoreInstancePayload { + this := RestoreInstancePayload{} + return &this +} + +// GetBackupId returns the BackupId field value +func (o *RestoreInstancePayload) GetBackupId() *string { + if o == nil { + var ret *string + return ret + } + + return o.BackupId +} + +// GetBackupIdOk returns a tuple with the BackupId field value +// and a boolean to check if the value has been set. +func (o *RestoreInstancePayload) GetBackupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BackupId, true +} + +// SetBackupId sets field value +func (o *RestoreInstancePayload) SetBackupId(v *string) { + o.BackupId = v +} + +// GetInstanceId returns the InstanceId field value +func (o *RestoreInstancePayload) GetInstanceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *RestoreInstancePayload) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *RestoreInstancePayload) SetInstanceId(v *string) { + o.InstanceId = v +} + +func (o RestoreInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backupId"] = o.BackupId + toSerialize["instanceId"] = o.InstanceId + return toSerialize, nil +} + +type NullableRestoreInstancePayload struct { + value *RestoreInstancePayload + isSet bool +} + +func (v NullableRestoreInstancePayload) Get() *RestoreInstancePayload { + return v.value +} + +func (v *NullableRestoreInstancePayload) Set(val *RestoreInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstancePayload(val *RestoreInstancePayload) *NullableRestoreInstancePayload { + return &NullableRestoreInstancePayload{value: val, isSet: true} +} + +func (v NullableRestoreInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_restore_instance_response.go b/services/mongodbflex/model_restore_instance_response.go index 0edbcb74..fee79067 100644 --- a/services/mongodbflex/model_restore_instance_response.go +++ b/services/mongodbflex/model_restore_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the RestoreInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstanceResponse{} + // RestoreInstanceResponse struct for RestoreInstanceResponse type RestoreInstanceResponse struct { Item *RestoreInstanceStatus `json:"item,omitempty"` } + +// NewRestoreInstanceResponse instantiates a new RestoreInstanceResponse 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 NewRestoreInstanceResponse() *RestoreInstanceResponse { + this := RestoreInstanceResponse{} + return &this +} + +// NewRestoreInstanceResponseWithDefaults instantiates a new RestoreInstanceResponse 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 NewRestoreInstanceResponseWithDefaults() *RestoreInstanceResponse { + this := RestoreInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *RestoreInstanceResponse) GetItem() *RestoreInstanceStatus { + if o == nil || IsNil(o.Item) { + var ret *RestoreInstanceStatus + 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 *RestoreInstanceResponse) GetItemOk() (*RestoreInstanceStatus, 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 *RestoreInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given RestoreInstanceStatus and assigns it to the Item field. +func (o *RestoreInstanceResponse) SetItem(v *RestoreInstanceStatus) { + o.Item = v +} + +func (o RestoreInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableRestoreInstanceResponse struct { + value *RestoreInstanceResponse + isSet bool +} + +func (v NullableRestoreInstanceResponse) Get() *RestoreInstanceResponse { + return v.value +} + +func (v *NullableRestoreInstanceResponse) Set(val *RestoreInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstanceResponse(val *RestoreInstanceResponse) *NullableRestoreInstanceResponse { + return &NullableRestoreInstanceResponse{value: val, isSet: true} +} + +func (v NullableRestoreInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_restore_instance_status.go b/services/mongodbflex/model_restore_instance_status.go index 94d81d8e..0f9c9fbc 100644 --- a/services/mongodbflex/model_restore_instance_status.go +++ b/services/mongodbflex/model_restore_instance_status.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the RestoreInstanceStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstanceStatus{} + // RestoreInstanceStatus struct for RestoreInstanceStatus type RestoreInstanceStatus struct { BackupID *string `json:"backupID,omitempty"` @@ -18,3 +25,236 @@ type RestoreInstanceStatus struct { InstanceId *string `json:"instanceId,omitempty"` Status *string `json:"status,omitempty"` } + +// NewRestoreInstanceStatus instantiates a new RestoreInstanceStatus 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 NewRestoreInstanceStatus() *RestoreInstanceStatus { + this := RestoreInstanceStatus{} + return &this +} + +// NewRestoreInstanceStatusWithDefaults instantiates a new RestoreInstanceStatus 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 NewRestoreInstanceStatusWithDefaults() *RestoreInstanceStatus { + this := RestoreInstanceStatus{} + return &this +} + +// GetBackupID returns the BackupID field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetBackupID() *string { + if o == nil || IsNil(o.BackupID) { + var ret *string + return ret + } + return o.BackupID +} + +// GetBackupIDOk returns a tuple with the BackupID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetBackupIDOk() (*string, bool) { + if o == nil || IsNil(o.BackupID) { + return nil, false + } + return o.BackupID, true +} + +// HasBackupID returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasBackupID() bool { + if o != nil && !IsNil(o.BackupID) { + return true + } + + return false +} + +// SetBackupID gets a reference to the given string and assigns it to the BackupID field. +func (o *RestoreInstanceStatus) SetBackupID(v *string) { + o.BackupID = v +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetDate() *string { + if o == nil || IsNil(o.Date) { + var ret *string + return ret + } + return o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetDateOk() (*string, bool) { + if o == nil || IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasDate() bool { + if o != nil && !IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *RestoreInstanceStatus) SetDate(v *string) { + o.Date = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) SetId(v *string) { + o.Id = v +} + +// GetInstanceId returns the InstanceId field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetInstanceId() *string { + if o == nil || IsNil(o.InstanceId) { + var ret *string + return ret + } + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetInstanceIdOk() (*string, bool) { + if o == nil || IsNil(o.InstanceId) { + return nil, false + } + return o.InstanceId, true +} + +// HasInstanceId returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasInstanceId() bool { + if o != nil && !IsNil(o.InstanceId) { + return true + } + + return false +} + +// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +func (o *RestoreInstanceStatus) SetInstanceId(v *string) { + o.InstanceId = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) SetStatus(v *string) { + o.Status = v +} + +func (o RestoreInstanceStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupID) { + toSerialize["backupID"] = o.BackupID + } + if !IsNil(o.Date) { + toSerialize["date"] = o.Date + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.InstanceId) { + toSerialize["instanceId"] = o.InstanceId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableRestoreInstanceStatus struct { + value *RestoreInstanceStatus + isSet bool +} + +func (v NullableRestoreInstanceStatus) Get() *RestoreInstanceStatus { + return v.value +} + +func (v *NullableRestoreInstanceStatus) Set(val *RestoreInstanceStatus) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstanceStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstanceStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstanceStatus(val *RestoreInstanceStatus) *NullableRestoreInstanceStatus { + return &NullableRestoreInstanceStatus{value: val, isSet: true} +} + +func (v NullableRestoreInstanceStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstanceStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_shape.go b/services/mongodbflex/model_shape.go index fa8c76da..1ce0ce22 100644 --- a/services/mongodbflex/model_shape.go +++ b/services/mongodbflex/model_shape.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the Shape type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Shape{} + // Shape struct for Shape type Shape struct { // Average duration in milliseconds for the queries examined that match this shape. @@ -25,3 +32,271 @@ type Shape struct { // It represents documents with specific information and log lines for individual queries. Operations *[]MongodbatlasOperation `json:"operations,omitempty"` } + +// NewShape instantiates a new Shape 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 NewShape() *Shape { + this := Shape{} + return &this +} + +// NewShapeWithDefaults instantiates a new Shape 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 NewShapeWithDefaults() *Shape { + this := Shape{} + return &this +} + +// GetAvgMs returns the AvgMs field value if set, zero value otherwise. +func (o *Shape) GetAvgMs() *float64 { + if o == nil || IsNil(o.AvgMs) { + var ret *float64 + return ret + } + return o.AvgMs +} + +// GetAvgMsOk returns a tuple with the AvgMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetAvgMsOk() (*float64, bool) { + if o == nil || IsNil(o.AvgMs) { + return nil, false + } + return o.AvgMs, true +} + +// HasAvgMs returns a boolean if a field has been set. +func (o *Shape) HasAvgMs() bool { + if o != nil && !IsNil(o.AvgMs) { + return true + } + + return false +} + +// SetAvgMs gets a reference to the given float64 and assigns it to the AvgMs field. +func (o *Shape) SetAvgMs(v *float64) { + o.AvgMs = v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Shape) 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 *Shape) 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 *Shape) 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 *Shape) SetCount(v *int64) { + o.Count = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Shape) 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 *Shape) 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 *Shape) 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 *Shape) SetId(v *string) { + o.Id = v +} + +// GetInefficiencyScore returns the InefficiencyScore field value if set, zero value otherwise. +func (o *Shape) GetInefficiencyScore() *int64 { + if o == nil || IsNil(o.InefficiencyScore) { + var ret *int64 + return ret + } + return o.InefficiencyScore +} + +// GetInefficiencyScoreOk returns a tuple with the InefficiencyScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetInefficiencyScoreOk() (*int64, bool) { + if o == nil || IsNil(o.InefficiencyScore) { + return nil, false + } + return o.InefficiencyScore, true +} + +// HasInefficiencyScore returns a boolean if a field has been set. +func (o *Shape) HasInefficiencyScore() bool { + if o != nil && !IsNil(o.InefficiencyScore) { + return true + } + + return false +} + +// SetInefficiencyScore gets a reference to the given int64 and assigns it to the InefficiencyScore field. +func (o *Shape) SetInefficiencyScore(v *int64) { + o.InefficiencyScore = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *Shape) GetNamespace() *string { + if o == nil || IsNil(o.Namespace) { + var ret *string + return ret + } + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *Shape) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *Shape) SetNamespace(v *string) { + o.Namespace = v +} + +// GetOperations returns the Operations field value if set, zero value otherwise. +func (o *Shape) GetOperations() *[]MongodbatlasOperation { + if o == nil || IsNil(o.Operations) { + var ret *[]MongodbatlasOperation + return ret + } + return o.Operations +} + +// GetOperationsOk returns a tuple with the Operations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetOperationsOk() (*[]MongodbatlasOperation, bool) { + if o == nil || IsNil(o.Operations) { + return nil, false + } + return o.Operations, true +} + +// HasOperations returns a boolean if a field has been set. +func (o *Shape) HasOperations() bool { + if o != nil && !IsNil(o.Operations) { + return true + } + + return false +} + +// SetOperations gets a reference to the given []MongodbatlasOperation and assigns it to the Operations field. +func (o *Shape) SetOperations(v *[]MongodbatlasOperation) { + o.Operations = v +} + +func (o Shape) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvgMs) { + toSerialize["avgMs"] = o.AvgMs + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.InefficiencyScore) { + toSerialize["inefficiencyScore"] = o.InefficiencyScore + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Operations) { + toSerialize["operations"] = o.Operations + } + return toSerialize, nil +} + +type NullableShape struct { + value *Shape + isSet bool +} + +func (v NullableShape) Get() *Shape { + return v.value +} + +func (v *NullableShape) Set(val *Shape) { + v.value = val + v.isSet = true +} + +func (v NullableShape) IsSet() bool { + return v.isSet +} + +func (v *NullableShape) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShape(val *Shape) *NullableShape { + return &NullableShape{value: val, isSet: true} +} + +func (v NullableShape) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShape) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_slow_query.go b/services/mongodbflex/model_slow_query.go index 9a0aba57..06a832ef 100644 --- a/services/mongodbflex/model_slow_query.go +++ b/services/mongodbflex/model_slow_query.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the SlowQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SlowQuery{} + // SlowQuery struct for SlowQuery type SlowQuery struct { // The raw log line pertaining to the slow query. @@ -17,3 +24,131 @@ type SlowQuery struct { // The namespace in which the slow query ran. Namespace *string `json:"namespace,omitempty"` } + +// NewSlowQuery instantiates a new SlowQuery 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 NewSlowQuery() *SlowQuery { + this := SlowQuery{} + return &this +} + +// NewSlowQueryWithDefaults instantiates a new SlowQuery 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 NewSlowQueryWithDefaults() *SlowQuery { + this := SlowQuery{} + return &this +} + +// GetLine returns the Line field value if set, zero value otherwise. +func (o *SlowQuery) GetLine() *string { + if o == nil || IsNil(o.Line) { + var ret *string + return ret + } + return o.Line +} + +// GetLineOk returns a tuple with the Line field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SlowQuery) GetLineOk() (*string, bool) { + if o == nil || IsNil(o.Line) { + return nil, false + } + return o.Line, true +} + +// HasLine returns a boolean if a field has been set. +func (o *SlowQuery) HasLine() bool { + if o != nil && !IsNil(o.Line) { + return true + } + + return false +} + +// SetLine gets a reference to the given string and assigns it to the Line field. +func (o *SlowQuery) SetLine(v *string) { + o.Line = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *SlowQuery) GetNamespace() *string { + if o == nil || IsNil(o.Namespace) { + var ret *string + return ret + } + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SlowQuery) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *SlowQuery) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *SlowQuery) SetNamespace(v *string) { + o.Namespace = v +} + +func (o SlowQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Line) { + toSerialize["line"] = o.Line + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + return toSerialize, nil +} + +type NullableSlowQuery struct { + value *SlowQuery + isSet bool +} + +func (v NullableSlowQuery) Get() *SlowQuery { + return v.value +} + +func (v *NullableSlowQuery) Set(val *SlowQuery) { + v.value = val + v.isSet = true +} + +func (v NullableSlowQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableSlowQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSlowQuery(val *SlowQuery) *NullableSlowQuery { + return &NullableSlowQuery{value: val, isSet: true} +} + +func (v NullableSlowQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSlowQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_storage.go b/services/mongodbflex/model_storage.go index f345cc64..8a22c78e 100644 --- a/services/mongodbflex/model_storage.go +++ b/services/mongodbflex/model_storage.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_storage_range.go b/services/mongodbflex/model_storage_range.go index 640c9658..ca660aad 100644 --- a/services/mongodbflex/model_storage_range.go +++ b/services/mongodbflex/model_storage_range.go @@ -10,8 +10,143 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_suggested_index.go b/services/mongodbflex/model_suggested_index.go index 4da7be97..3d94e89a 100644 --- a/services/mongodbflex/model_suggested_index.go +++ b/services/mongodbflex/model_suggested_index.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the SuggestedIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SuggestedIndex{} + // SuggestedIndex struct for SuggestedIndex type SuggestedIndex struct { // Unique id for this suggested index. @@ -23,3 +30,236 @@ type SuggestedIndex struct { // Estimated percentage performance improvement that the suggested index would provide. Weight *float64 `json:"weight,omitempty"` } + +// NewSuggestedIndex instantiates a new SuggestedIndex 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 NewSuggestedIndex() *SuggestedIndex { + this := SuggestedIndex{} + return &this +} + +// NewSuggestedIndexWithDefaults instantiates a new SuggestedIndex 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 NewSuggestedIndexWithDefaults() *SuggestedIndex { + this := SuggestedIndex{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SuggestedIndex) 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 *SuggestedIndex) 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 *SuggestedIndex) 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 *SuggestedIndex) SetId(v *string) { + o.Id = v +} + +// GetImpact returns the Impact field value if set, zero value otherwise. +func (o *SuggestedIndex) GetImpact() *[]string { + if o == nil || IsNil(o.Impact) { + var ret *[]string + return ret + } + return o.Impact +} + +// GetImpactOk returns a tuple with the Impact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetImpactOk() (*[]string, bool) { + if o == nil || IsNil(o.Impact) { + return nil, false + } + return o.Impact, true +} + +// HasImpact returns a boolean if a field has been set. +func (o *SuggestedIndex) HasImpact() bool { + if o != nil && !IsNil(o.Impact) { + return true + } + + return false +} + +// SetImpact gets a reference to the given []string and assigns it to the Impact field. +func (o *SuggestedIndex) SetImpact(v *[]string) { + o.Impact = v +} + +// GetIndex returns the Index field value if set, zero value otherwise. +func (o *SuggestedIndex) GetIndex() *[]map[string]int32 { + if o == nil || IsNil(o.Index) { + var ret *[]map[string]int32 + return ret + } + return o.Index +} + +// GetIndexOk returns a tuple with the Index field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetIndexOk() (*[]map[string]int32, bool) { + if o == nil || IsNil(o.Index) { + return nil, false + } + return o.Index, true +} + +// HasIndex returns a boolean if a field has been set. +func (o *SuggestedIndex) HasIndex() bool { + if o != nil && !IsNil(o.Index) { + return true + } + + return false +} + +// SetIndex gets a reference to the given []map[string]int32 and assigns it to the Index field. +func (o *SuggestedIndex) SetIndex(v *[]map[string]int32) { + o.Index = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *SuggestedIndex) GetNamespace() *string { + if o == nil || IsNil(o.Namespace) { + var ret *string + return ret + } + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *SuggestedIndex) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *SuggestedIndex) SetNamespace(v *string) { + o.Namespace = v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *SuggestedIndex) GetWeight() *float64 { + if o == nil || IsNil(o.Weight) { + var ret *float64 + return ret + } + return o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetWeightOk() (*float64, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *SuggestedIndex) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given float64 and assigns it to the Weight field. +func (o *SuggestedIndex) SetWeight(v *float64) { + o.Weight = v +} + +func (o SuggestedIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Impact) { + toSerialize["impact"] = o.Impact + } + if !IsNil(o.Index) { + toSerialize["index"] = o.Index + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +type NullableSuggestedIndex struct { + value *SuggestedIndex + isSet bool +} + +func (v NullableSuggestedIndex) Get() *SuggestedIndex { + return v.value +} + +func (v *NullableSuggestedIndex) Set(val *SuggestedIndex) { + v.value = val + v.isSet = true +} + +func (v NullableSuggestedIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableSuggestedIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSuggestedIndex(val *SuggestedIndex) *NullableSuggestedIndex { + return &NullableSuggestedIndex{value: val, isSet: true} +} + +func (v NullableSuggestedIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSuggestedIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_update_backup_schedule_payload.go b/services/mongodbflex/model_update_backup_schedule_payload.go index a93f18f0..07fdec94 100644 --- a/services/mongodbflex/model_update_backup_schedule_payload.go +++ b/services/mongodbflex/model_update_backup_schedule_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the UpdateBackupSchedulePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateBackupSchedulePayload{} + // UpdateBackupSchedulePayload struct for UpdateBackupSchedulePayload type UpdateBackupSchedulePayload struct { BackupSchedule *string `json:"backupSchedule,omitempty"` @@ -19,3 +26,271 @@ type UpdateBackupSchedulePayload struct { SnapshotRetentionDays *int64 `json:"snapshotRetentionDays,omitempty"` WeeklySnapshotRetentionWeeks *int64 `json:"weeklySnapshotRetentionWeeks,omitempty"` } + +// NewUpdateBackupSchedulePayload instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayload() *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + return &this +} + +// NewUpdateBackupSchedulePayloadWithDefaults instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayloadWithDefaults() *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) 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 *UpdateBackupSchedulePayload) 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 *UpdateBackupSchedulePayload) 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 *UpdateBackupSchedulePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDays() *int64 { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + var ret *int64 + return ret + } + return o.DailySnapshotRetentionDays +} + +// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDaysOk() (*int64, bool) { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + return nil, false + } + return o.DailySnapshotRetentionDays, true +} + +// HasDailySnapshotRetentionDays returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasDailySnapshotRetentionDays() bool { + if o != nil && !IsNil(o.DailySnapshotRetentionDays) { + return true + } + + return false +} + +// SetDailySnapshotRetentionDays gets a reference to the given int64 and assigns it to the DailySnapshotRetentionDays field. +func (o *UpdateBackupSchedulePayload) SetDailySnapshotRetentionDays(v *int64) { + o.DailySnapshotRetentionDays = v +} + +// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonths() *int64 { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + var ret *int64 + return ret + } + return o.MonthlySnapshotRetentionMonths +} + +// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonthsOk() (*int64, bool) { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + return nil, false + } + return o.MonthlySnapshotRetentionMonths, true +} + +// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasMonthlySnapshotRetentionMonths() bool { + if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { + return true + } + + return false +} + +// SetMonthlySnapshotRetentionMonths gets a reference to the given int64 and assigns it to the MonthlySnapshotRetentionMonths field. +func (o *UpdateBackupSchedulePayload) SetMonthlySnapshotRetentionMonths(v *int64) { + o.MonthlySnapshotRetentionMonths = v +} + +// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHours() *int64 { + if o == nil || IsNil(o.PointInTimeWindowHours) { + var ret *int64 + return ret + } + return o.PointInTimeWindowHours +} + +// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHoursOk() (*int64, bool) { + if o == nil || IsNil(o.PointInTimeWindowHours) { + return nil, false + } + return o.PointInTimeWindowHours, true +} + +// HasPointInTimeWindowHours returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasPointInTimeWindowHours() bool { + if o != nil && !IsNil(o.PointInTimeWindowHours) { + return true + } + + return false +} + +// SetPointInTimeWindowHours gets a reference to the given int64 and assigns it to the PointInTimeWindowHours field. +func (o *UpdateBackupSchedulePayload) SetPointInTimeWindowHours(v *int64) { + o.PointInTimeWindowHours = v +} + +// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDays() *int64 { + if o == nil || IsNil(o.SnapshotRetentionDays) { + var ret *int64 + return ret + } + return o.SnapshotRetentionDays +} + +// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDaysOk() (*int64, bool) { + if o == nil || IsNil(o.SnapshotRetentionDays) { + return nil, false + } + return o.SnapshotRetentionDays, true +} + +// HasSnapshotRetentionDays returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasSnapshotRetentionDays() bool { + if o != nil && !IsNil(o.SnapshotRetentionDays) { + return true + } + + return false +} + +// SetSnapshotRetentionDays gets a reference to the given int64 and assigns it to the SnapshotRetentionDays field. +func (o *UpdateBackupSchedulePayload) SetSnapshotRetentionDays(v *int64) { + o.SnapshotRetentionDays = v +} + +// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeks() *int64 { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + var ret *int64 + return ret + } + return o.WeeklySnapshotRetentionWeeks +} + +// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeksOk() (*int64, bool) { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + return nil, false + } + return o.WeeklySnapshotRetentionWeeks, true +} + +// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasWeeklySnapshotRetentionWeeks() bool { + if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { + return true + } + + return false +} + +// SetWeeklySnapshotRetentionWeeks gets a reference to the given int64 and assigns it to the WeeklySnapshotRetentionWeeks field. +func (o *UpdateBackupSchedulePayload) SetWeeklySnapshotRetentionWeeks(v *int64) { + o.WeeklySnapshotRetentionWeeks = v +} + +func (o UpdateBackupSchedulePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.DailySnapshotRetentionDays) { + toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays + } + if !IsNil(o.MonthlySnapshotRetentionMonths) { + toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths + } + if !IsNil(o.PointInTimeWindowHours) { + toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours + } + if !IsNil(o.SnapshotRetentionDays) { + toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays + } + if !IsNil(o.WeeklySnapshotRetentionWeeks) { + toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks + } + return toSerialize, nil +} + +type NullableUpdateBackupSchedulePayload struct { + value *UpdateBackupSchedulePayload + isSet bool +} + +func (v NullableUpdateBackupSchedulePayload) Get() *UpdateBackupSchedulePayload { + return v.value +} + +func (v *NullableUpdateBackupSchedulePayload) Set(val *UpdateBackupSchedulePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateBackupSchedulePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateBackupSchedulePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateBackupSchedulePayload(val *UpdateBackupSchedulePayload) *NullableUpdateBackupSchedulePayload { + return &NullableUpdateBackupSchedulePayload{value: val, isSet: true} +} + +func (v NullableUpdateBackupSchedulePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateBackupSchedulePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_update_instance_payload.go b/services/mongodbflex/model_update_instance_payload.go index a30f75ca..ee611886 100644 --- a/services/mongodbflex/model_update_instance_payload.go +++ b/services/mongodbflex/model_update_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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 @@ -31,3 +38,306 @@ 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 *ACL, backupSchedule *string, flavorId *string, name *string, options *map[string]string, replicas *int64, storage *Storage, version *string) *UpdateInstancePayload { + this := UpdateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Options = options + this.Replicas = replicas + this.Storage = storage + 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{} + return &this +} + +// GetAcl returns the Acl field value +func (o *UpdateInstancePayload) GetAcl() *ACL { + if o == nil { + var ret *ACL + 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() (*ACL, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *UpdateInstancePayload) SetAcl(v *ACL) { + 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 if set, zero value otherwise. +func (o *UpdateInstancePayload) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]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 *UpdateInstancePayload) GetLabelsOk() (*map[string]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 *UpdateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateInstancePayload) SetLabels(v *map[string]string) { + 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 +} + +// GetOptions returns the Options field value +func (o *UpdateInstancePayload) GetOptions() *map[string]string { + if o == nil { + var ret *map[string]string + 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 *UpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return o.Options, true +} + +// SetOptions sets field value +func (o *UpdateInstancePayload) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value +func (o *UpdateInstancePayload) GetReplicas() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetReplicasOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Replicas, true +} + +// SetReplicas sets field value +func (o *UpdateInstancePayload) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStorage returns the Storage field value +func (o *UpdateInstancePayload) GetStorage() *Storage { + if o == nil { + var ret *Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return o.Storage, true +} + +// SetStorage sets field value +func (o *UpdateInstancePayload) SetStorage(v *Storage) { + o.Storage = 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 + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + toSerialize["replicas"] = o.Replicas + toSerialize["storage"] = o.Storage + 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/mongodbflex/model_update_instance_response.go b/services/mongodbflex/model_update_instance_response.go index a870aab2..bad477a4 100644 --- a/services/mongodbflex/model_update_instance_response.go +++ b/services/mongodbflex/model_update_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package mongodbflex +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/mongodbflex/model_update_user_payload.go b/services/mongodbflex/model_update_user_payload.go index c446f484..9f984f81 100644 --- a/services/mongodbflex/model_update_user_payload.go +++ b/services/mongodbflex/model_update_user_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +import ( + "encoding/json" +) + +// checks if the UpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateUserPayload{} + // UpdateUserPayload struct for UpdateUserPayload type UpdateUserPayload struct { // REQUIRED @@ -17,3 +24,115 @@ type UpdateUserPayload struct { // REQUIRED Roles *[]string `json:"roles"` } + +type _UpdateUserPayload UpdateUserPayload + +// NewUpdateUserPayload instantiates a new UpdateUserPayload 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 NewUpdateUserPayload(database *string, roles *[]string) *UpdateUserPayload { + this := UpdateUserPayload{} + this.Database = database + this.Roles = roles + return &this +} + +// NewUpdateUserPayloadWithDefaults instantiates a new UpdateUserPayload 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 NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { + this := UpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value +func (o *UpdateUserPayload) GetDatabase() *string { + if o == nil { + var ret *string + return ret + } + + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Database, true +} + +// SetDatabase sets field value +func (o *UpdateUserPayload) SetDatabase(v *string) { + o.Database = v +} + +// GetRoles returns the Roles field value +func (o *UpdateUserPayload) 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 *UpdateUserPayload) GetRolesOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *UpdateUserPayload) SetRoles(v *[]string) { + o.Roles = v +} + +func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database"] = o.Database + toSerialize["roles"] = o.Roles + return toSerialize, nil +} + +type NullableUpdateUserPayload struct { + value *UpdateUserPayload + isSet bool +} + +func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { + return v.value +} + +func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { + return &NullableUpdateUserPayload{value: val, isSet: true} +} + +func (v NullableUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_user.go b/services/mongodbflex/model_user.go index 4d27981e..b80e5b29 100644 --- a/services/mongodbflex/model_user.go +++ b/services/mongodbflex/model_user.go @@ -10,6 +10,13 @@ API version: 1.0.0 package mongodbflex +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) +}