From 973bdb54142e48403b463d739f95c14f61571371 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 13 Nov 2024 11:04:02 +0000 Subject: [PATCH] Generate dns --- .../dns/model_import_record_sets_payload.go | 12 +- .../model_zone_models_import_record_model.go | 260 ++++++++++++++++++ .../dns/model_zone_models_import_zone_json.go | 116 ++++++++ 3 files changed, 382 insertions(+), 6 deletions(-) create mode 100644 services/dns/model_zone_models_import_record_model.go create mode 100644 services/dns/model_zone_models_import_zone_json.go diff --git a/services/dns/model_import_record_sets_payload.go b/services/dns/model_import_record_sets_payload.go index e683eee4d..8b7fc0375 100644 --- a/services/dns/model_import_record_sets_payload.go +++ b/services/dns/model_import_record_sets_payload.go @@ -19,7 +19,7 @@ var _ MappedNullable = &ImportRecordSetsPayload{} // ImportRecordSetsPayload struct for ImportRecordSetsPayload type ImportRecordSetsPayload struct { - RrSets *[]RecordDataExchange `json:"rrSets,omitempty"` + RrSets *[]ZoneModelsImportRecordModel `json:"rrSets,omitempty"` } // NewImportRecordSetsPayload instantiates a new ImportRecordSetsPayload object @@ -40,9 +40,9 @@ func NewImportRecordSetsPayloadWithDefaults() *ImportRecordSetsPayload { } // GetRrSets returns the RrSets field value if set, zero value otherwise. -func (o *ImportRecordSetsPayload) GetRrSets() *[]RecordDataExchange { +func (o *ImportRecordSetsPayload) GetRrSets() *[]ZoneModelsImportRecordModel { if o == nil || IsNil(o.RrSets) { - var ret *[]RecordDataExchange + var ret *[]ZoneModelsImportRecordModel return ret } return o.RrSets @@ -50,7 +50,7 @@ func (o *ImportRecordSetsPayload) GetRrSets() *[]RecordDataExchange { // GetRrSetsOk returns a tuple with the RrSets field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ImportRecordSetsPayload) GetRrSetsOk() (*[]RecordDataExchange, bool) { +func (o *ImportRecordSetsPayload) GetRrSetsOk() (*[]ZoneModelsImportRecordModel, bool) { if o == nil || IsNil(o.RrSets) { return nil, false } @@ -66,8 +66,8 @@ func (o *ImportRecordSetsPayload) HasRrSets() bool { return false } -// SetRrSets gets a reference to the given []RecordDataExchange and assigns it to the RrSets field. -func (o *ImportRecordSetsPayload) SetRrSets(v *[]RecordDataExchange) { +// SetRrSets gets a reference to the given []ZoneModelsImportRecordModel and assigns it to the RrSets field. +func (o *ImportRecordSetsPayload) SetRrSets(v *[]ZoneModelsImportRecordModel) { o.RrSets = v } diff --git a/services/dns/model_zone_models_import_record_model.go b/services/dns/model_zone_models_import_record_model.go new file mode 100644 index 000000000..7b068fe7c --- /dev/null +++ b/services/dns/model_zone_models_import_record_model.go @@ -0,0 +1,260 @@ +/* +STACKIT DNS API + +This api provides dns + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package dns + +import ( + "encoding/json" +) + +// checks if the ZoneModelsImportRecordModel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ZoneModelsImportRecordModel{} + +// ZoneModelsImportRecordModel struct for ZoneModelsImportRecordModel +type ZoneModelsImportRecordModel struct { + Comment *string `json:"comment,omitempty"` + Content *[]string `json:"content,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int64 `json:"ttl,omitempty"` + Type *string `json:"type,omitempty"` +} + +// NewZoneModelsImportRecordModel instantiates a new ZoneModelsImportRecordModel 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 NewZoneModelsImportRecordModel() *ZoneModelsImportRecordModel { + this := ZoneModelsImportRecordModel{} + return &this +} + +// NewZoneModelsImportRecordModelWithDefaults instantiates a new ZoneModelsImportRecordModel 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 NewZoneModelsImportRecordModelWithDefaults() *ZoneModelsImportRecordModel { + this := ZoneModelsImportRecordModel{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *ZoneModelsImportRecordModel) GetComment() *string { + if o == nil || IsNil(o.Comment) { + var ret *string + return ret + } + return o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ZoneModelsImportRecordModel) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *ZoneModelsImportRecordModel) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *ZoneModelsImportRecordModel) SetComment(v *string) { + o.Comment = v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *ZoneModelsImportRecordModel) GetContent() *[]string { + if o == nil || IsNil(o.Content) { + var ret *[]string + return ret + } + return o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ZoneModelsImportRecordModel) GetContentOk() (*[]string, bool) { + if o == nil || IsNil(o.Content) { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *ZoneModelsImportRecordModel) HasContent() bool { + if o != nil && !IsNil(o.Content) { + return true + } + + return false +} + +// SetContent gets a reference to the given []string and assigns it to the Content field. +func (o *ZoneModelsImportRecordModel) SetContent(v *[]string) { + o.Content = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ZoneModelsImportRecordModel) 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 *ZoneModelsImportRecordModel) 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 *ZoneModelsImportRecordModel) 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 *ZoneModelsImportRecordModel) SetName(v *string) { + o.Name = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *ZoneModelsImportRecordModel) GetTtl() *int64 { + if o == nil || IsNil(o.Ttl) { + var ret *int64 + return ret + } + return o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ZoneModelsImportRecordModel) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *ZoneModelsImportRecordModel) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *ZoneModelsImportRecordModel) SetTtl(v *int64) { + o.Ttl = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ZoneModelsImportRecordModel) 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 *ZoneModelsImportRecordModel) 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 *ZoneModelsImportRecordModel) 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 *ZoneModelsImportRecordModel) SetType(v *string) { + o.Type = v +} + +func (o ZoneModelsImportRecordModel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.Content) { + toSerialize["content"] = o.Content + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableZoneModelsImportRecordModel struct { + value *ZoneModelsImportRecordModel + isSet bool +} + +func (v NullableZoneModelsImportRecordModel) Get() *ZoneModelsImportRecordModel { + return v.value +} + +func (v *NullableZoneModelsImportRecordModel) Set(val *ZoneModelsImportRecordModel) { + v.value = val + v.isSet = true +} + +func (v NullableZoneModelsImportRecordModel) IsSet() bool { + return v.isSet +} + +func (v *NullableZoneModelsImportRecordModel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZoneModelsImportRecordModel(val *ZoneModelsImportRecordModel) *NullableZoneModelsImportRecordModel { + return &NullableZoneModelsImportRecordModel{value: val, isSet: true} +} + +func (v NullableZoneModelsImportRecordModel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZoneModelsImportRecordModel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/dns/model_zone_models_import_zone_json.go b/services/dns/model_zone_models_import_zone_json.go new file mode 100644 index 000000000..b3c61c1d3 --- /dev/null +++ b/services/dns/model_zone_models_import_zone_json.go @@ -0,0 +1,116 @@ +/* +STACKIT DNS API + +This api provides dns + +API version: 1.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package dns + +import ( + "encoding/json" +) + +// checks if the ZoneModelsImportZoneJson type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ZoneModelsImportZoneJson{} + +// ZoneModelsImportZoneJson struct for ZoneModelsImportZoneJson +type ZoneModelsImportZoneJson struct { + RrSets *[]ZoneModelsImportRecordModel `json:"rrSets,omitempty"` +} + +// NewZoneModelsImportZoneJson instantiates a new ZoneModelsImportZoneJson 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 NewZoneModelsImportZoneJson() *ZoneModelsImportZoneJson { + this := ZoneModelsImportZoneJson{} + return &this +} + +// NewZoneModelsImportZoneJsonWithDefaults instantiates a new ZoneModelsImportZoneJson 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 NewZoneModelsImportZoneJsonWithDefaults() *ZoneModelsImportZoneJson { + this := ZoneModelsImportZoneJson{} + return &this +} + +// GetRrSets returns the RrSets field value if set, zero value otherwise. +func (o *ZoneModelsImportZoneJson) GetRrSets() *[]ZoneModelsImportRecordModel { + if o == nil || IsNil(o.RrSets) { + var ret *[]ZoneModelsImportRecordModel + return ret + } + return o.RrSets +} + +// GetRrSetsOk returns a tuple with the RrSets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ZoneModelsImportZoneJson) GetRrSetsOk() (*[]ZoneModelsImportRecordModel, bool) { + if o == nil || IsNil(o.RrSets) { + return nil, false + } + return o.RrSets, true +} + +// HasRrSets returns a boolean if a field has been set. +func (o *ZoneModelsImportZoneJson) HasRrSets() bool { + if o != nil && !IsNil(o.RrSets) { + return true + } + + return false +} + +// SetRrSets gets a reference to the given []ZoneModelsImportRecordModel and assigns it to the RrSets field. +func (o *ZoneModelsImportZoneJson) SetRrSets(v *[]ZoneModelsImportRecordModel) { + o.RrSets = v +} + +func (o ZoneModelsImportZoneJson) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RrSets) { + toSerialize["rrSets"] = o.RrSets + } + return toSerialize, nil +} + +type NullableZoneModelsImportZoneJson struct { + value *ZoneModelsImportZoneJson + isSet bool +} + +func (v NullableZoneModelsImportZoneJson) Get() *ZoneModelsImportZoneJson { + return v.value +} + +func (v *NullableZoneModelsImportZoneJson) Set(val *ZoneModelsImportZoneJson) { + v.value = val + v.isSet = true +} + +func (v NullableZoneModelsImportZoneJson) IsSet() bool { + return v.isSet +} + +func (v *NullableZoneModelsImportZoneJson) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZoneModelsImportZoneJson(val *ZoneModelsImportZoneJson) *NullableZoneModelsImportZoneJson { + return &NullableZoneModelsImportZoneJson{value: val, isSet: true} +} + +func (v NullableZoneModelsImportZoneJson) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZoneModelsImportZoneJson) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}