mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
3.8 KiB
Go
155 lines
3.8 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 RunnerLogOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RunnerLogOut{}
|
|
|
|
// RunnerLogOut struct for RunnerLogOut
|
|
type RunnerLogOut struct {
|
|
// Ack is how far the log is durable — index plus lines accepted — and where the runner resends from.
|
|
Ack *int64 `json:"ack,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RunnerLogOut RunnerLogOut
|
|
|
|
// NewRunnerLogOut instantiates a new RunnerLogOut 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 NewRunnerLogOut() *RunnerLogOut {
|
|
this := RunnerLogOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewRunnerLogOutWithDefaults instantiates a new RunnerLogOut 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 NewRunnerLogOutWithDefaults() *RunnerLogOut {
|
|
this := RunnerLogOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAck returns the Ack field value if set, zero value otherwise.
|
|
func (o *RunnerLogOut) GetAck() int64 {
|
|
if o == nil || IsNil(o.Ack) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Ack
|
|
}
|
|
|
|
// GetAckOk returns a tuple with the Ack field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerLogOut) GetAckOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Ack) {
|
|
return nil, false
|
|
}
|
|
return o.Ack, true
|
|
}
|
|
|
|
// HasAck returns a boolean if a field has been set.
|
|
func (o *RunnerLogOut) HasAck() bool {
|
|
if o != nil && !IsNil(o.Ack) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAck gets a reference to the given int64 and assigns it to the Ack field.
|
|
func (o *RunnerLogOut) SetAck(v int64) {
|
|
o.Ack = &v
|
|
}
|
|
|
|
func (o RunnerLogOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RunnerLogOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Ack) {
|
|
toSerialize["ack"] = o.Ack
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RunnerLogOut) UnmarshalJSON(data []byte) (err error) {
|
|
varRunnerLogOut := _RunnerLogOut{}
|
|
|
|
err = json.Unmarshal(data, &varRunnerLogOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RunnerLogOut(varRunnerLogOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "ack")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRunnerLogOut struct {
|
|
value *RunnerLogOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRunnerLogOut) Get() *RunnerLogOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRunnerLogOut) Set(val *RunnerLogOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRunnerLogOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRunnerLogOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRunnerLogOut(val *RunnerLogOut) *NullableRunnerLogOut {
|
|
return &NullableRunnerLogOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRunnerLogOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRunnerLogOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|