mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.6 KiB
Go
269 lines
6.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 RunnerLogIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RunnerLogIn{}
|
|
|
|
// RunnerLogIn struct for RunnerLogIn
|
|
type RunnerLogIn struct {
|
|
// Index is the position of the first line in that log, so a resent batch overlaps rather than duplicates.
|
|
Index *int64 `json:"index,omitempty"`
|
|
// Last seals the log and moves it to storage. Appending past a seal is an error; resending one is acknowledged.
|
|
Last *bool `json:"last,omitempty"`
|
|
// Lines is the batch itself.
|
|
Lines []RunnerLine `json:"lines,omitempty"`
|
|
// Task is whose log this is.
|
|
Task *int64 `json:"task,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RunnerLogIn RunnerLogIn
|
|
|
|
// NewRunnerLogIn instantiates a new RunnerLogIn 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 NewRunnerLogIn() *RunnerLogIn {
|
|
this := RunnerLogIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewRunnerLogInWithDefaults instantiates a new RunnerLogIn 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 NewRunnerLogInWithDefaults() *RunnerLogIn {
|
|
this := RunnerLogIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetIndex returns the Index field value if set, zero value otherwise.
|
|
func (o *RunnerLogIn) GetIndex() int64 {
|
|
if o == nil || IsNil(o.Index) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Index
|
|
}
|
|
|
|
// GetIndexOk returns a tuple with the Index field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerLogIn) GetIndexOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Index) {
|
|
return nil, false
|
|
}
|
|
return o.Index, true
|
|
}
|
|
|
|
// HasIndex returns a boolean if a field has been set.
|
|
func (o *RunnerLogIn) HasIndex() bool {
|
|
if o != nil && !IsNil(o.Index) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIndex gets a reference to the given int64 and assigns it to the Index field.
|
|
func (o *RunnerLogIn) SetIndex(v int64) {
|
|
o.Index = &v
|
|
}
|
|
|
|
// GetLast returns the Last field value if set, zero value otherwise.
|
|
func (o *RunnerLogIn) GetLast() bool {
|
|
if o == nil || IsNil(o.Last) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Last
|
|
}
|
|
|
|
// GetLastOk returns a tuple with the Last field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerLogIn) GetLastOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Last) {
|
|
return nil, false
|
|
}
|
|
return o.Last, true
|
|
}
|
|
|
|
// HasLast returns a boolean if a field has been set.
|
|
func (o *RunnerLogIn) HasLast() bool {
|
|
if o != nil && !IsNil(o.Last) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLast gets a reference to the given bool and assigns it to the Last field.
|
|
func (o *RunnerLogIn) SetLast(v bool) {
|
|
o.Last = &v
|
|
}
|
|
|
|
// GetLines returns the Lines field value if set, zero value otherwise.
|
|
func (o *RunnerLogIn) GetLines() []RunnerLine {
|
|
if o == nil || IsNil(o.Lines) {
|
|
var ret []RunnerLine
|
|
return ret
|
|
}
|
|
return o.Lines
|
|
}
|
|
|
|
// GetLinesOk returns a tuple with the Lines field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerLogIn) GetLinesOk() ([]RunnerLine, bool) {
|
|
if o == nil || IsNil(o.Lines) {
|
|
return nil, false
|
|
}
|
|
return o.Lines, true
|
|
}
|
|
|
|
// HasLines returns a boolean if a field has been set.
|
|
func (o *RunnerLogIn) HasLines() bool {
|
|
if o != nil && !IsNil(o.Lines) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLines gets a reference to the given []RunnerLine and assigns it to the Lines field.
|
|
func (o *RunnerLogIn) SetLines(v []RunnerLine) {
|
|
o.Lines = v
|
|
}
|
|
|
|
// GetTask returns the Task field value if set, zero value otherwise.
|
|
func (o *RunnerLogIn) GetTask() int64 {
|
|
if o == nil || IsNil(o.Task) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Task
|
|
}
|
|
|
|
// GetTaskOk returns a tuple with the Task field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerLogIn) GetTaskOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Task) {
|
|
return nil, false
|
|
}
|
|
return o.Task, true
|
|
}
|
|
|
|
// HasTask returns a boolean if a field has been set.
|
|
func (o *RunnerLogIn) HasTask() bool {
|
|
if o != nil && !IsNil(o.Task) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTask gets a reference to the given int64 and assigns it to the Task field.
|
|
func (o *RunnerLogIn) SetTask(v int64) {
|
|
o.Task = &v
|
|
}
|
|
|
|
func (o RunnerLogIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RunnerLogIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Index) {
|
|
toSerialize["index"] = o.Index
|
|
}
|
|
if !IsNil(o.Last) {
|
|
toSerialize["last"] = o.Last
|
|
}
|
|
if !IsNil(o.Lines) {
|
|
toSerialize["lines"] = o.Lines
|
|
}
|
|
if !IsNil(o.Task) {
|
|
toSerialize["task"] = o.Task
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RunnerLogIn) UnmarshalJSON(data []byte) (err error) {
|
|
varRunnerLogIn := _RunnerLogIn{}
|
|
|
|
err = json.Unmarshal(data, &varRunnerLogIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RunnerLogIn(varRunnerLogIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "index")
|
|
delete(additionalProperties, "last")
|
|
delete(additionalProperties, "lines")
|
|
delete(additionalProperties, "task")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRunnerLogIn struct {
|
|
value *RunnerLogIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRunnerLogIn) Get() *RunnerLogIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRunnerLogIn) Set(val *RunnerLogIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRunnerLogIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRunnerLogIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRunnerLogIn(val *RunnerLogIn) *NullableRunnerLogIn {
|
|
return &NullableRunnerLogIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRunnerLogIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRunnerLogIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|