mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.4 KiB
Go
193 lines
5.4 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 ExecListing type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ExecListing{}
|
|
|
|
// ExecListing struct for ExecListing
|
|
type ExecListing struct {
|
|
// LastModified is when the BYTES last changed, as RFC 3339 in UTC to the second — `2026-01-02T03:04:05Z`, the sandbox's own `date -u -r` on the file. It is an mtime and not a creation time, so a file a later run overwrote carries that run's clock. Never empty: a row exists only because `find` stat-ed the file.
|
|
LastModified *string `json:"lastModified,omitempty"`
|
|
// Name is the file's IDENTIFIER, `{session_id}/{fileId}` whole — never the bare filename, and never URL-escaped. It is exactly what GET /v1/exec/download takes after its prefix, and hanzo.chat matches it as a PREFIX (`name.startsWith(session + \"/\")`) to decide which rows belong to a session it is holding. `fileId` is the path RELATIVE to the session's artifact directory, so it carries `/` for anything the run wrote in a sub-directory.
|
|
Name *string `json:"name,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ExecListing ExecListing
|
|
|
|
// NewExecListing instantiates a new ExecListing 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 NewExecListing() *ExecListing {
|
|
this := ExecListing{}
|
|
return &this
|
|
}
|
|
|
|
// NewExecListingWithDefaults instantiates a new ExecListing 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 NewExecListingWithDefaults() *ExecListing {
|
|
this := ExecListing{}
|
|
return &this
|
|
}
|
|
|
|
// GetLastModified returns the LastModified field value if set, zero value otherwise.
|
|
func (o *ExecListing) GetLastModified() string {
|
|
if o == nil || IsNil(o.LastModified) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LastModified
|
|
}
|
|
|
|
// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExecListing) GetLastModifiedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LastModified) {
|
|
return nil, false
|
|
}
|
|
return o.LastModified, true
|
|
}
|
|
|
|
// HasLastModified returns a boolean if a field has been set.
|
|
func (o *ExecListing) HasLastModified() bool {
|
|
if o != nil && !IsNil(o.LastModified) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLastModified gets a reference to the given string and assigns it to the LastModified field.
|
|
func (o *ExecListing) SetLastModified(v string) {
|
|
o.LastModified = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ExecListing) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExecListing) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *ExecListing) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *ExecListing) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
func (o ExecListing) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ExecListing) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.LastModified) {
|
|
toSerialize["lastModified"] = o.LastModified
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ExecListing) UnmarshalJSON(data []byte) (err error) {
|
|
varExecListing := _ExecListing{}
|
|
|
|
err = json.Unmarshal(data, &varExecListing)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ExecListing(varExecListing)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "lastModified")
|
|
delete(additionalProperties, "name")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableExecListing struct {
|
|
value *ExecListing
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableExecListing) Get() *ExecListing {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableExecListing) Set(val *ExecListing) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableExecListing) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableExecListing) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableExecListing(val *ExecListing) *NullableExecListing {
|
|
return &NullableExecListing{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableExecListing) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableExecListing) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|