Files
sdk/model_agent_coding_artifacts.go

231 lines
6.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 AgentCodingArtifacts type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentCodingArtifacts{}
// AgentCodingArtifacts struct for AgentCodingArtifacts
type AgentCodingArtifacts struct {
// Artifacts are the run's artifacts, stored files first. Never null.
Artifacts []AgentArtifact `json:"artifacts,omitempty"`
// Saved is when the artifacts were saved, RFC 3339 in UTC; empty while the run has saved none.
Saved *string `json:"saved,omitempty"`
// Session is the run's handle.
Session *string `json:"session,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentCodingArtifacts AgentCodingArtifacts
// NewAgentCodingArtifacts instantiates a new AgentCodingArtifacts 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 NewAgentCodingArtifacts() *AgentCodingArtifacts {
this := AgentCodingArtifacts{}
return &this
}
// NewAgentCodingArtifactsWithDefaults instantiates a new AgentCodingArtifacts 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 NewAgentCodingArtifactsWithDefaults() *AgentCodingArtifacts {
this := AgentCodingArtifacts{}
return &this
}
// GetArtifacts returns the Artifacts field value if set, zero value otherwise.
func (o *AgentCodingArtifacts) GetArtifacts() []AgentArtifact {
if o == nil || IsNil(o.Artifacts) {
var ret []AgentArtifact
return ret
}
return o.Artifacts
}
// GetArtifactsOk returns a tuple with the Artifacts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentCodingArtifacts) GetArtifactsOk() ([]AgentArtifact, bool) {
if o == nil || IsNil(o.Artifacts) {
return nil, false
}
return o.Artifacts, true
}
// HasArtifacts returns a boolean if a field has been set.
func (o *AgentCodingArtifacts) HasArtifacts() bool {
if o != nil && !IsNil(o.Artifacts) {
return true
}
return false
}
// SetArtifacts gets a reference to the given []AgentArtifact and assigns it to the Artifacts field.
func (o *AgentCodingArtifacts) SetArtifacts(v []AgentArtifact) {
o.Artifacts = v
}
// GetSaved returns the Saved field value if set, zero value otherwise.
func (o *AgentCodingArtifacts) GetSaved() string {
if o == nil || IsNil(o.Saved) {
var ret string
return ret
}
return *o.Saved
}
// GetSavedOk returns a tuple with the Saved field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentCodingArtifacts) GetSavedOk() (*string, bool) {
if o == nil || IsNil(o.Saved) {
return nil, false
}
return o.Saved, true
}
// HasSaved returns a boolean if a field has been set.
func (o *AgentCodingArtifacts) HasSaved() bool {
if o != nil && !IsNil(o.Saved) {
return true
}
return false
}
// SetSaved gets a reference to the given string and assigns it to the Saved field.
func (o *AgentCodingArtifacts) SetSaved(v string) {
o.Saved = &v
}
// GetSession returns the Session field value if set, zero value otherwise.
func (o *AgentCodingArtifacts) 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 *AgentCodingArtifacts) 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 *AgentCodingArtifacts) 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 *AgentCodingArtifacts) SetSession(v string) {
o.Session = &v
}
func (o AgentCodingArtifacts) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentCodingArtifacts) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Artifacts) {
toSerialize["artifacts"] = o.Artifacts
}
if !IsNil(o.Saved) {
toSerialize["saved"] = o.Saved
}
if !IsNil(o.Session) {
toSerialize["session"] = o.Session
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentCodingArtifacts) UnmarshalJSON(data []byte) (err error) {
varAgentCodingArtifacts := _AgentCodingArtifacts{}
err = json.Unmarshal(data, &varAgentCodingArtifacts)
if err != nil {
return err
}
*o = AgentCodingArtifacts(varAgentCodingArtifacts)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "artifacts")
delete(additionalProperties, "saved")
delete(additionalProperties, "session")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentCodingArtifacts struct {
value *AgentCodingArtifacts
isSet bool
}
func (v NullableAgentCodingArtifacts) Get() *AgentCodingArtifacts {
return v.value
}
func (v *NullableAgentCodingArtifacts) Set(val *AgentCodingArtifacts) {
v.value = val
v.isSet = true
}
func (v NullableAgentCodingArtifacts) IsSet() bool {
return v.isSet
}
func (v *NullableAgentCodingArtifacts) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentCodingArtifacts(val *AgentCodingArtifacts) *NullableAgentCodingArtifacts {
return &NullableAgentCodingArtifacts{value: val, isSet: true}
}
func (v NullableAgentCodingArtifacts) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentCodingArtifacts) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}