620 lines
20 KiB
Go
620 lines
20 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"
|
|
"fmt"
|
|
)
|
|
|
|
// checks if the CommandDetails type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CommandDetails{}
|
|
|
|
/*
|
|
types and functions for commandTemplateName
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CommandDetailsGetCommandTemplateNameAttributeType = *string
|
|
|
|
func getCommandDetailsGetCommandTemplateNameAttributeTypeOk(arg CommandDetailsGetCommandTemplateNameAttributeType) (ret CommandDetailsGetCommandTemplateNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetCommandTemplateNameAttributeType(arg *CommandDetailsGetCommandTemplateNameAttributeType, val CommandDetailsGetCommandTemplateNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CommandDetailsGetCommandTemplateNameArgType = string
|
|
type CommandDetailsGetCommandTemplateNameRetType = string
|
|
|
|
/*
|
|
types and functions for commandTemplateTitle
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CommandDetailsGetCommandTemplateTitleAttributeType = *string
|
|
|
|
func getCommandDetailsGetCommandTemplateTitleAttributeTypeOk(arg CommandDetailsGetCommandTemplateTitleAttributeType) (ret CommandDetailsGetCommandTemplateTitleRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetCommandTemplateTitleAttributeType(arg *CommandDetailsGetCommandTemplateTitleAttributeType, val CommandDetailsGetCommandTemplateTitleRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CommandDetailsGetCommandTemplateTitleArgType = string
|
|
type CommandDetailsGetCommandTemplateTitleRetType = string
|
|
|
|
/*
|
|
types and functions for exitCode
|
|
*/
|
|
|
|
// isInteger
|
|
type CommandDetailsGetExitCodeAttributeType = *int64
|
|
type CommandDetailsGetExitCodeArgType = int64
|
|
type CommandDetailsGetExitCodeRetType = int64
|
|
|
|
func getCommandDetailsGetExitCodeAttributeTypeOk(arg CommandDetailsGetExitCodeAttributeType) (ret CommandDetailsGetExitCodeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetExitCodeAttributeType(arg *CommandDetailsGetExitCodeAttributeType, val CommandDetailsGetExitCodeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for finishedAt
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CommandDetailsGetFinishedAtAttributeType = *string
|
|
|
|
func getCommandDetailsGetFinishedAtAttributeTypeOk(arg CommandDetailsGetFinishedAtAttributeType) (ret CommandDetailsGetFinishedAtRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetFinishedAtAttributeType(arg *CommandDetailsGetFinishedAtAttributeType, val CommandDetailsGetFinishedAtRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CommandDetailsGetFinishedAtArgType = string
|
|
type CommandDetailsGetFinishedAtRetType = string
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isInteger
|
|
type CommandDetailsGetIdAttributeType = *int64
|
|
type CommandDetailsGetIdArgType = int64
|
|
type CommandDetailsGetIdRetType = int64
|
|
|
|
func getCommandDetailsGetIdAttributeTypeOk(arg CommandDetailsGetIdAttributeType) (ret CommandDetailsGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetIdAttributeType(arg *CommandDetailsGetIdAttributeType, val CommandDetailsGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for output
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CommandDetailsGetOutputAttributeType = *string
|
|
|
|
func getCommandDetailsGetOutputAttributeTypeOk(arg CommandDetailsGetOutputAttributeType) (ret CommandDetailsGetOutputRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetOutputAttributeType(arg *CommandDetailsGetOutputAttributeType, val CommandDetailsGetOutputRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CommandDetailsGetOutputArgType = string
|
|
type CommandDetailsGetOutputRetType = string
|
|
|
|
/*
|
|
types and functions for script
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CommandDetailsGetScriptAttributeType = *string
|
|
|
|
func getCommandDetailsGetScriptAttributeTypeOk(arg CommandDetailsGetScriptAttributeType) (ret CommandDetailsGetScriptRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetScriptAttributeType(arg *CommandDetailsGetScriptAttributeType, val CommandDetailsGetScriptRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CommandDetailsGetScriptArgType = string
|
|
type CommandDetailsGetScriptRetType = string
|
|
|
|
/*
|
|
types and functions for startedAt
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CommandDetailsGetStartedAtAttributeType = *string
|
|
|
|
func getCommandDetailsGetStartedAtAttributeTypeOk(arg CommandDetailsGetStartedAtAttributeType) (ret CommandDetailsGetStartedAtRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetStartedAtAttributeType(arg *CommandDetailsGetStartedAtAttributeType, val CommandDetailsGetStartedAtRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CommandDetailsGetStartedAtArgType = string
|
|
type CommandDetailsGetStartedAtRetType = string
|
|
|
|
/*
|
|
types and functions for status
|
|
*/
|
|
|
|
// isEnum
|
|
|
|
// CommandDetailsStatus the model 'CommandDetails'
|
|
// value type for enums
|
|
type CommandDetailsStatus string
|
|
|
|
// List of Status
|
|
const (
|
|
COMMANDDETAILSSTATUS_PENDING CommandDetailsStatus = "pending"
|
|
COMMANDDETAILSSTATUS_RUNNING CommandDetailsStatus = "running"
|
|
COMMANDDETAILSSTATUS_COMPLETED CommandDetailsStatus = "completed"
|
|
COMMANDDETAILSSTATUS_FAILED CommandDetailsStatus = "failed"
|
|
)
|
|
|
|
// All allowed values of CommandDetails enum
|
|
var AllowedCommandDetailsStatusEnumValues = []CommandDetailsStatus{
|
|
"pending",
|
|
"running",
|
|
"completed",
|
|
"failed",
|
|
}
|
|
|
|
func (v *CommandDetailsStatus) UnmarshalJSON(src []byte) error {
|
|
// use a type alias to prevent infinite recursion during unmarshal,
|
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
|
type TmpJson CommandDetailsStatus
|
|
var value TmpJson
|
|
err := json.Unmarshal(src, &value)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
// Allow unmarshalling zero value for testing purposes
|
|
var zeroValue TmpJson
|
|
if value == zeroValue {
|
|
return nil
|
|
}
|
|
enumTypeValue := CommandDetailsStatus(value)
|
|
for _, existing := range AllowedCommandDetailsStatusEnumValues {
|
|
if existing == enumTypeValue {
|
|
*v = enumTypeValue
|
|
return nil
|
|
}
|
|
}
|
|
|
|
return fmt.Errorf("%+v is not a valid CommandDetails", value)
|
|
}
|
|
|
|
// NewCommandDetailsStatusFromValue returns a pointer to a valid CommandDetailsStatus
|
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
|
func NewCommandDetailsStatusFromValue(v CommandDetailsStatus) (*CommandDetailsStatus, error) {
|
|
ev := CommandDetailsStatus(v)
|
|
if ev.IsValid() {
|
|
return &ev, nil
|
|
} else {
|
|
return nil, fmt.Errorf("invalid value '%v' for CommandDetailsStatus: valid values are %v", v, AllowedCommandDetailsStatusEnumValues)
|
|
}
|
|
}
|
|
|
|
// IsValid return true if the value is valid for the enum, false otherwise
|
|
func (v CommandDetailsStatus) IsValid() bool {
|
|
for _, existing := range AllowedCommandDetailsStatusEnumValues {
|
|
if existing == v {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
// Ptr returns reference to StatusStatus value
|
|
func (v CommandDetailsStatus) Ptr() *CommandDetailsStatus {
|
|
return &v
|
|
}
|
|
|
|
type NullableCommandDetailsStatus struct {
|
|
value *CommandDetailsStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCommandDetailsStatus) Get() *CommandDetailsStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCommandDetailsStatus) Set(val *CommandDetailsStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCommandDetailsStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCommandDetailsStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCommandDetailsStatus(val *CommandDetailsStatus) *NullableCommandDetailsStatus {
|
|
return &NullableCommandDetailsStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCommandDetailsStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCommandDetailsStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
type CommandDetailsGetStatusAttributeType = *CommandDetailsStatus
|
|
type CommandDetailsGetStatusArgType = CommandDetailsStatus
|
|
type CommandDetailsGetStatusRetType = CommandDetailsStatus
|
|
|
|
func getCommandDetailsGetStatusAttributeTypeOk(arg CommandDetailsGetStatusAttributeType) (ret CommandDetailsGetStatusRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCommandDetailsGetStatusAttributeType(arg *CommandDetailsGetStatusAttributeType, val CommandDetailsGetStatusRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// CommandDetails struct for CommandDetails
|
|
type CommandDetails struct {
|
|
CommandTemplateName CommandDetailsGetCommandTemplateNameAttributeType `json:"commandTemplateName,omitempty"`
|
|
CommandTemplateTitle CommandDetailsGetCommandTemplateTitleAttributeType `json:"commandTemplateTitle,omitempty"`
|
|
// Can be cast to int32 without loss of precision.
|
|
ExitCode CommandDetailsGetExitCodeAttributeType `json:"exitCode,omitempty"`
|
|
FinishedAt CommandDetailsGetFinishedAtAttributeType `json:"finishedAt,omitempty"`
|
|
// Can be cast to int32 without loss of precision.
|
|
Id CommandDetailsGetIdAttributeType `json:"id,omitempty"`
|
|
Output CommandDetailsGetOutputAttributeType `json:"output,omitempty"`
|
|
Script CommandDetailsGetScriptAttributeType `json:"script,omitempty"`
|
|
StartedAt CommandDetailsGetStartedAtAttributeType `json:"startedAt,omitempty"`
|
|
Status CommandDetailsGetStatusAttributeType `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() (res CommandDetailsGetCommandTemplateNameRetType) {
|
|
res, _ = o.GetCommandTemplateNameOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetCommandTemplateNameRetType, ok bool) {
|
|
return getCommandDetailsGetCommandTemplateNameAttributeTypeOk(o.CommandTemplateName)
|
|
}
|
|
|
|
// HasCommandTemplateName returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasCommandTemplateName() bool {
|
|
_, ok := o.GetCommandTemplateNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetCommandTemplateName gets a reference to the given string and assigns it to the CommandTemplateName field.
|
|
func (o *CommandDetails) SetCommandTemplateName(v CommandDetailsGetCommandTemplateNameRetType) {
|
|
setCommandDetailsGetCommandTemplateNameAttributeType(&o.CommandTemplateName, v)
|
|
}
|
|
|
|
// GetCommandTemplateTitle returns the CommandTemplateTitle field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetCommandTemplateTitle() (res CommandDetailsGetCommandTemplateTitleRetType) {
|
|
res, _ = o.GetCommandTemplateTitleOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetCommandTemplateTitleRetType, ok bool) {
|
|
return getCommandDetailsGetCommandTemplateTitleAttributeTypeOk(o.CommandTemplateTitle)
|
|
}
|
|
|
|
// HasCommandTemplateTitle returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasCommandTemplateTitle() bool {
|
|
_, ok := o.GetCommandTemplateTitleOk()
|
|
return ok
|
|
}
|
|
|
|
// SetCommandTemplateTitle gets a reference to the given string and assigns it to the CommandTemplateTitle field.
|
|
func (o *CommandDetails) SetCommandTemplateTitle(v CommandDetailsGetCommandTemplateTitleRetType) {
|
|
setCommandDetailsGetCommandTemplateTitleAttributeType(&o.CommandTemplateTitle, v)
|
|
}
|
|
|
|
// GetExitCode returns the ExitCode field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetExitCode() (res CommandDetailsGetExitCodeRetType) {
|
|
res, _ = o.GetExitCodeOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetExitCodeRetType, ok bool) {
|
|
return getCommandDetailsGetExitCodeAttributeTypeOk(o.ExitCode)
|
|
}
|
|
|
|
// HasExitCode returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasExitCode() bool {
|
|
_, ok := o.GetExitCodeOk()
|
|
return ok
|
|
}
|
|
|
|
// SetExitCode gets a reference to the given int64 and assigns it to the ExitCode field.
|
|
func (o *CommandDetails) SetExitCode(v CommandDetailsGetExitCodeRetType) {
|
|
setCommandDetailsGetExitCodeAttributeType(&o.ExitCode, v)
|
|
}
|
|
|
|
// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetFinishedAt() (res CommandDetailsGetFinishedAtRetType) {
|
|
res, _ = o.GetFinishedAtOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetFinishedAtRetType, ok bool) {
|
|
return getCommandDetailsGetFinishedAtAttributeTypeOk(o.FinishedAt)
|
|
}
|
|
|
|
// HasFinishedAt returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasFinishedAt() bool {
|
|
_, ok := o.GetFinishedAtOk()
|
|
return ok
|
|
}
|
|
|
|
// SetFinishedAt gets a reference to the given string and assigns it to the FinishedAt field.
|
|
func (o *CommandDetails) SetFinishedAt(v CommandDetailsGetFinishedAtRetType) {
|
|
setCommandDetailsGetFinishedAtAttributeType(&o.FinishedAt, v)
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetId() (res CommandDetailsGetIdRetType) {
|
|
res, _ = o.GetIdOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetIdRetType, ok bool) {
|
|
return getCommandDetailsGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasId() bool {
|
|
_, ok := o.GetIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetId gets a reference to the given int64 and assigns it to the Id field.
|
|
func (o *CommandDetails) SetId(v CommandDetailsGetIdRetType) {
|
|
setCommandDetailsGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetOutput returns the Output field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetOutput() (res CommandDetailsGetOutputRetType) {
|
|
res, _ = o.GetOutputOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetOutputRetType, ok bool) {
|
|
return getCommandDetailsGetOutputAttributeTypeOk(o.Output)
|
|
}
|
|
|
|
// HasOutput returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasOutput() bool {
|
|
_, ok := o.GetOutputOk()
|
|
return ok
|
|
}
|
|
|
|
// SetOutput gets a reference to the given string and assigns it to the Output field.
|
|
func (o *CommandDetails) SetOutput(v CommandDetailsGetOutputRetType) {
|
|
setCommandDetailsGetOutputAttributeType(&o.Output, v)
|
|
}
|
|
|
|
// GetScript returns the Script field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetScript() (res CommandDetailsGetScriptRetType) {
|
|
res, _ = o.GetScriptOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetScriptRetType, ok bool) {
|
|
return getCommandDetailsGetScriptAttributeTypeOk(o.Script)
|
|
}
|
|
|
|
// HasScript returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasScript() bool {
|
|
_, ok := o.GetScriptOk()
|
|
return ok
|
|
}
|
|
|
|
// SetScript gets a reference to the given string and assigns it to the Script field.
|
|
func (o *CommandDetails) SetScript(v CommandDetailsGetScriptRetType) {
|
|
setCommandDetailsGetScriptAttributeType(&o.Script, v)
|
|
}
|
|
|
|
// GetStartedAt returns the StartedAt field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetStartedAt() (res CommandDetailsGetStartedAtRetType) {
|
|
res, _ = o.GetStartedAtOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetStartedAtRetType, ok bool) {
|
|
return getCommandDetailsGetStartedAtAttributeTypeOk(o.StartedAt)
|
|
}
|
|
|
|
// HasStartedAt returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasStartedAt() bool {
|
|
_, ok := o.GetStartedAtOk()
|
|
return ok
|
|
}
|
|
|
|
// SetStartedAt gets a reference to the given string and assigns it to the StartedAt field.
|
|
func (o *CommandDetails) SetStartedAt(v CommandDetailsGetStartedAtRetType) {
|
|
setCommandDetailsGetStartedAtAttributeType(&o.StartedAt, v)
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *CommandDetails) GetStatus() (res CommandDetailsGetStatusRetType) {
|
|
res, _ = o.GetStatusOk()
|
|
return
|
|
}
|
|
|
|
// 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() (ret CommandDetailsGetStatusRetType, ok bool) {
|
|
return getCommandDetailsGetStatusAttributeTypeOk(o.Status)
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *CommandDetails) HasStatus() bool {
|
|
_, ok := o.GetStatusOk()
|
|
return ok
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *CommandDetails) SetStatus(v CommandDetailsGetStatusRetType) {
|
|
setCommandDetailsGetStatusAttributeType(&o.Status, v)
|
|
}
|
|
|
|
func (o CommandDetails) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCommandDetailsGetCommandTemplateNameAttributeTypeOk(o.CommandTemplateName); ok {
|
|
toSerialize["CommandTemplateName"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetCommandTemplateTitleAttributeTypeOk(o.CommandTemplateTitle); ok {
|
|
toSerialize["CommandTemplateTitle"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetExitCodeAttributeTypeOk(o.ExitCode); ok {
|
|
toSerialize["ExitCode"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetFinishedAtAttributeTypeOk(o.FinishedAt); ok {
|
|
toSerialize["FinishedAt"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetOutputAttributeTypeOk(o.Output); ok {
|
|
toSerialize["Output"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetScriptAttributeTypeOk(o.Script); ok {
|
|
toSerialize["Script"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetStartedAtAttributeTypeOk(o.StartedAt); ok {
|
|
toSerialize["StartedAt"] = val
|
|
}
|
|
if val, ok := getCommandDetailsGetStatusAttributeTypeOk(o.Status); ok {
|
|
toSerialize["Status"] = val
|
|
}
|
|
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)
|
|
}
|