mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
4.6 KiB
Go
193 lines
4.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 RunnerLine type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RunnerLine{}
|
|
|
|
// RunnerLine struct for RunnerLine
|
|
type RunnerLine struct {
|
|
// Content is the line itself, without its terminator.
|
|
Content *string `json:"content,omitempty"`
|
|
// Time is when the line was written, in unix nanoseconds.
|
|
Time *int64 `json:"time,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RunnerLine RunnerLine
|
|
|
|
// NewRunnerLine instantiates a new RunnerLine 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 NewRunnerLine() *RunnerLine {
|
|
this := RunnerLine{}
|
|
return &this
|
|
}
|
|
|
|
// NewRunnerLineWithDefaults instantiates a new RunnerLine 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 NewRunnerLineWithDefaults() *RunnerLine {
|
|
this := RunnerLine{}
|
|
return &this
|
|
}
|
|
|
|
// GetContent returns the Content field value if set, zero value otherwise.
|
|
func (o *RunnerLine) GetContent() string {
|
|
if o == nil || IsNil(o.Content) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Content
|
|
}
|
|
|
|
// GetContentOk returns a tuple with the Content field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerLine) GetContentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Content) {
|
|
return nil, false
|
|
}
|
|
return o.Content, true
|
|
}
|
|
|
|
// HasContent returns a boolean if a field has been set.
|
|
func (o *RunnerLine) HasContent() bool {
|
|
if o != nil && !IsNil(o.Content) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetContent gets a reference to the given string and assigns it to the Content field.
|
|
func (o *RunnerLine) SetContent(v string) {
|
|
o.Content = &v
|
|
}
|
|
|
|
// GetTime returns the Time field value if set, zero value otherwise.
|
|
func (o *RunnerLine) GetTime() int64 {
|
|
if o == nil || IsNil(o.Time) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Time
|
|
}
|
|
|
|
// GetTimeOk returns a tuple with the Time field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RunnerLine) GetTimeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Time) {
|
|
return nil, false
|
|
}
|
|
return o.Time, true
|
|
}
|
|
|
|
// HasTime returns a boolean if a field has been set.
|
|
func (o *RunnerLine) HasTime() bool {
|
|
if o != nil && !IsNil(o.Time) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTime gets a reference to the given int64 and assigns it to the Time field.
|
|
func (o *RunnerLine) SetTime(v int64) {
|
|
o.Time = &v
|
|
}
|
|
|
|
func (o RunnerLine) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RunnerLine) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Content) {
|
|
toSerialize["content"] = o.Content
|
|
}
|
|
if !IsNil(o.Time) {
|
|
toSerialize["time"] = o.Time
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RunnerLine) UnmarshalJSON(data []byte) (err error) {
|
|
varRunnerLine := _RunnerLine{}
|
|
|
|
err = json.Unmarshal(data, &varRunnerLine)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RunnerLine(varRunnerLine)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "content")
|
|
delete(additionalProperties, "time")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRunnerLine struct {
|
|
value *RunnerLine
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRunnerLine) Get() *RunnerLine {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRunnerLine) Set(val *RunnerLine) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRunnerLine) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRunnerLine) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRunnerLine(val *RunnerLine) *NullableRunnerLine {
|
|
return &NullableRunnerLine{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRunnerLine) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRunnerLine) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|