Files
sdk/model_agent_coding_extend_in.go

193 lines
5.3 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 AgentCodingExtendIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentCodingExtendIn{}
// AgentCodingExtendIn struct for AgentCodingExtendIn
type AgentCodingExtendIn struct {
// Seconds is how much to add to the time the run is held to. It is added to what the run has left, up to the longest a run may be given, so asking for more than that is answered with what the run got.
Seconds *int64 `json:"seconds,omitempty"`
// Session is the run's handle, from the path.
Session *string `json:"session,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentCodingExtendIn AgentCodingExtendIn
// NewAgentCodingExtendIn instantiates a new AgentCodingExtendIn 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 NewAgentCodingExtendIn() *AgentCodingExtendIn {
this := AgentCodingExtendIn{}
return &this
}
// NewAgentCodingExtendInWithDefaults instantiates a new AgentCodingExtendIn 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 NewAgentCodingExtendInWithDefaults() *AgentCodingExtendIn {
this := AgentCodingExtendIn{}
return &this
}
// GetSeconds returns the Seconds field value if set, zero value otherwise.
func (o *AgentCodingExtendIn) 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 *AgentCodingExtendIn) 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 *AgentCodingExtendIn) 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 *AgentCodingExtendIn) SetSeconds(v int64) {
o.Seconds = &v
}
// GetSession returns the Session field value if set, zero value otherwise.
func (o *AgentCodingExtendIn) GetSession() string {
if o == nil || IsNil(o.Session) {
var ret string
return ret
}
return *o.Session
}
// GetSessionOk returns a tuple with the Session field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentCodingExtendIn) GetSessionOk() (*string, bool) {
if o == nil || IsNil(o.Session) {
return nil, false
}
return o.Session, true
}
// HasSession returns a boolean if a field has been set.
func (o *AgentCodingExtendIn) HasSession() bool {
if o != nil && !IsNil(o.Session) {
return true
}
return false
}
// SetSession gets a reference to the given string and assigns it to the Session field.
func (o *AgentCodingExtendIn) SetSession(v string) {
o.Session = &v
}
func (o AgentCodingExtendIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentCodingExtendIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Seconds) {
toSerialize["seconds"] = o.Seconds
}
if !IsNil(o.Session) {
toSerialize["session"] = o.Session
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentCodingExtendIn) UnmarshalJSON(data []byte) (err error) {
varAgentCodingExtendIn := _AgentCodingExtendIn{}
err = json.Unmarshal(data, &varAgentCodingExtendIn)
if err != nil {
return err
}
*o = AgentCodingExtendIn(varAgentCodingExtendIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "seconds")
delete(additionalProperties, "session")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentCodingExtendIn struct {
value *AgentCodingExtendIn
isSet bool
}
func (v NullableAgentCodingExtendIn) Get() *AgentCodingExtendIn {
return v.value
}
func (v *NullableAgentCodingExtendIn) Set(val *AgentCodingExtendIn) {
v.value = val
v.isSet = true
}
func (v NullableAgentCodingExtendIn) IsSet() bool {
return v.isSet
}
func (v *NullableAgentCodingExtendIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentCodingExtendIn(val *AgentCodingExtendIn) *NullableAgentCodingExtendIn {
return &NullableAgentCodingExtendIn{value: val, isSet: true}
}
func (v NullableAgentCodingExtendIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentCodingExtendIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}