mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
8.6 KiB
Go
345 lines
8.6 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the RunnerStep type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RunnerStep{}
|
|
|
|
// RunnerStep struct for RunnerStep
|
|
type RunnerStep struct {
|
|
// ID is the step's position in the job, counting from 0.
|
|
Id *int64 `json:"id,omitempty"`
|
|
// LogIndex is the first line of the task log this step wrote.
|
|
LogIndex *int64 `json:"log_index,omitempty"`
|
|
// LogLength is how many lines it wrote from there.
|
|
LogLength *int64 `json:"log_length,omitempty"`
|
|
// Result is how the step finished; empty means it has not.
|
|
Result *string `json:"result,omitempty"`
|
|
// Started is when it began, in unix nanoseconds; 0 is unset.
|
|
Started *int64 `json:"started,omitempty"`
|
|
// Stopped is when it finished, in unix nanoseconds; 0 is unset.
|
|
Stopped *int64 `json:"stopped,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RunnerStep RunnerStep
|
|
|
|
// NewRunnerStep instantiates a new RunnerStep 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 NewRunnerStep() *RunnerStep {
|
|
this := RunnerStep{}
|
|
return &this
|
|
}
|
|
|
|
// NewRunnerStepWithDefaults instantiates a new RunnerStep 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 NewRunnerStepWithDefaults() *RunnerStep {
|
|
this := RunnerStep{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *RunnerStep) 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 *RunnerStep) 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 *RunnerStep) 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 *RunnerStep) SetId(v int64) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetLogIndex returns the LogIndex field value if set, zero value otherwise.
|
|
func (o *RunnerStep) GetLogIndex() int64 {
|
|
if o == nil || IsNil(o.LogIndex) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.LogIndex
|
|
}
|
|
|
|
// GetLogIndexOk returns a tuple with the LogIndex field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerStep) GetLogIndexOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.LogIndex) {
|
|
return nil, false
|
|
}
|
|
return o.LogIndex, true
|
|
}
|
|
|
|
// HasLogIndex returns a boolean if a field has been set.
|
|
func (o *RunnerStep) HasLogIndex() bool {
|
|
if o != nil && !IsNil(o.LogIndex) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLogIndex gets a reference to the given int64 and assigns it to the LogIndex field.
|
|
func (o *RunnerStep) SetLogIndex(v int64) {
|
|
o.LogIndex = &v
|
|
}
|
|
|
|
// GetLogLength returns the LogLength field value if set, zero value otherwise.
|
|
func (o *RunnerStep) GetLogLength() int64 {
|
|
if o == nil || IsNil(o.LogLength) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.LogLength
|
|
}
|
|
|
|
// GetLogLengthOk returns a tuple with the LogLength field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerStep) GetLogLengthOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.LogLength) {
|
|
return nil, false
|
|
}
|
|
return o.LogLength, true
|
|
}
|
|
|
|
// HasLogLength returns a boolean if a field has been set.
|
|
func (o *RunnerStep) HasLogLength() bool {
|
|
if o != nil && !IsNil(o.LogLength) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLogLength gets a reference to the given int64 and assigns it to the LogLength field.
|
|
func (o *RunnerStep) SetLogLength(v int64) {
|
|
o.LogLength = &v
|
|
}
|
|
|
|
// GetResult returns the Result field value if set, zero value otherwise.
|
|
func (o *RunnerStep) GetResult() string {
|
|
if o == nil || IsNil(o.Result) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Result
|
|
}
|
|
|
|
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerStep) GetResultOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Result) {
|
|
return nil, false
|
|
}
|
|
return o.Result, true
|
|
}
|
|
|
|
// HasResult returns a boolean if a field has been set.
|
|
func (o *RunnerStep) HasResult() bool {
|
|
if o != nil && !IsNil(o.Result) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResult gets a reference to the given string and assigns it to the Result field.
|
|
func (o *RunnerStep) SetResult(v string) {
|
|
o.Result = &v
|
|
}
|
|
|
|
// GetStarted returns the Started field value if set, zero value otherwise.
|
|
func (o *RunnerStep) GetStarted() int64 {
|
|
if o == nil || IsNil(o.Started) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Started
|
|
}
|
|
|
|
// GetStartedOk returns a tuple with the Started field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerStep) GetStartedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Started) {
|
|
return nil, false
|
|
}
|
|
return o.Started, true
|
|
}
|
|
|
|
// HasStarted returns a boolean if a field has been set.
|
|
func (o *RunnerStep) HasStarted() bool {
|
|
if o != nil && !IsNil(o.Started) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStarted gets a reference to the given int64 and assigns it to the Started field.
|
|
func (o *RunnerStep) SetStarted(v int64) {
|
|
o.Started = &v
|
|
}
|
|
|
|
// GetStopped returns the Stopped field value if set, zero value otherwise.
|
|
func (o *RunnerStep) GetStopped() int64 {
|
|
if o == nil || IsNil(o.Stopped) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Stopped
|
|
}
|
|
|
|
// GetStoppedOk returns a tuple with the Stopped field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerStep) GetStoppedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Stopped) {
|
|
return nil, false
|
|
}
|
|
return o.Stopped, true
|
|
}
|
|
|
|
// HasStopped returns a boolean if a field has been set.
|
|
func (o *RunnerStep) HasStopped() bool {
|
|
if o != nil && !IsNil(o.Stopped) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStopped gets a reference to the given int64 and assigns it to the Stopped field.
|
|
func (o *RunnerStep) SetStopped(v int64) {
|
|
o.Stopped = &v
|
|
}
|
|
|
|
func (o RunnerStep) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RunnerStep) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.LogIndex) {
|
|
toSerialize["log_index"] = o.LogIndex
|
|
}
|
|
if !IsNil(o.LogLength) {
|
|
toSerialize["log_length"] = o.LogLength
|
|
}
|
|
if !IsNil(o.Result) {
|
|
toSerialize["result"] = o.Result
|
|
}
|
|
if !IsNil(o.Started) {
|
|
toSerialize["started"] = o.Started
|
|
}
|
|
if !IsNil(o.Stopped) {
|
|
toSerialize["stopped"] = o.Stopped
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RunnerStep) UnmarshalJSON(data []byte) (err error) {
|
|
varRunnerStep := _RunnerStep{}
|
|
|
|
err = json.Unmarshal(data, &varRunnerStep)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RunnerStep(varRunnerStep)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "log_index")
|
|
delete(additionalProperties, "log_length")
|
|
delete(additionalProperties, "result")
|
|
delete(additionalProperties, "started")
|
|
delete(additionalProperties, "stopped")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRunnerStep struct {
|
|
value *RunnerStep
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRunnerStep) Get() *RunnerStep {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRunnerStep) Set(val *RunnerStep) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRunnerStep) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRunnerStep) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRunnerStep(val *RunnerStep) *NullableRunnerStep {
|
|
return &NullableRunnerStep{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRunnerStep) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRunnerStep) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|