/* AutoGlue API API for managing K3s clusters across cloud providers API version: 1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package autoglue import ( "encoding/json" ) // checks if the DtoCreateServerRequest type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DtoCreateServerRequest{} // DtoCreateServerRequest struct for DtoCreateServerRequest type DtoCreateServerRequest struct { Hostname *string `json:"hostname,omitempty"` PrivateIpAddress *string `json:"private_ip_address,omitempty"` PublicIpAddress *string `json:"public_ip_address,omitempty"` Role *string `json:"role,omitempty"` SshKeyId *string `json:"ssh_key_id,omitempty"` SshUser *string `json:"ssh_user,omitempty"` Status *string `json:"status,omitempty"` } // NewDtoCreateServerRequest instantiates a new DtoCreateServerRequest 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 NewDtoCreateServerRequest() *DtoCreateServerRequest { this := DtoCreateServerRequest{} return &this } // NewDtoCreateServerRequestWithDefaults instantiates a new DtoCreateServerRequest 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 NewDtoCreateServerRequestWithDefaults() *DtoCreateServerRequest { this := DtoCreateServerRequest{} return &this } // GetHostname returns the Hostname field value if set, zero value otherwise. func (o *DtoCreateServerRequest) GetHostname() string { if o == nil || IsNil(o.Hostname) { var ret string return ret } return *o.Hostname } // GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoCreateServerRequest) GetHostnameOk() (*string, bool) { if o == nil || IsNil(o.Hostname) { return nil, false } return o.Hostname, true } // HasHostname returns a boolean if a field has been set. func (o *DtoCreateServerRequest) HasHostname() bool { if o != nil && !IsNil(o.Hostname) { return true } return false } // SetHostname gets a reference to the given string and assigns it to the Hostname field. func (o *DtoCreateServerRequest) SetHostname(v string) { o.Hostname = &v } // GetPrivateIpAddress returns the PrivateIpAddress field value if set, zero value otherwise. func (o *DtoCreateServerRequest) GetPrivateIpAddress() string { if o == nil || IsNil(o.PrivateIpAddress) { var ret string return ret } return *o.PrivateIpAddress } // GetPrivateIpAddressOk returns a tuple with the PrivateIpAddress field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoCreateServerRequest) GetPrivateIpAddressOk() (*string, bool) { if o == nil || IsNil(o.PrivateIpAddress) { return nil, false } return o.PrivateIpAddress, true } // HasPrivateIpAddress returns a boolean if a field has been set. func (o *DtoCreateServerRequest) HasPrivateIpAddress() bool { if o != nil && !IsNil(o.PrivateIpAddress) { return true } return false } // SetPrivateIpAddress gets a reference to the given string and assigns it to the PrivateIpAddress field. func (o *DtoCreateServerRequest) SetPrivateIpAddress(v string) { o.PrivateIpAddress = &v } // GetPublicIpAddress returns the PublicIpAddress field value if set, zero value otherwise. func (o *DtoCreateServerRequest) GetPublicIpAddress() string { if o == nil || IsNil(o.PublicIpAddress) { var ret string return ret } return *o.PublicIpAddress } // GetPublicIpAddressOk returns a tuple with the PublicIpAddress field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoCreateServerRequest) GetPublicIpAddressOk() (*string, bool) { if o == nil || IsNil(o.PublicIpAddress) { return nil, false } return o.PublicIpAddress, true } // HasPublicIpAddress returns a boolean if a field has been set. func (o *DtoCreateServerRequest) HasPublicIpAddress() bool { if o != nil && !IsNil(o.PublicIpAddress) { return true } return false } // SetPublicIpAddress gets a reference to the given string and assigns it to the PublicIpAddress field. func (o *DtoCreateServerRequest) SetPublicIpAddress(v string) { o.PublicIpAddress = &v } // GetRole returns the Role field value if set, zero value otherwise. func (o *DtoCreateServerRequest) GetRole() string { if o == nil || IsNil(o.Role) { var ret string return ret } return *o.Role } // GetRoleOk returns a tuple with the Role field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoCreateServerRequest) GetRoleOk() (*string, bool) { if o == nil || IsNil(o.Role) { return nil, false } return o.Role, true } // HasRole returns a boolean if a field has been set. func (o *DtoCreateServerRequest) HasRole() bool { if o != nil && !IsNil(o.Role) { return true } return false } // SetRole gets a reference to the given string and assigns it to the Role field. func (o *DtoCreateServerRequest) SetRole(v string) { o.Role = &v } // GetSshKeyId returns the SshKeyId field value if set, zero value otherwise. func (o *DtoCreateServerRequest) GetSshKeyId() string { if o == nil || IsNil(o.SshKeyId) { var ret string return ret } return *o.SshKeyId } // GetSshKeyIdOk returns a tuple with the SshKeyId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoCreateServerRequest) GetSshKeyIdOk() (*string, bool) { if o == nil || IsNil(o.SshKeyId) { return nil, false } return o.SshKeyId, true } // HasSshKeyId returns a boolean if a field has been set. func (o *DtoCreateServerRequest) HasSshKeyId() bool { if o != nil && !IsNil(o.SshKeyId) { return true } return false } // SetSshKeyId gets a reference to the given string and assigns it to the SshKeyId field. func (o *DtoCreateServerRequest) SetSshKeyId(v string) { o.SshKeyId = &v } // GetSshUser returns the SshUser field value if set, zero value otherwise. func (o *DtoCreateServerRequest) GetSshUser() string { if o == nil || IsNil(o.SshUser) { var ret string return ret } return *o.SshUser } // GetSshUserOk returns a tuple with the SshUser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoCreateServerRequest) GetSshUserOk() (*string, bool) { if o == nil || IsNil(o.SshUser) { return nil, false } return o.SshUser, true } // HasSshUser returns a boolean if a field has been set. func (o *DtoCreateServerRequest) HasSshUser() bool { if o != nil && !IsNil(o.SshUser) { return true } return false } // SetSshUser gets a reference to the given string and assigns it to the SshUser field. func (o *DtoCreateServerRequest) SetSshUser(v string) { o.SshUser = &v } // GetStatus returns the Status field value if set, zero value otherwise. func (o *DtoCreateServerRequest) 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 *DtoCreateServerRequest) 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 *DtoCreateServerRequest) 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 *DtoCreateServerRequest) SetStatus(v string) { o.Status = &v } func (o DtoCreateServerRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o DtoCreateServerRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Hostname) { toSerialize["hostname"] = o.Hostname } if !IsNil(o.PrivateIpAddress) { toSerialize["private_ip_address"] = o.PrivateIpAddress } if !IsNil(o.PublicIpAddress) { toSerialize["public_ip_address"] = o.PublicIpAddress } if !IsNil(o.Role) { toSerialize["role"] = o.Role } if !IsNil(o.SshKeyId) { toSerialize["ssh_key_id"] = o.SshKeyId } if !IsNil(o.SshUser) { toSerialize["ssh_user"] = o.SshUser } if !IsNil(o.Status) { toSerialize["status"] = o.Status } return toSerialize, nil } type NullableDtoCreateServerRequest struct { value *DtoCreateServerRequest isSet bool } func (v NullableDtoCreateServerRequest) Get() *DtoCreateServerRequest { return v.value } func (v *NullableDtoCreateServerRequest) Set(val *DtoCreateServerRequest) { v.value = val v.isSet = true } func (v NullableDtoCreateServerRequest) IsSet() bool { return v.isSet } func (v *NullableDtoCreateServerRequest) Unset() { v.value = nil v.isSet = false } func NewNullableDtoCreateServerRequest(val *DtoCreateServerRequest) *NullableDtoCreateServerRequest { return &NullableDtoCreateServerRequest{value: val, isSet: true} } func (v NullableDtoCreateServerRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDtoCreateServerRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }