mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.1 KiB
Go
269 lines
7.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 ExecCodeFile type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ExecCodeFile{}
|
|
|
|
// ExecCodeFile struct for ExecCodeFile
|
|
type ExecCodeFile struct {
|
|
// ID is the file's path RELATIVE to its session's artifact directory, which is also how it is fetched: GET /v1/exec/download/{session}/{id}.
|
|
Id *string `json:"id,omitempty"`
|
|
// Name is the display name. On an ANSWER it carries the `{session}/{id}` identifier whole, because the client matches on that prefix.
|
|
Name *string `json:"name,omitempty"`
|
|
// SessionID is the other accepted spelling of the same fact on the way IN. Both are read; whichever is set wins.
|
|
SessionId *string `json:"session_id,omitempty"`
|
|
// StorageSessionID names the session holding the bytes, and is the spelling the answer always uses.
|
|
StorageSessionId *string `json:"storage_session_id,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ExecCodeFile ExecCodeFile
|
|
|
|
// NewExecCodeFile instantiates a new ExecCodeFile 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 NewExecCodeFile() *ExecCodeFile {
|
|
this := ExecCodeFile{}
|
|
return &this
|
|
}
|
|
|
|
// NewExecCodeFileWithDefaults instantiates a new ExecCodeFile 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 NewExecCodeFileWithDefaults() *ExecCodeFile {
|
|
this := ExecCodeFile{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *ExecCodeFile) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExecCodeFile) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *ExecCodeFile) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *ExecCodeFile) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ExecCodeFile) 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 *ExecCodeFile) 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 *ExecCodeFile) 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 *ExecCodeFile) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetSessionId returns the SessionId field value if set, zero value otherwise.
|
|
func (o *ExecCodeFile) GetSessionId() string {
|
|
if o == nil || IsNil(o.SessionId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SessionId
|
|
}
|
|
|
|
// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExecCodeFile) GetSessionIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SessionId) {
|
|
return nil, false
|
|
}
|
|
return o.SessionId, true
|
|
}
|
|
|
|
// HasSessionId returns a boolean if a field has been set.
|
|
func (o *ExecCodeFile) HasSessionId() bool {
|
|
if o != nil && !IsNil(o.SessionId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSessionId gets a reference to the given string and assigns it to the SessionId field.
|
|
func (o *ExecCodeFile) SetSessionId(v string) {
|
|
o.SessionId = &v
|
|
}
|
|
|
|
// GetStorageSessionId returns the StorageSessionId field value if set, zero value otherwise.
|
|
func (o *ExecCodeFile) GetStorageSessionId() string {
|
|
if o == nil || IsNil(o.StorageSessionId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.StorageSessionId
|
|
}
|
|
|
|
// GetStorageSessionIdOk returns a tuple with the StorageSessionId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExecCodeFile) GetStorageSessionIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.StorageSessionId) {
|
|
return nil, false
|
|
}
|
|
return o.StorageSessionId, true
|
|
}
|
|
|
|
// HasStorageSessionId returns a boolean if a field has been set.
|
|
func (o *ExecCodeFile) HasStorageSessionId() bool {
|
|
if o != nil && !IsNil(o.StorageSessionId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStorageSessionId gets a reference to the given string and assigns it to the StorageSessionId field.
|
|
func (o *ExecCodeFile) SetStorageSessionId(v string) {
|
|
o.StorageSessionId = &v
|
|
}
|
|
|
|
func (o ExecCodeFile) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ExecCodeFile) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.SessionId) {
|
|
toSerialize["session_id"] = o.SessionId
|
|
}
|
|
if !IsNil(o.StorageSessionId) {
|
|
toSerialize["storage_session_id"] = o.StorageSessionId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ExecCodeFile) UnmarshalJSON(data []byte) (err error) {
|
|
varExecCodeFile := _ExecCodeFile{}
|
|
|
|
err = json.Unmarshal(data, &varExecCodeFile)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ExecCodeFile(varExecCodeFile)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "session_id")
|
|
delete(additionalProperties, "storage_session_id")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableExecCodeFile struct {
|
|
value *ExecCodeFile
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableExecCodeFile) Get() *ExecCodeFile {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableExecCodeFile) Set(val *ExecCodeFile) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableExecCodeFile) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableExecCodeFile) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableExecCodeFile(val *ExecCodeFile) *NullableExecCodeFile {
|
|
return &NullableExecCodeFile{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableExecCodeFile) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableExecCodeFile) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|