diff --git a/services/runcommand/CHANGELOG.md b/services/runcommand/CHANGELOG.md index 6ea07c280..1ecb24f33 100644 --- a/services/runcommand/CHANGELOG.md +++ b/services/runcommand/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.2.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.1.0 (2024-07-19) - **New**: STACKIT Run Command module can be used to run remote commands and custom scripts on VMs diff --git a/services/runcommand/model_command_details.go b/services/runcommand/model_command_details.go index 25ab958f6..7fb7867e5 100644 --- a/services/runcommand/model_command_details.go +++ b/services/runcommand/model_command_details.go @@ -10,6 +10,13 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the CommandDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CommandDetails{} + // CommandDetails struct for CommandDetails type CommandDetails struct { CommandTemplateName *string `json:"commandTemplateName,omitempty"` @@ -24,3 +31,376 @@ type CommandDetails struct { StartedAt *string `json:"startedAt,omitempty"` Status *string `json:"status,omitempty"` } + +// NewCommandDetails instantiates a new CommandDetails 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 NewCommandDetails() *CommandDetails { + this := CommandDetails{} + return &this +} + +// NewCommandDetailsWithDefaults instantiates a new CommandDetails 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 NewCommandDetailsWithDefaults() *CommandDetails { + this := CommandDetails{} + return &this +} + +// GetCommandTemplateName returns the CommandTemplateName field value if set, zero value otherwise. +func (o *CommandDetails) GetCommandTemplateName() *string { + if o == nil || IsNil(o.CommandTemplateName) { + var ret *string + return ret + } + return o.CommandTemplateName +} + +// GetCommandTemplateNameOk returns a tuple with the CommandTemplateName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetCommandTemplateNameOk() (*string, bool) { + if o == nil || IsNil(o.CommandTemplateName) { + return nil, false + } + return o.CommandTemplateName, true +} + +// HasCommandTemplateName returns a boolean if a field has been set. +func (o *CommandDetails) HasCommandTemplateName() bool { + if o != nil && !IsNil(o.CommandTemplateName) { + return true + } + + return false +} + +// SetCommandTemplateName gets a reference to the given string and assigns it to the CommandTemplateName field. +func (o *CommandDetails) SetCommandTemplateName(v *string) { + o.CommandTemplateName = v +} + +// GetCommandTemplateTitle returns the CommandTemplateTitle field value if set, zero value otherwise. +func (o *CommandDetails) GetCommandTemplateTitle() *string { + if o == nil || IsNil(o.CommandTemplateTitle) { + var ret *string + return ret + } + return o.CommandTemplateTitle +} + +// GetCommandTemplateTitleOk returns a tuple with the CommandTemplateTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetCommandTemplateTitleOk() (*string, bool) { + if o == nil || IsNil(o.CommandTemplateTitle) { + return nil, false + } + return o.CommandTemplateTitle, true +} + +// HasCommandTemplateTitle returns a boolean if a field has been set. +func (o *CommandDetails) HasCommandTemplateTitle() bool { + if o != nil && !IsNil(o.CommandTemplateTitle) { + return true + } + + return false +} + +// SetCommandTemplateTitle gets a reference to the given string and assigns it to the CommandTemplateTitle field. +func (o *CommandDetails) SetCommandTemplateTitle(v *string) { + o.CommandTemplateTitle = v +} + +// GetExitCode returns the ExitCode field value if set, zero value otherwise. +func (o *CommandDetails) GetExitCode() *int64 { + if o == nil || IsNil(o.ExitCode) { + var ret *int64 + return ret + } + return o.ExitCode +} + +// GetExitCodeOk returns a tuple with the ExitCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetExitCodeOk() (*int64, bool) { + if o == nil || IsNil(o.ExitCode) { + return nil, false + } + return o.ExitCode, true +} + +// HasExitCode returns a boolean if a field has been set. +func (o *CommandDetails) HasExitCode() bool { + if o != nil && !IsNil(o.ExitCode) { + return true + } + + return false +} + +// SetExitCode gets a reference to the given int64 and assigns it to the ExitCode field. +func (o *CommandDetails) SetExitCode(v *int64) { + o.ExitCode = v +} + +// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise. +func (o *CommandDetails) GetFinishedAt() *string { + if o == nil || IsNil(o.FinishedAt) { + var ret *string + return ret + } + return o.FinishedAt +} + +// GetFinishedAtOk returns a tuple with the FinishedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetFinishedAtOk() (*string, bool) { + if o == nil || IsNil(o.FinishedAt) { + return nil, false + } + return o.FinishedAt, true +} + +// HasFinishedAt returns a boolean if a field has been set. +func (o *CommandDetails) HasFinishedAt() bool { + if o != nil && !IsNil(o.FinishedAt) { + return true + } + + return false +} + +// SetFinishedAt gets a reference to the given string and assigns it to the FinishedAt field. +func (o *CommandDetails) SetFinishedAt(v *string) { + o.FinishedAt = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CommandDetails) GetId() *int64 { + if o == nil || IsNil(o.Id) { + var ret *int64 + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CommandDetails) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *CommandDetails) SetId(v *int64) { + o.Id = v +} + +// GetOutput returns the Output field value if set, zero value otherwise. +func (o *CommandDetails) GetOutput() *string { + if o == nil || IsNil(o.Output) { + var ret *string + return ret + } + return o.Output +} + +// GetOutputOk returns a tuple with the Output field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetOutputOk() (*string, bool) { + if o == nil || IsNil(o.Output) { + return nil, false + } + return o.Output, true +} + +// HasOutput returns a boolean if a field has been set. +func (o *CommandDetails) HasOutput() bool { + if o != nil && !IsNil(o.Output) { + return true + } + + return false +} + +// SetOutput gets a reference to the given string and assigns it to the Output field. +func (o *CommandDetails) SetOutput(v *string) { + o.Output = v +} + +// GetScript returns the Script field value if set, zero value otherwise. +func (o *CommandDetails) GetScript() *string { + if o == nil || IsNil(o.Script) { + var ret *string + return ret + } + return o.Script +} + +// GetScriptOk returns a tuple with the Script field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetScriptOk() (*string, bool) { + if o == nil || IsNil(o.Script) { + return nil, false + } + return o.Script, true +} + +// HasScript returns a boolean if a field has been set. +func (o *CommandDetails) HasScript() bool { + if o != nil && !IsNil(o.Script) { + return true + } + + return false +} + +// SetScript gets a reference to the given string and assigns it to the Script field. +func (o *CommandDetails) SetScript(v *string) { + o.Script = v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *CommandDetails) GetStartedAt() *string { + if o == nil || IsNil(o.StartedAt) { + var ret *string + return ret + } + return o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandDetails) GetStartedAtOk() (*string, bool) { + if o == nil || IsNil(o.StartedAt) { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *CommandDetails) HasStartedAt() bool { + if o != nil && !IsNil(o.StartedAt) { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given string and assigns it to the StartedAt field. +func (o *CommandDetails) SetStartedAt(v *string) { + o.StartedAt = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CommandDetails) 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 *CommandDetails) 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 *CommandDetails) 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 *CommandDetails) SetStatus(v *string) { + o.Status = v +} + +func (o CommandDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CommandTemplateName) { + toSerialize["commandTemplateName"] = o.CommandTemplateName + } + if !IsNil(o.CommandTemplateTitle) { + toSerialize["commandTemplateTitle"] = o.CommandTemplateTitle + } + if !IsNil(o.ExitCode) { + toSerialize["exitCode"] = o.ExitCode + } + if !IsNil(o.FinishedAt) { + toSerialize["finishedAt"] = o.FinishedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Output) { + toSerialize["output"] = o.Output + } + if !IsNil(o.Script) { + toSerialize["script"] = o.Script + } + if !IsNil(o.StartedAt) { + toSerialize["startedAt"] = o.StartedAt + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableCommandDetails struct { + value *CommandDetails + isSet bool +} + +func (v NullableCommandDetails) Get() *CommandDetails { + return v.value +} + +func (v *NullableCommandDetails) Set(val *CommandDetails) { + v.value = val + v.isSet = true +} + +func (v NullableCommandDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableCommandDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCommandDetails(val *CommandDetails) *NullableCommandDetails { + return &NullableCommandDetails{value: val, isSet: true} +} + +func (v NullableCommandDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCommandDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_command_template.go b/services/runcommand/model_command_template.go index 57627b8ca..8ec716ec0 100644 --- a/services/runcommand/model_command_template.go +++ b/services/runcommand/model_command_template.go @@ -10,9 +10,179 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the CommandTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CommandTemplate{} + // CommandTemplate struct for CommandTemplate type CommandTemplate struct { Name *string `json:"name,omitempty"` OsType *[]string `json:"osType,omitempty"` Title *string `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() *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 *CommandTemplate) 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 *CommandTemplate) 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 *CommandTemplate) SetName(v *string) { + o.Name = v +} + +// GetOsType returns the OsType field value if set, zero value otherwise. +func (o *CommandTemplate) GetOsType() *[]string { + if o == nil || IsNil(o.OsType) { + var ret *[]string + return ret + } + return o.OsType +} + +// 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() (*[]string, bool) { + if o == nil || IsNil(o.OsType) { + return nil, false + } + return o.OsType, true +} + +// HasOsType returns a boolean if a field has been set. +func (o *CommandTemplate) HasOsType() bool { + if o != nil && !IsNil(o.OsType) { + return true + } + + return false +} + +// SetOsType gets a reference to the given []string and assigns it to the OsType field. +func (o *CommandTemplate) SetOsType(v *[]string) { + o.OsType = v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *CommandTemplate) GetTitle() *string { + if o == nil || IsNil(o.Title) { + var ret *string + return ret + } + return o.Title +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *CommandTemplate) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *CommandTemplate) SetTitle(v *string) { + o.Title = v +} + +func (o CommandTemplate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.OsType) { + toSerialize["osType"] = o.OsType + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + 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) +} diff --git a/services/runcommand/model_command_template_response.go b/services/runcommand/model_command_template_response.go index 701f34cb1..6ad0932b0 100644 --- a/services/runcommand/model_command_template_response.go +++ b/services/runcommand/model_command_template_response.go @@ -10,7 +10,107 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the CommandTemplateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CommandTemplateResponse{} + // CommandTemplateResponse struct for CommandTemplateResponse type CommandTemplateResponse struct { Items *[]CommandTemplate `json:"items,omitempty"` } + +// NewCommandTemplateResponse instantiates a new CommandTemplateResponse 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 NewCommandTemplateResponse() *CommandTemplateResponse { + this := CommandTemplateResponse{} + return &this +} + +// NewCommandTemplateResponseWithDefaults instantiates a new CommandTemplateResponse 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 NewCommandTemplateResponseWithDefaults() *CommandTemplateResponse { + this := CommandTemplateResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *CommandTemplateResponse) GetItems() *[]CommandTemplate { + if o == nil || IsNil(o.Items) { + var ret *[]CommandTemplate + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CommandTemplateResponse) GetItemsOk() (*[]CommandTemplate, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *CommandTemplateResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []CommandTemplate and assigns it to the Items field. +func (o *CommandTemplateResponse) SetItems(v *[]CommandTemplate) { + o.Items = v +} + +func (o CommandTemplateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableCommandTemplateResponse struct { + value *CommandTemplateResponse + isSet bool +} + +func (v NullableCommandTemplateResponse) Get() *CommandTemplateResponse { + return v.value +} + +func (v *NullableCommandTemplateResponse) Set(val *CommandTemplateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCommandTemplateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCommandTemplateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCommandTemplateResponse(val *CommandTemplateResponse) *NullableCommandTemplateResponse { + return &NullableCommandTemplateResponse{value: val, isSet: true} +} + +func (v NullableCommandTemplateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCommandTemplateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_command_template_schema.go b/services/runcommand/model_command_template_schema.go index 4ae8a97e9..a4c7a8577 100644 --- a/services/runcommand/model_command_template_schema.go +++ b/services/runcommand/model_command_template_schema.go @@ -10,6 +10,13 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the CommandTemplateSchema type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CommandTemplateSchema{} + // CommandTemplateSchema struct for CommandTemplateSchema type CommandTemplateSchema struct { Description *string `json:"description,omitempty"` @@ -18,3 +25,236 @@ type CommandTemplateSchema struct { ParameterSchema *ParametersSchema `json:"parameterSchema,omitempty"` Title *string `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() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CommandTemplateSchema) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CommandTemplateSchema) SetDescription(v *string) { + o.Description = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CommandTemplateSchema) 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 *CommandTemplateSchema) 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 *CommandTemplateSchema) 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 *CommandTemplateSchema) SetName(v *string) { + o.Name = v +} + +// GetOsType returns the OsType field value if set, zero value otherwise. +func (o *CommandTemplateSchema) GetOsType() *[]string { + if o == nil || IsNil(o.OsType) { + var ret *[]string + return ret + } + return o.OsType +} + +// 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() (*[]string, bool) { + if o == nil || IsNil(o.OsType) { + return nil, false + } + return o.OsType, true +} + +// HasOsType returns a boolean if a field has been set. +func (o *CommandTemplateSchema) HasOsType() bool { + if o != nil && !IsNil(o.OsType) { + return true + } + + return false +} + +// SetOsType gets a reference to the given []string and assigns it to the OsType field. +func (o *CommandTemplateSchema) SetOsType(v *[]string) { + o.OsType = v +} + +// GetParameterSchema returns the ParameterSchema field value if set, zero value otherwise. +func (o *CommandTemplateSchema) GetParameterSchema() *ParametersSchema { + if o == nil || IsNil(o.ParameterSchema) { + var ret *ParametersSchema + return ret + } + return o.ParameterSchema +} + +// 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() (*ParametersSchema, bool) { + if o == nil || IsNil(o.ParameterSchema) { + return nil, false + } + return o.ParameterSchema, true +} + +// HasParameterSchema returns a boolean if a field has been set. +func (o *CommandTemplateSchema) HasParameterSchema() bool { + if o != nil && !IsNil(o.ParameterSchema) { + return true + } + + return false +} + +// SetParameterSchema gets a reference to the given ParametersSchema and assigns it to the ParameterSchema field. +func (o *CommandTemplateSchema) SetParameterSchema(v *ParametersSchema) { + o.ParameterSchema = v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *CommandTemplateSchema) GetTitle() *string { + if o == nil || IsNil(o.Title) { + var ret *string + return ret + } + return o.Title +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *CommandTemplateSchema) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *CommandTemplateSchema) SetTitle(v *string) { + o.Title = v +} + +func (o CommandTemplateSchema) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.OsType) { + toSerialize["osType"] = o.OsType + } + if !IsNil(o.ParameterSchema) { + toSerialize["parameterSchema"] = o.ParameterSchema + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + 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) +} diff --git a/services/runcommand/model_commands.go b/services/runcommand/model_commands.go index ce05baf62..ff0c5b283 100644 --- a/services/runcommand/model_commands.go +++ b/services/runcommand/model_commands.go @@ -10,6 +10,13 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the Commands type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Commands{} + // Commands struct for Commands type Commands struct { CommandTemplateName *string `json:"commandTemplateName,omitempty"` @@ -20,3 +27,271 @@ type Commands struct { StartedAt *string `json:"startedAt,omitempty"` Status *string `json:"status,omitempty"` } + +// NewCommands instantiates a new Commands 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 NewCommands() *Commands { + this := Commands{} + return &this +} + +// NewCommandsWithDefaults instantiates a new Commands 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 NewCommandsWithDefaults() *Commands { + this := Commands{} + return &this +} + +// GetCommandTemplateName returns the CommandTemplateName field value if set, zero value otherwise. +func (o *Commands) GetCommandTemplateName() *string { + if o == nil || IsNil(o.CommandTemplateName) { + var ret *string + return ret + } + return o.CommandTemplateName +} + +// GetCommandTemplateNameOk returns a tuple with the CommandTemplateName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Commands) GetCommandTemplateNameOk() (*string, bool) { + if o == nil || IsNil(o.CommandTemplateName) { + return nil, false + } + return o.CommandTemplateName, true +} + +// HasCommandTemplateName returns a boolean if a field has been set. +func (o *Commands) HasCommandTemplateName() bool { + if o != nil && !IsNil(o.CommandTemplateName) { + return true + } + + return false +} + +// SetCommandTemplateName gets a reference to the given string and assigns it to the CommandTemplateName field. +func (o *Commands) SetCommandTemplateName(v *string) { + o.CommandTemplateName = v +} + +// GetCommandTemplateTitle returns the CommandTemplateTitle field value if set, zero value otherwise. +func (o *Commands) GetCommandTemplateTitle() *string { + if o == nil || IsNil(o.CommandTemplateTitle) { + var ret *string + return ret + } + return o.CommandTemplateTitle +} + +// GetCommandTemplateTitleOk returns a tuple with the CommandTemplateTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Commands) GetCommandTemplateTitleOk() (*string, bool) { + if o == nil || IsNil(o.CommandTemplateTitle) { + return nil, false + } + return o.CommandTemplateTitle, true +} + +// HasCommandTemplateTitle returns a boolean if a field has been set. +func (o *Commands) HasCommandTemplateTitle() bool { + if o != nil && !IsNil(o.CommandTemplateTitle) { + return true + } + + return false +} + +// SetCommandTemplateTitle gets a reference to the given string and assigns it to the CommandTemplateTitle field. +func (o *Commands) SetCommandTemplateTitle(v *string) { + o.CommandTemplateTitle = v +} + +// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise. +func (o *Commands) GetFinishedAt() *string { + if o == nil || IsNil(o.FinishedAt) { + var ret *string + return ret + } + return o.FinishedAt +} + +// GetFinishedAtOk returns a tuple with the FinishedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Commands) GetFinishedAtOk() (*string, bool) { + if o == nil || IsNil(o.FinishedAt) { + return nil, false + } + return o.FinishedAt, true +} + +// HasFinishedAt returns a boolean if a field has been set. +func (o *Commands) HasFinishedAt() bool { + if o != nil && !IsNil(o.FinishedAt) { + return true + } + + return false +} + +// SetFinishedAt gets a reference to the given string and assigns it to the FinishedAt field. +func (o *Commands) SetFinishedAt(v *string) { + o.FinishedAt = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Commands) GetId() *int64 { + if o == nil || IsNil(o.Id) { + var ret *int64 + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Commands) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Commands) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *Commands) SetId(v *int64) { + o.Id = v +} + +// GetStartedAt returns the StartedAt field value if set, zero value otherwise. +func (o *Commands) GetStartedAt() *string { + if o == nil || IsNil(o.StartedAt) { + var ret *string + return ret + } + return o.StartedAt +} + +// GetStartedAtOk returns a tuple with the StartedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Commands) GetStartedAtOk() (*string, bool) { + if o == nil || IsNil(o.StartedAt) { + return nil, false + } + return o.StartedAt, true +} + +// HasStartedAt returns a boolean if a field has been set. +func (o *Commands) HasStartedAt() bool { + if o != nil && !IsNil(o.StartedAt) { + return true + } + + return false +} + +// SetStartedAt gets a reference to the given string and assigns it to the StartedAt field. +func (o *Commands) SetStartedAt(v *string) { + o.StartedAt = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Commands) 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 *Commands) 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 *Commands) 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 *Commands) SetStatus(v *string) { + o.Status = v +} + +func (o Commands) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CommandTemplateName) { + toSerialize["commandTemplateName"] = o.CommandTemplateName + } + if !IsNil(o.CommandTemplateTitle) { + toSerialize["commandTemplateTitle"] = o.CommandTemplateTitle + } + if !IsNil(o.FinishedAt) { + toSerialize["finishedAt"] = o.FinishedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.StartedAt) { + toSerialize["startedAt"] = o.StartedAt + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableCommands struct { + value *Commands + isSet bool +} + +func (v NullableCommands) Get() *Commands { + return v.value +} + +func (v *NullableCommands) Set(val *Commands) { + v.value = val + v.isSet = true +} + +func (v NullableCommands) IsSet() bool { + return v.isSet +} + +func (v *NullableCommands) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCommands(val *Commands) *NullableCommands { + return &NullableCommands{value: val, isSet: true} +} + +func (v NullableCommands) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCommands) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_create_command_payload.go b/services/runcommand/model_create_command_payload.go index b6f1ebb27..d7effe79b 100644 --- a/services/runcommand/model_create_command_payload.go +++ b/services/runcommand/model_create_command_payload.go @@ -10,9 +10,137 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the CreateCommandPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCommandPayload{} + // CreateCommandPayload struct for CreateCommandPayload type CreateCommandPayload struct { // REQUIRED CommandTemplateName *string `json:"commandTemplateName"` Parameters *map[string]string `json:"parameters,omitempty"` } + +type _CreateCommandPayload CreateCommandPayload + +// NewCreateCommandPayload instantiates a new CreateCommandPayload 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 NewCreateCommandPayload(commandTemplateName *string) *CreateCommandPayload { + this := CreateCommandPayload{} + this.CommandTemplateName = commandTemplateName + return &this +} + +// NewCreateCommandPayloadWithDefaults instantiates a new CreateCommandPayload 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 NewCreateCommandPayloadWithDefaults() *CreateCommandPayload { + this := CreateCommandPayload{} + return &this +} + +// GetCommandTemplateName returns the CommandTemplateName field value +func (o *CreateCommandPayload) GetCommandTemplateName() *string { + if o == nil { + var ret *string + return ret + } + + return o.CommandTemplateName +} + +// GetCommandTemplateNameOk returns a tuple with the CommandTemplateName field value +// and a boolean to check if the value has been set. +func (o *CreateCommandPayload) GetCommandTemplateNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CommandTemplateName, true +} + +// SetCommandTemplateName sets field value +func (o *CreateCommandPayload) SetCommandTemplateName(v *string) { + o.CommandTemplateName = v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *CreateCommandPayload) GetParameters() *map[string]string { + if o == nil || IsNil(o.Parameters) { + var ret *map[string]string + return ret + } + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCommandPayload) GetParametersOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *CreateCommandPayload) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given map[string]string and assigns it to the Parameters field. +func (o *CreateCommandPayload) SetParameters(v *map[string]string) { + o.Parameters = v +} + +func (o CreateCommandPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["commandTemplateName"] = o.CommandTemplateName + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + return toSerialize, nil +} + +type NullableCreateCommandPayload struct { + value *CreateCommandPayload + isSet bool +} + +func (v NullableCreateCommandPayload) Get() *CreateCommandPayload { + return v.value +} + +func (v *NullableCreateCommandPayload) Set(val *CreateCommandPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCommandPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCommandPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCommandPayload(val *CreateCommandPayload) *NullableCreateCommandPayload { + return &NullableCreateCommandPayload{value: val, isSet: true} +} + +func (v NullableCreateCommandPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCommandPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_error_response.go b/services/runcommand/model_error_response.go index ad76b0680..5c85b11fb 100644 --- a/services/runcommand/model_error_response.go +++ b/services/runcommand/model_error_response.go @@ -10,6 +10,13 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorResponse{} + // ErrorResponse struct for ErrorResponse type ErrorResponse struct { // Details about the error @@ -19,3 +26,115 @@ type ErrorResponse struct { // REQUIRED Status *string `json:"status"` } + +type _ErrorResponse ErrorResponse + +// NewErrorResponse instantiates a new ErrorResponse 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 NewErrorResponse(message *string, status *string) *ErrorResponse { + this := ErrorResponse{} + this.Message = message + this.Status = status + return &this +} + +// NewErrorResponseWithDefaults instantiates a new ErrorResponse 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 NewErrorResponseWithDefaults() *ErrorResponse { + this := ErrorResponse{} + return &this +} + +// GetMessage returns the Message field value +func (o *ErrorResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *ErrorResponse) SetMessage(v *string) { + o.Message = v +} + +// GetStatus returns the Status field value +func (o *ErrorResponse) GetStatus() *string { + if o == nil { + var ret *string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Status, true +} + +// SetStatus sets field value +func (o *ErrorResponse) SetStatus(v *string) { + o.Status = v +} + +func (o ErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableErrorResponse struct { + value *ErrorResponse + isSet bool +} + +func (v NullableErrorResponse) Get() *ErrorResponse { + return v.value +} + +func (v *NullableErrorResponse) Set(val *ErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { + return &NullableErrorResponse{value: val, isSet: true} +} + +func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_field.go b/services/runcommand/model_field.go index 51bcfc98d..91675b9ed 100644 --- a/services/runcommand/model_field.go +++ b/services/runcommand/model_field.go @@ -10,6 +10,13 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the Field type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Field{} + // Field struct for Field type Field struct { Default *string `json:"default,omitempty"` @@ -22,3 +29,306 @@ type Field struct { Title *string `json:"title,omitempty"` Type *string `json:"type,omitempty"` } + +// NewField instantiates a new Field 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 NewField() *Field { + this := Field{} + return &this +} + +// NewFieldWithDefaults instantiates a new Field 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 NewFieldWithDefaults() *Field { + this := Field{} + return &this +} + +// GetDefault returns the Default field value if set, zero value otherwise. +func (o *Field) GetDefault() *string { + if o == nil || IsNil(o.Default) { + var ret *string + return ret + } + return o.Default +} + +// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Field) GetDefaultOk() (*string, bool) { + if o == nil || IsNil(o.Default) { + return nil, false + } + return o.Default, true +} + +// HasDefault returns a boolean if a field has been set. +func (o *Field) HasDefault() bool { + if o != nil && !IsNil(o.Default) { + return true + } + + return false +} + +// SetDefault gets a reference to the given string and assigns it to the Default field. +func (o *Field) SetDefault(v *string) { + o.Default = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Field) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// 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 *Field) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Field) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Field) SetDescription(v *string) { + o.Description = v +} + +// GetMaxLen returns the MaxLen field value if set, zero value otherwise. +func (o *Field) GetMaxLen() *int64 { + if o == nil || IsNil(o.MaxLen) { + var ret *int64 + return ret + } + return o.MaxLen +} + +// GetMaxLenOk returns a tuple with the MaxLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Field) GetMaxLenOk() (*int64, bool) { + if o == nil || IsNil(o.MaxLen) { + return nil, false + } + return o.MaxLen, true +} + +// HasMaxLen returns a boolean if a field has been set. +func (o *Field) HasMaxLen() bool { + if o != nil && !IsNil(o.MaxLen) { + return true + } + + return false +} + +// SetMaxLen gets a reference to the given int64 and assigns it to the MaxLen field. +func (o *Field) SetMaxLen(v *int64) { + o.MaxLen = v +} + +// GetMinLen returns the MinLen field value if set, zero value otherwise. +func (o *Field) GetMinLen() *int64 { + if o == nil || IsNil(o.MinLen) { + var ret *int64 + return ret + } + return o.MinLen +} + +// GetMinLenOk returns a tuple with the MinLen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Field) GetMinLenOk() (*int64, bool) { + if o == nil || IsNil(o.MinLen) { + return nil, false + } + return o.MinLen, true +} + +// HasMinLen returns a boolean if a field has been set. +func (o *Field) HasMinLen() bool { + if o != nil && !IsNil(o.MinLen) { + return true + } + + return false +} + +// SetMinLen gets a reference to the given int64 and assigns it to the MinLen field. +func (o *Field) SetMinLen(v *int64) { + o.MinLen = v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *Field) GetReadOnly() *bool { + if o == nil || IsNil(o.ReadOnly) { + var ret *bool + return ret + } + return o.ReadOnly +} + +// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Field) GetReadOnlyOk() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *Field) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *Field) SetReadOnly(v *bool) { + o.ReadOnly = v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *Field) GetTitle() *string { + if o == nil || IsNil(o.Title) { + var ret *string + return ret + } + return o.Title +} + +// 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 *Field) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *Field) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *Field) SetTitle(v *string) { + o.Title = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Field) 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 *Field) 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 *Field) 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 *Field) SetType(v *string) { + o.Type = v +} + +func (o Field) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Default) { + toSerialize["default"] = o.Default + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.MaxLen) { + toSerialize["maxLen"] = o.MaxLen + } + if !IsNil(o.MinLen) { + toSerialize["minLen"] = o.MinLen + } + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableField struct { + value *Field + isSet bool +} + +func (v NullableField) Get() *Field { + return v.value +} + +func (v *NullableField) Set(val *Field) { + v.value = val + v.isSet = true +} + +func (v NullableField) IsSet() bool { + return v.isSet +} + +func (v *NullableField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableField(val *Field) *NullableField { + return &NullableField{value: val, isSet: true} +} + +func (v NullableField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_get_commands_response.go b/services/runcommand/model_get_commands_response.go index 30929e51a..3e1a85495 100644 --- a/services/runcommand/model_get_commands_response.go +++ b/services/runcommand/model_get_commands_response.go @@ -10,7 +10,107 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the GetCommandsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCommandsResponse{} + // GetCommandsResponse struct for GetCommandsResponse type GetCommandsResponse struct { Items *[]Commands `json:"items,omitempty"` } + +// NewGetCommandsResponse instantiates a new GetCommandsResponse 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 NewGetCommandsResponse() *GetCommandsResponse { + this := GetCommandsResponse{} + return &this +} + +// NewGetCommandsResponseWithDefaults instantiates a new GetCommandsResponse 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 NewGetCommandsResponseWithDefaults() *GetCommandsResponse { + this := GetCommandsResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *GetCommandsResponse) GetItems() *[]Commands { + if o == nil || IsNil(o.Items) { + var ret *[]Commands + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCommandsResponse) GetItemsOk() (*[]Commands, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *GetCommandsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Commands and assigns it to the Items field. +func (o *GetCommandsResponse) SetItems(v *[]Commands) { + o.Items = v +} + +func (o GetCommandsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableGetCommandsResponse struct { + value *GetCommandsResponse + isSet bool +} + +func (v NullableGetCommandsResponse) Get() *GetCommandsResponse { + return v.value +} + +func (v *NullableGetCommandsResponse) Set(val *GetCommandsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetCommandsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCommandsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCommandsResponse(val *GetCommandsResponse) *NullableGetCommandsResponse { + return &NullableGetCommandsResponse{value: val, isSet: true} +} + +func (v NullableGetCommandsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCommandsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_new_command_response.go b/services/runcommand/model_new_command_response.go index fa008b9a0..0474a642a 100644 --- a/services/runcommand/model_new_command_response.go +++ b/services/runcommand/model_new_command_response.go @@ -10,8 +10,108 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the NewCommandResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewCommandResponse{} + // NewCommandResponse struct for NewCommandResponse type NewCommandResponse struct { // Can be cast to int32 without loss of precision. Id *int64 `json:"id,omitempty"` } + +// NewNewCommandResponse instantiates a new NewCommandResponse 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 NewNewCommandResponse() *NewCommandResponse { + this := NewCommandResponse{} + return &this +} + +// NewNewCommandResponseWithDefaults instantiates a new NewCommandResponse 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 NewNewCommandResponseWithDefaults() *NewCommandResponse { + this := NewCommandResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NewCommandResponse) GetId() *int64 { + if o == nil || IsNil(o.Id) { + var ret *int64 + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewCommandResponse) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NewCommandResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *NewCommandResponse) SetId(v *int64) { + o.Id = v +} + +func (o NewCommandResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableNewCommandResponse struct { + value *NewCommandResponse + isSet bool +} + +func (v NullableNewCommandResponse) Get() *NewCommandResponse { + return v.value +} + +func (v *NullableNewCommandResponse) Set(val *NewCommandResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNewCommandResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNewCommandResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewCommandResponse(val *NewCommandResponse) *NullableNewCommandResponse { + return &NullableNewCommandResponse{value: val, isSet: true} +} + +func (v NullableNewCommandResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewCommandResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_parameters_schema.go b/services/runcommand/model_parameters_schema.go index 4dbc5388c..18d94bf28 100644 --- a/services/runcommand/model_parameters_schema.go +++ b/services/runcommand/model_parameters_schema.go @@ -10,7 +10,107 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the ParametersSchema type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ParametersSchema{} + // ParametersSchema struct for ParametersSchema type ParametersSchema struct { Properties *Properties `json:"properties,omitempty"` } + +// NewParametersSchema instantiates a new ParametersSchema 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 NewParametersSchema() *ParametersSchema { + this := ParametersSchema{} + return &this +} + +// NewParametersSchemaWithDefaults instantiates a new ParametersSchema 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 NewParametersSchemaWithDefaults() *ParametersSchema { + this := ParametersSchema{} + return &this +} + +// GetProperties returns the Properties field value if set, zero value otherwise. +func (o *ParametersSchema) GetProperties() *Properties { + if o == nil || IsNil(o.Properties) { + var ret *Properties + return ret + } + return o.Properties +} + +// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ParametersSchema) GetPropertiesOk() (*Properties, bool) { + if o == nil || IsNil(o.Properties) { + return nil, false + } + return o.Properties, true +} + +// HasProperties returns a boolean if a field has been set. +func (o *ParametersSchema) HasProperties() bool { + if o != nil && !IsNil(o.Properties) { + return true + } + + return false +} + +// SetProperties gets a reference to the given Properties and assigns it to the Properties field. +func (o *ParametersSchema) SetProperties(v *Properties) { + o.Properties = v +} + +func (o ParametersSchema) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Properties) { + toSerialize["properties"] = o.Properties + } + return toSerialize, nil +} + +type NullableParametersSchema struct { + value *ParametersSchema + isSet bool +} + +func (v NullableParametersSchema) Get() *ParametersSchema { + return v.value +} + +func (v *NullableParametersSchema) Set(val *ParametersSchema) { + v.value = val + v.isSet = true +} + +func (v NullableParametersSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableParametersSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableParametersSchema(val *ParametersSchema) *NullableParametersSchema { + return &NullableParametersSchema{value: val, isSet: true} +} + +func (v NullableParametersSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableParametersSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/runcommand/model_properties.go b/services/runcommand/model_properties.go index 1f21707df..4df15d7de 100644 --- a/services/runcommand/model_properties.go +++ b/services/runcommand/model_properties.go @@ -10,6 +10,13 @@ API version: 1.0 package runcommand +import ( + "encoding/json" +) + +// checks if the Properties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Properties{} + // Properties struct for Properties type Properties struct { ConfirmPassword *Field `json:"ConfirmPassword,omitempty"` @@ -19,3 +26,271 @@ type Properties struct { Required *[]string `json:"required,omitempty"` Type *string `json:"type,omitempty"` } + +// NewProperties instantiates a new Properties 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 NewProperties() *Properties { + this := Properties{} + return &this +} + +// NewPropertiesWithDefaults instantiates a new Properties 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 NewPropertiesWithDefaults() *Properties { + this := Properties{} + return &this +} + +// GetConfirmPassword returns the ConfirmPassword field value if set, zero value otherwise. +func (o *Properties) GetConfirmPassword() *Field { + if o == nil || IsNil(o.ConfirmPassword) { + var ret *Field + return ret + } + return o.ConfirmPassword +} + +// GetConfirmPasswordOk returns a tuple with the ConfirmPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Properties) GetConfirmPasswordOk() (*Field, bool) { + if o == nil || IsNil(o.ConfirmPassword) { + return nil, false + } + return o.ConfirmPassword, true +} + +// HasConfirmPassword returns a boolean if a field has been set. +func (o *Properties) HasConfirmPassword() bool { + if o != nil && !IsNil(o.ConfirmPassword) { + return true + } + + return false +} + +// SetConfirmPassword gets a reference to the given Field and assigns it to the ConfirmPassword field. +func (o *Properties) SetConfirmPassword(v *Field) { + o.ConfirmPassword = v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *Properties) GetPassword() *Field { + if o == nil || IsNil(o.Password) { + var ret *Field + return ret + } + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Properties) GetPasswordOk() (*Field, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *Properties) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given Field and assigns it to the Password field. +func (o *Properties) SetPassword(v *Field) { + o.Password = v +} + +// GetScript returns the Script field value if set, zero value otherwise. +func (o *Properties) GetScript() *Field { + if o == nil || IsNil(o.Script) { + var ret *Field + return ret + } + return o.Script +} + +// GetScriptOk returns a tuple with the Script field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Properties) GetScriptOk() (*Field, bool) { + if o == nil || IsNil(o.Script) { + return nil, false + } + return o.Script, true +} + +// HasScript returns a boolean if a field has been set. +func (o *Properties) HasScript() bool { + if o != nil && !IsNil(o.Script) { + return true + } + + return false +} + +// SetScript gets a reference to the given Field and assigns it to the Script field. +func (o *Properties) SetScript(v *Field) { + o.Script = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *Properties) GetUsername() *Field { + if o == nil || IsNil(o.Username) { + var ret *Field + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Properties) GetUsernameOk() (*Field, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *Properties) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given Field and assigns it to the Username field. +func (o *Properties) SetUsername(v *Field) { + o.Username = v +} + +// GetRequired returns the Required field value if set, zero value otherwise. +func (o *Properties) GetRequired() *[]string { + if o == nil || IsNil(o.Required) { + var ret *[]string + return ret + } + return o.Required +} + +// GetRequiredOk returns a tuple with the Required field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Properties) GetRequiredOk() (*[]string, bool) { + if o == nil || IsNil(o.Required) { + return nil, false + } + return o.Required, true +} + +// HasRequired returns a boolean if a field has been set. +func (o *Properties) HasRequired() bool { + if o != nil && !IsNil(o.Required) { + return true + } + + return false +} + +// SetRequired gets a reference to the given []string and assigns it to the Required field. +func (o *Properties) SetRequired(v *[]string) { + o.Required = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Properties) 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 *Properties) 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 *Properties) 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 *Properties) SetType(v *string) { + o.Type = v +} + +func (o Properties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ConfirmPassword) { + toSerialize["ConfirmPassword"] = o.ConfirmPassword + } + if !IsNil(o.Password) { + toSerialize["Password"] = o.Password + } + if !IsNil(o.Script) { + toSerialize["Script"] = o.Script + } + if !IsNil(o.Username) { + toSerialize["Username"] = o.Username + } + if !IsNil(o.Required) { + toSerialize["required"] = o.Required + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableProperties struct { + value *Properties + isSet bool +} + +func (v NullableProperties) Get() *Properties { + return v.value +} + +func (v *NullableProperties) Set(val *Properties) { + v.value = val + v.isSet = true +} + +func (v NullableProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProperties(val *Properties) *NullableProperties { + return &NullableProperties{value: val, isSet: true} +} + +func (v NullableProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}