Files
sdk/model_agent_coding_extended.go

193 lines
5.1 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 AgentCodingExtended type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentCodingExtended{}
// AgentCodingExtended struct for AgentCodingExtended
type AgentCodingExtended struct {
// Seconds is how long the run has left.
Seconds *int64 `json:"seconds,omitempty"`
// Until is when the run is ended for time now, as an RFC 3339 time.
Until *string `json:"until,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentCodingExtended AgentCodingExtended
// NewAgentCodingExtended instantiates a new AgentCodingExtended 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 NewAgentCodingExtended() *AgentCodingExtended {
this := AgentCodingExtended{}
return &this
}
// NewAgentCodingExtendedWithDefaults instantiates a new AgentCodingExtended 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 NewAgentCodingExtendedWithDefaults() *AgentCodingExtended {
this := AgentCodingExtended{}
return &this
}
// GetSeconds returns the Seconds field value if set, zero value otherwise.
func (o *AgentCodingExtended) GetSeconds() int64 {
if o == nil || IsNil(o.Seconds) {
var ret int64
return ret
}
return *o.Seconds
}
// GetSecondsOk returns a tuple with the Seconds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentCodingExtended) GetSecondsOk() (*int64, bool) {
if o == nil || IsNil(o.Seconds) {
return nil, false
}
return o.Seconds, true
}
// HasSeconds returns a boolean if a field has been set.
func (o *AgentCodingExtended) HasSeconds() bool {
if o != nil && !IsNil(o.Seconds) {
return true
}
return false
}
// SetSeconds gets a reference to the given int64 and assigns it to the Seconds field.
func (o *AgentCodingExtended) SetSeconds(v int64) {
o.Seconds = &v
}
// GetUntil returns the Until field value if set, zero value otherwise.
func (o *AgentCodingExtended) GetUntil() string {
if o == nil || IsNil(o.Until) {
var ret string
return ret
}
return *o.Until
}
// GetUntilOk returns a tuple with the Until field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentCodingExtended) GetUntilOk() (*string, bool) {
if o == nil || IsNil(o.Until) {
return nil, false
}
return o.Until, true
}
// HasUntil returns a boolean if a field has been set.
func (o *AgentCodingExtended) HasUntil() bool {
if o != nil && !IsNil(o.Until) {
return true
}
return false
}
// SetUntil gets a reference to the given string and assigns it to the Until field.
func (o *AgentCodingExtended) SetUntil(v string) {
o.Until = &v
}
func (o AgentCodingExtended) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentCodingExtended) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Seconds) {
toSerialize["seconds"] = o.Seconds
}
if !IsNil(o.Until) {
toSerialize["until"] = o.Until
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentCodingExtended) UnmarshalJSON(data []byte) (err error) {
varAgentCodingExtended := _AgentCodingExtended{}
err = json.Unmarshal(data, &varAgentCodingExtended)
if err != nil {
return err
}
*o = AgentCodingExtended(varAgentCodingExtended)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "seconds")
delete(additionalProperties, "until")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentCodingExtended struct {
value *AgentCodingExtended
isSet bool
}
func (v NullableAgentCodingExtended) Get() *AgentCodingExtended {
return v.value
}
func (v *NullableAgentCodingExtended) Set(val *AgentCodingExtended) {
v.value = val
v.isSet = true
}
func (v NullableAgentCodingExtended) IsSet() bool {
return v.isSet
}
func (v *NullableAgentCodingExtended) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentCodingExtended(val *AgentCodingExtended) *NullableAgentCodingExtended {
return &NullableAgentCodingExtended{value: val, isSet: true}
}
func (v NullableAgentCodingExtended) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentCodingExtended) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}