/* AutoGlue API API for managing K3s clusters across cloud providers API version: 1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package autoglue import ( "encoding/json" ) // checks if the DtoJob type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DtoJob{} // DtoJob struct for DtoJob type DtoJob struct { Attempts *int32 `json:"attempts,omitempty"` CreatedAt *string `json:"created_at,omitempty"` Id *string `json:"id,omitempty"` LastError *string `json:"last_error,omitempty"` MaxAttempts *int32 `json:"max_attempts,omitempty"` Payload map[string]interface{} `json:"payload,omitempty"` Queue *string `json:"queue,omitempty"` RunAt *string `json:"run_at,omitempty"` Status *DtoJobStatus `json:"status,omitempty"` Type *string `json:"type,omitempty"` UpdatedAt *string `json:"updated_at,omitempty"` } // NewDtoJob instantiates a new DtoJob 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 NewDtoJob() *DtoJob { this := DtoJob{} return &this } // NewDtoJobWithDefaults instantiates a new DtoJob 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 NewDtoJobWithDefaults() *DtoJob { this := DtoJob{} return &this } // GetAttempts returns the Attempts field value if set, zero value otherwise. func (o *DtoJob) GetAttempts() int32 { if o == nil || IsNil(o.Attempts) { var ret int32 return ret } return *o.Attempts } // GetAttemptsOk returns a tuple with the Attempts field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetAttemptsOk() (*int32, bool) { if o == nil || IsNil(o.Attempts) { return nil, false } return o.Attempts, true } // HasAttempts returns a boolean if a field has been set. func (o *DtoJob) HasAttempts() bool { if o != nil && !IsNil(o.Attempts) { return true } return false } // SetAttempts gets a reference to the given int32 and assigns it to the Attempts field. func (o *DtoJob) SetAttempts(v int32) { o.Attempts = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *DtoJob) GetCreatedAt() string { if o == nil || IsNil(o.CreatedAt) { var ret string return ret } return *o.CreatedAt } // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetCreatedAtOk() (*string, bool) { if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true } // HasCreatedAt returns a boolean if a field has been set. func (o *DtoJob) HasCreatedAt() bool { if o != nil && !IsNil(o.CreatedAt) { return true } return false } // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. func (o *DtoJob) SetCreatedAt(v string) { o.CreatedAt = &v } // GetId returns the Id field value if set, zero value otherwise. func (o *DtoJob) GetId() string { if o == nil || IsNil(o.Id) { var ret string 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 *DtoJob) GetIdOk() (*string, 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 *DtoJob) HasId() bool { if o != nil && !IsNil(o.Id) { return true } return false } // SetId gets a reference to the given string and assigns it to the Id field. func (o *DtoJob) SetId(v string) { o.Id = &v } // GetLastError returns the LastError field value if set, zero value otherwise. func (o *DtoJob) GetLastError() string { if o == nil || IsNil(o.LastError) { var ret string return ret } return *o.LastError } // GetLastErrorOk returns a tuple with the LastError field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetLastErrorOk() (*string, bool) { if o == nil || IsNil(o.LastError) { return nil, false } return o.LastError, true } // HasLastError returns a boolean if a field has been set. func (o *DtoJob) HasLastError() bool { if o != nil && !IsNil(o.LastError) { return true } return false } // SetLastError gets a reference to the given string and assigns it to the LastError field. func (o *DtoJob) SetLastError(v string) { o.LastError = &v } // GetMaxAttempts returns the MaxAttempts field value if set, zero value otherwise. func (o *DtoJob) GetMaxAttempts() int32 { if o == nil || IsNil(o.MaxAttempts) { var ret int32 return ret } return *o.MaxAttempts } // GetMaxAttemptsOk returns a tuple with the MaxAttempts field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetMaxAttemptsOk() (*int32, bool) { if o == nil || IsNil(o.MaxAttempts) { return nil, false } return o.MaxAttempts, true } // HasMaxAttempts returns a boolean if a field has been set. func (o *DtoJob) HasMaxAttempts() bool { if o != nil && !IsNil(o.MaxAttempts) { return true } return false } // SetMaxAttempts gets a reference to the given int32 and assigns it to the MaxAttempts field. func (o *DtoJob) SetMaxAttempts(v int32) { o.MaxAttempts = &v } // GetPayload returns the Payload field value if set, zero value otherwise. func (o *DtoJob) GetPayload() map[string]interface{} { if o == nil || IsNil(o.Payload) { var ret map[string]interface{} return ret } return o.Payload } // GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetPayloadOk() (map[string]interface{}, bool) { if o == nil || IsNil(o.Payload) { return map[string]interface{}{}, false } return o.Payload, true } // HasPayload returns a boolean if a field has been set. func (o *DtoJob) HasPayload() bool { if o != nil && !IsNil(o.Payload) { return true } return false } // SetPayload gets a reference to the given map[string]interface{} and assigns it to the Payload field. func (o *DtoJob) SetPayload(v map[string]interface{}) { o.Payload = v } // GetQueue returns the Queue field value if set, zero value otherwise. func (o *DtoJob) GetQueue() string { if o == nil || IsNil(o.Queue) { var ret string return ret } return *o.Queue } // GetQueueOk returns a tuple with the Queue field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetQueueOk() (*string, bool) { if o == nil || IsNil(o.Queue) { return nil, false } return o.Queue, true } // HasQueue returns a boolean if a field has been set. func (o *DtoJob) HasQueue() bool { if o != nil && !IsNil(o.Queue) { return true } return false } // SetQueue gets a reference to the given string and assigns it to the Queue field. func (o *DtoJob) SetQueue(v string) { o.Queue = &v } // GetRunAt returns the RunAt field value if set, zero value otherwise. func (o *DtoJob) GetRunAt() string { if o == nil || IsNil(o.RunAt) { var ret string return ret } return *o.RunAt } // GetRunAtOk returns a tuple with the RunAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetRunAtOk() (*string, bool) { if o == nil || IsNil(o.RunAt) { return nil, false } return o.RunAt, true } // HasRunAt returns a boolean if a field has been set. func (o *DtoJob) HasRunAt() bool { if o != nil && !IsNil(o.RunAt) { return true } return false } // SetRunAt gets a reference to the given string and assigns it to the RunAt field. func (o *DtoJob) SetRunAt(v string) { o.RunAt = &v } // GetStatus returns the Status field value if set, zero value otherwise. func (o *DtoJob) GetStatus() DtoJobStatus { if o == nil || IsNil(o.Status) { var ret DtoJobStatus 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 *DtoJob) GetStatusOk() (*DtoJobStatus, 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 *DtoJob) HasStatus() bool { if o != nil && !IsNil(o.Status) { return true } return false } // SetStatus gets a reference to the given DtoJobStatus and assigns it to the Status field. func (o *DtoJob) SetStatus(v DtoJobStatus) { o.Status = &v } // GetType returns the Type field value if set, zero value otherwise. func (o *DtoJob) 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 *DtoJob) 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 *DtoJob) 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 *DtoJob) SetType(v string) { o.Type = &v } // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *DtoJob) GetUpdatedAt() string { if o == nil || IsNil(o.UpdatedAt) { var ret string return ret } return *o.UpdatedAt } // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *DtoJob) GetUpdatedAtOk() (*string, bool) { if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true } // HasUpdatedAt returns a boolean if a field has been set. func (o *DtoJob) HasUpdatedAt() bool { if o != nil && !IsNil(o.UpdatedAt) { return true } return false } // SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. func (o *DtoJob) SetUpdatedAt(v string) { o.UpdatedAt = &v } func (o DtoJob) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o DtoJob) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Attempts) { toSerialize["attempts"] = o.Attempts } if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } if !IsNil(o.Id) { toSerialize["id"] = o.Id } if !IsNil(o.LastError) { toSerialize["last_error"] = o.LastError } if !IsNil(o.MaxAttempts) { toSerialize["max_attempts"] = o.MaxAttempts } if !IsNil(o.Payload) { toSerialize["payload"] = o.Payload } if !IsNil(o.Queue) { toSerialize["queue"] = o.Queue } if !IsNil(o.RunAt) { toSerialize["run_at"] = o.RunAt } if !IsNil(o.Status) { toSerialize["status"] = o.Status } if !IsNil(o.Type) { toSerialize["type"] = o.Type } if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } return toSerialize, nil } type NullableDtoJob struct { value *DtoJob isSet bool } func (v NullableDtoJob) Get() *DtoJob { return v.value } func (v *NullableDtoJob) Set(val *DtoJob) { v.value = val v.isSet = true } func (v NullableDtoJob) IsSet() bool { return v.isSet } func (v *NullableDtoJob) Unset() { v.value = nil v.isSet = false } func NewNullableDtoJob(val *DtoJob) *NullableDtoJob { return &NullableDtoJob{value: val, isSet: true} } func (v NullableDtoJob) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableDtoJob) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }