/* 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 DtoCreateSSHRequest type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DtoCreateSSHRequest{} // DtoCreateSSHRequest struct for DtoCreateSSHRequest type DtoCreateSSHRequest struct { // Only for RSA Bits *int32 `json:"bits,omitempty"` Comment *string `json:"comment,omitempty"` Name *string `json:"name,omitempty"` // \"rsa\" (default) or \"ed25519\" Type *string `json:"type,omitempty"` } // NewDtoCreateSSHRequest instantiates a new DtoCreateSSHRequest 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 NewDtoCreateSSHRequest() *DtoCreateSSHRequest { this := DtoCreateSSHRequest{} return &this } // NewDtoCreateSSHRequestWithDefaults instantiates a new DtoCreateSSHRequest 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 NewDtoCreateSSHRequestWithDefaults() *DtoCreateSSHRequest { this := DtoCreateSSHRequest{} return &this } // GetBits returns the Bits field value if set, zero value otherwise. func (o *DtoCreateSSHRequest) GetBits() int32 { if o == nil || IsNil(o.Bits) { var ret int32 return ret } return *o.Bits } // GetBitsOk returns a tuple with the Bits field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoCreateSSHRequest) GetBitsOk() (*int32, bool) { if o == nil || IsNil(o.Bits) { return nil, false } return o.Bits, true } // HasBits returns a boolean if a field has been set. func (o *DtoCreateSSHRequest) HasBits() bool { if o != nil && !IsNil(o.Bits) { return true } return false } // SetBits gets a reference to the given int32 and assigns it to the Bits field. func (o *DtoCreateSSHRequest) SetBits(v int32) { o.Bits = &v } // GetComment returns the Comment field value if set, zero value otherwise. func (o *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) SetComment(v string) { o.Comment = &v } // GetName returns the Name field value if set, zero value otherwise. func (o *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) SetName(v string) { o.Name = &v } // GetType returns the Type field value if set, zero value otherwise. func (o *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) 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 *DtoCreateSSHRequest) SetType(v string) { o.Type = &v } func (o DtoCreateSSHRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o DtoCreateSSHRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Bits) { toSerialize["bits"] = o.Bits } if !IsNil(o.Comment) { toSerialize["comment"] = o.Comment } if !IsNil(o.Name) { toSerialize["name"] = o.Name } if !IsNil(o.Type) { toSerialize["type"] = o.Type } return toSerialize, nil } type NullableDtoCreateSSHRequest struct { value *DtoCreateSSHRequest isSet bool } func (v NullableDtoCreateSSHRequest) Get() *DtoCreateSSHRequest { return v.value } func (v *NullableDtoCreateSSHRequest) Set(val *DtoCreateSSHRequest) { v.value = val v.isSet = true } func (v NullableDtoCreateSSHRequest) IsSet() bool { return v.isSet } func (v *NullableDtoCreateSSHRequest) Unset() { v.value = nil v.isSet = false } func NewNullableDtoCreateSSHRequest(val *DtoCreateSSHRequest) *NullableDtoCreateSSHRequest { return &NullableDtoCreateSSHRequest{value: val, isSet: true} } func (v NullableDtoCreateSSHRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDtoCreateSSHRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }