terraform-provider-stackitp.../pkg/runcommandbeta/model_command_template_schema.go

318 lines
11 KiB
Go

/*
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 CommandTemplateSchema type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CommandTemplateSchema{}
/*
types and functions for description
*/
// isNotNullableString
type CommandTemplateSchemaGetDescriptionAttributeType = *string
func getCommandTemplateSchemaGetDescriptionAttributeTypeOk(arg CommandTemplateSchemaGetDescriptionAttributeType) (ret CommandTemplateSchemaGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCommandTemplateSchemaGetDescriptionAttributeType(arg *CommandTemplateSchemaGetDescriptionAttributeType, val CommandTemplateSchemaGetDescriptionRetType) {
*arg = &val
}
type CommandTemplateSchemaGetDescriptionArgType = string
type CommandTemplateSchemaGetDescriptionRetType = string
/*
types and functions for name
*/
// isNotNullableString
type CommandTemplateSchemaGetNameAttributeType = *string
func getCommandTemplateSchemaGetNameAttributeTypeOk(arg CommandTemplateSchemaGetNameAttributeType) (ret CommandTemplateSchemaGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCommandTemplateSchemaGetNameAttributeType(arg *CommandTemplateSchemaGetNameAttributeType, val CommandTemplateSchemaGetNameRetType) {
*arg = &val
}
type CommandTemplateSchemaGetNameArgType = string
type CommandTemplateSchemaGetNameRetType = string
/*
types and functions for osType
*/
// isArray
type CommandTemplateSchemaGetOsTypeAttributeType = *[]string
type CommandTemplateSchemaGetOsTypeArgType = []string
type CommandTemplateSchemaGetOsTypeRetType = []string
func getCommandTemplateSchemaGetOsTypeAttributeTypeOk(arg CommandTemplateSchemaGetOsTypeAttributeType) (ret CommandTemplateSchemaGetOsTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCommandTemplateSchemaGetOsTypeAttributeType(arg *CommandTemplateSchemaGetOsTypeAttributeType, val CommandTemplateSchemaGetOsTypeRetType) {
*arg = &val
}
/*
types and functions for parameterSchema
*/
// isModel
type CommandTemplateSchemaGetParameterSchemaAttributeType = *ParametersSchema
type CommandTemplateSchemaGetParameterSchemaArgType = ParametersSchema
type CommandTemplateSchemaGetParameterSchemaRetType = ParametersSchema
func getCommandTemplateSchemaGetParameterSchemaAttributeTypeOk(arg CommandTemplateSchemaGetParameterSchemaAttributeType) (ret CommandTemplateSchemaGetParameterSchemaRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCommandTemplateSchemaGetParameterSchemaAttributeType(arg *CommandTemplateSchemaGetParameterSchemaAttributeType, val CommandTemplateSchemaGetParameterSchemaRetType) {
*arg = &val
}
/*
types and functions for title
*/
// isNotNullableString
type CommandTemplateSchemaGetTitleAttributeType = *string
func getCommandTemplateSchemaGetTitleAttributeTypeOk(arg CommandTemplateSchemaGetTitleAttributeType) (ret CommandTemplateSchemaGetTitleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCommandTemplateSchemaGetTitleAttributeType(arg *CommandTemplateSchemaGetTitleAttributeType, val CommandTemplateSchemaGetTitleRetType) {
*arg = &val
}
type CommandTemplateSchemaGetTitleArgType = string
type CommandTemplateSchemaGetTitleRetType = string
// CommandTemplateSchema struct for CommandTemplateSchema
type CommandTemplateSchema struct {
Description CommandTemplateSchemaGetDescriptionAttributeType `json:"description,omitempty"`
Name CommandTemplateSchemaGetNameAttributeType `json:"name,omitempty"`
OsType CommandTemplateSchemaGetOsTypeAttributeType `json:"osType,omitempty"`
ParameterSchema CommandTemplateSchemaGetParameterSchemaAttributeType `json:"parameterSchema,omitempty"`
Title CommandTemplateSchemaGetTitleAttributeType `json:"title,omitempty"`
}
// NewCommandTemplateSchema instantiates a new CommandTemplateSchema 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 NewCommandTemplateSchema() *CommandTemplateSchema {
this := CommandTemplateSchema{}
return &this
}
// NewCommandTemplateSchemaWithDefaults instantiates a new CommandTemplateSchema 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 NewCommandTemplateSchemaWithDefaults() *CommandTemplateSchema {
this := CommandTemplateSchema{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CommandTemplateSchema) GetDescription() (res CommandTemplateSchemaGetDescriptionRetType) {
res, _ = o.GetDescriptionOk()
return
}
// 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 *CommandTemplateSchema) GetDescriptionOk() (ret CommandTemplateSchemaGetDescriptionRetType, ok bool) {
return getCommandTemplateSchemaGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CommandTemplateSchema) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CommandTemplateSchema) SetDescription(v CommandTemplateSchemaGetDescriptionRetType) {
setCommandTemplateSchemaGetDescriptionAttributeType(&o.Description, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CommandTemplateSchema) GetName() (res CommandTemplateSchemaGetNameRetType) {
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 *CommandTemplateSchema) GetNameOk() (ret CommandTemplateSchemaGetNameRetType, ok bool) {
return getCommandTemplateSchemaGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CommandTemplateSchema) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CommandTemplateSchema) SetName(v CommandTemplateSchemaGetNameRetType) {
setCommandTemplateSchemaGetNameAttributeType(&o.Name, v)
}
// GetOsType returns the OsType field value if set, zero value otherwise.
func (o *CommandTemplateSchema) GetOsType() (res CommandTemplateSchemaGetOsTypeRetType) {
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 *CommandTemplateSchema) GetOsTypeOk() (ret CommandTemplateSchemaGetOsTypeRetType, ok bool) {
return getCommandTemplateSchemaGetOsTypeAttributeTypeOk(o.OsType)
}
// HasOsType returns a boolean if a field has been set.
func (o *CommandTemplateSchema) HasOsType() bool {
_, ok := o.GetOsTypeOk()
return ok
}
// SetOsType gets a reference to the given []string and assigns it to the OsType field.
func (o *CommandTemplateSchema) SetOsType(v CommandTemplateSchemaGetOsTypeRetType) {
setCommandTemplateSchemaGetOsTypeAttributeType(&o.OsType, v)
}
// GetParameterSchema returns the ParameterSchema field value if set, zero value otherwise.
func (o *CommandTemplateSchema) GetParameterSchema() (res CommandTemplateSchemaGetParameterSchemaRetType) {
res, _ = o.GetParameterSchemaOk()
return
}
// GetParameterSchemaOk returns a tuple with the ParameterSchema field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CommandTemplateSchema) GetParameterSchemaOk() (ret CommandTemplateSchemaGetParameterSchemaRetType, ok bool) {
return getCommandTemplateSchemaGetParameterSchemaAttributeTypeOk(o.ParameterSchema)
}
// HasParameterSchema returns a boolean if a field has been set.
func (o *CommandTemplateSchema) HasParameterSchema() bool {
_, ok := o.GetParameterSchemaOk()
return ok
}
// SetParameterSchema gets a reference to the given ParametersSchema and assigns it to the ParameterSchema field.
func (o *CommandTemplateSchema) SetParameterSchema(v CommandTemplateSchemaGetParameterSchemaRetType) {
setCommandTemplateSchemaGetParameterSchemaAttributeType(&o.ParameterSchema, v)
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *CommandTemplateSchema) GetTitle() (res CommandTemplateSchemaGetTitleRetType) {
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 *CommandTemplateSchema) GetTitleOk() (ret CommandTemplateSchemaGetTitleRetType, ok bool) {
return getCommandTemplateSchemaGetTitleAttributeTypeOk(o.Title)
}
// HasTitle returns a boolean if a field has been set.
func (o *CommandTemplateSchema) HasTitle() bool {
_, ok := o.GetTitleOk()
return ok
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *CommandTemplateSchema) SetTitle(v CommandTemplateSchemaGetTitleRetType) {
setCommandTemplateSchemaGetTitleAttributeType(&o.Title, v)
}
func (o CommandTemplateSchema) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCommandTemplateSchemaGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCommandTemplateSchemaGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCommandTemplateSchemaGetOsTypeAttributeTypeOk(o.OsType); ok {
toSerialize["OsType"] = val
}
if val, ok := getCommandTemplateSchemaGetParameterSchemaAttributeTypeOk(o.ParameterSchema); ok {
toSerialize["ParameterSchema"] = val
}
if val, ok := getCommandTemplateSchemaGetTitleAttributeTypeOk(o.Title); ok {
toSerialize["Title"] = val
}
return toSerialize, nil
}
type NullableCommandTemplateSchema struct {
value *CommandTemplateSchema
isSet bool
}
func (v NullableCommandTemplateSchema) Get() *CommandTemplateSchema {
return v.value
}
func (v *NullableCommandTemplateSchema) Set(val *CommandTemplateSchema) {
v.value = val
v.isSet = true
}
func (v NullableCommandTemplateSchema) IsSet() bool {
return v.isSet
}
func (v *NullableCommandTemplateSchema) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCommandTemplateSchema(val *CommandTemplateSchema) *NullableCommandTemplateSchema {
return &NullableCommandTemplateSchema{value: val, isSet: true}
}
func (v NullableCommandTemplateSchema) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCommandTemplateSchema) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}