/* STACKIT Run Commands Service API API endpoints for the STACKIT Run Commands Service API API version: 2beta.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package runcommandbeta import ( "encoding/json" ) // checks if the CommandTemplate type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CommandTemplate{} /* types and functions for name */ // isNotNullableString type CommandTemplateGetNameAttributeType = *string func getCommandTemplateGetNameAttributeTypeOk(arg CommandTemplateGetNameAttributeType) (ret CommandTemplateGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCommandTemplateGetNameAttributeType(arg *CommandTemplateGetNameAttributeType, val CommandTemplateGetNameRetType) { *arg = &val } type CommandTemplateGetNameArgType = string type CommandTemplateGetNameRetType = string /* types and functions for osType */ // isArray type CommandTemplateGetOsTypeAttributeType = *[]string type CommandTemplateGetOsTypeArgType = []string type CommandTemplateGetOsTypeRetType = []string func getCommandTemplateGetOsTypeAttributeTypeOk(arg CommandTemplateGetOsTypeAttributeType) (ret CommandTemplateGetOsTypeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCommandTemplateGetOsTypeAttributeType(arg *CommandTemplateGetOsTypeAttributeType, val CommandTemplateGetOsTypeRetType) { *arg = &val } /* types and functions for title */ // isNotNullableString type CommandTemplateGetTitleAttributeType = *string func getCommandTemplateGetTitleAttributeTypeOk(arg CommandTemplateGetTitleAttributeType) (ret CommandTemplateGetTitleRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCommandTemplateGetTitleAttributeType(arg *CommandTemplateGetTitleAttributeType, val CommandTemplateGetTitleRetType) { *arg = &val } type CommandTemplateGetTitleArgType = string type CommandTemplateGetTitleRetType = string // CommandTemplate struct for CommandTemplate type CommandTemplate struct { Name CommandTemplateGetNameAttributeType `json:"name,omitempty"` OsType CommandTemplateGetOsTypeAttributeType `json:"osType,omitempty"` Title CommandTemplateGetTitleAttributeType `json:"title,omitempty"` } // NewCommandTemplate instantiates a new CommandTemplate 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 NewCommandTemplate() *CommandTemplate { this := CommandTemplate{} return &this } // NewCommandTemplateWithDefaults instantiates a new CommandTemplate 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 NewCommandTemplateWithDefaults() *CommandTemplate { this := CommandTemplate{} return &this } // GetName returns the Name field value if set, zero value otherwise. func (o *CommandTemplate) GetName() (res CommandTemplateGetNameRetType) { res, _ = o.GetNameOk() return } // 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 *CommandTemplate) GetNameOk() (ret CommandTemplateGetNameRetType, ok bool) { return getCommandTemplateGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *CommandTemplate) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *CommandTemplate) SetName(v CommandTemplateGetNameRetType) { setCommandTemplateGetNameAttributeType(&o.Name, v) } // GetOsType returns the OsType field value if set, zero value otherwise. func (o *CommandTemplate) GetOsType() (res CommandTemplateGetOsTypeRetType) { res, _ = o.GetOsTypeOk() return } // GetOsTypeOk returns a tuple with the OsType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CommandTemplate) GetOsTypeOk() (ret CommandTemplateGetOsTypeRetType, ok bool) { return getCommandTemplateGetOsTypeAttributeTypeOk(o.OsType) } // HasOsType returns a boolean if a field has been set. func (o *CommandTemplate) HasOsType() bool { _, ok := o.GetOsTypeOk() return ok } // SetOsType gets a reference to the given []string and assigns it to the OsType field. func (o *CommandTemplate) SetOsType(v CommandTemplateGetOsTypeRetType) { setCommandTemplateGetOsTypeAttributeType(&o.OsType, v) } // GetTitle returns the Title field value if set, zero value otherwise. func (o *CommandTemplate) GetTitle() (res CommandTemplateGetTitleRetType) { res, _ = o.GetTitleOk() return } // GetTitleOk returns a tuple with the Title field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CommandTemplate) GetTitleOk() (ret CommandTemplateGetTitleRetType, ok bool) { return getCommandTemplateGetTitleAttributeTypeOk(o.Title) } // HasTitle returns a boolean if a field has been set. func (o *CommandTemplate) HasTitle() bool { _, ok := o.GetTitleOk() return ok } // SetTitle gets a reference to the given string and assigns it to the Title field. func (o *CommandTemplate) SetTitle(v CommandTemplateGetTitleRetType) { setCommandTemplateGetTitleAttributeType(&o.Title, v) } func (o CommandTemplate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCommandTemplateGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getCommandTemplateGetOsTypeAttributeTypeOk(o.OsType); ok { toSerialize["OsType"] = val } if val, ok := getCommandTemplateGetTitleAttributeTypeOk(o.Title); ok { toSerialize["Title"] = val } return toSerialize, nil } type NullableCommandTemplate struct { value *CommandTemplate isSet bool } func (v NullableCommandTemplate) Get() *CommandTemplate { return v.value } func (v *NullableCommandTemplate) Set(val *CommandTemplate) { v.value = val v.isSet = true } func (v NullableCommandTemplate) IsSet() bool { return v.isSet } func (v *NullableCommandTemplate) Unset() { v.value = nil v.isSet = false } func NewNullableCommandTemplate(val *CommandTemplate) *NullableCommandTemplate { return &NullableCommandTemplate{value: val, isSet: true} } func (v NullableCommandTemplate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCommandTemplate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }