mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.4 KiB
Go
231 lines
6.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 SandboxRan type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SandboxRan{}
|
|
|
|
// SandboxRan struct for SandboxRan
|
|
type SandboxRan struct {
|
|
// ExitCode is the PROGRAM's own status — 0 succeeded, anything else is what it returned, and a Command runs under `sh -c` so its shell's conventions apply. A command that never reached an exit does not arrive here at all: a timeout or a stop cancels the channel, and that is an error on the call rather than a code of ours invented to fill this field.
|
|
ExitCode *int64 `json:"exitCode,omitempty"`
|
|
// Stderr is standard error, kept apart from Stdout so a caller reading a program's OUTPUT is not reading its diagnostics as data. Same 1 MiB cap, same redaction. A program that failed usually says why here and nowhere else.
|
|
Stderr *string `json:"stderr,omitempty"`
|
|
// Stdout is what the program wrote to standard output, collected whole rather than streamed — to watch it arrive instead, name a RunIn.Session and read that session's feed. Capped at 1 MiB, past which it ends in \"[truncated at 1MiB]\". Every string named in RunIn.Blind is replaced by \"[redacted]\" before it gets here, and before it reaches the session.
|
|
Stdout *string `json:"stdout,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SandboxRan SandboxRan
|
|
|
|
// NewSandboxRan instantiates a new SandboxRan 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 NewSandboxRan() *SandboxRan {
|
|
this := SandboxRan{}
|
|
return &this
|
|
}
|
|
|
|
// NewSandboxRanWithDefaults instantiates a new SandboxRan 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 NewSandboxRanWithDefaults() *SandboxRan {
|
|
this := SandboxRan{}
|
|
return &this
|
|
}
|
|
|
|
// GetExitCode returns the ExitCode field value if set, zero value otherwise.
|
|
func (o *SandboxRan) GetExitCode() int64 {
|
|
if o == nil || IsNil(o.ExitCode) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ExitCode
|
|
}
|
|
|
|
// GetExitCodeOk returns a tuple with the ExitCode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SandboxRan) GetExitCodeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ExitCode) {
|
|
return nil, false
|
|
}
|
|
return o.ExitCode, true
|
|
}
|
|
|
|
// HasExitCode returns a boolean if a field has been set.
|
|
func (o *SandboxRan) HasExitCode() bool {
|
|
if o != nil && !IsNil(o.ExitCode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExitCode gets a reference to the given int64 and assigns it to the ExitCode field.
|
|
func (o *SandboxRan) SetExitCode(v int64) {
|
|
o.ExitCode = &v
|
|
}
|
|
|
|
// GetStderr returns the Stderr field value if set, zero value otherwise.
|
|
func (o *SandboxRan) GetStderr() string {
|
|
if o == nil || IsNil(o.Stderr) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Stderr
|
|
}
|
|
|
|
// GetStderrOk returns a tuple with the Stderr field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SandboxRan) GetStderrOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Stderr) {
|
|
return nil, false
|
|
}
|
|
return o.Stderr, true
|
|
}
|
|
|
|
// HasStderr returns a boolean if a field has been set.
|
|
func (o *SandboxRan) HasStderr() bool {
|
|
if o != nil && !IsNil(o.Stderr) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStderr gets a reference to the given string and assigns it to the Stderr field.
|
|
func (o *SandboxRan) SetStderr(v string) {
|
|
o.Stderr = &v
|
|
}
|
|
|
|
// GetStdout returns the Stdout field value if set, zero value otherwise.
|
|
func (o *SandboxRan) GetStdout() string {
|
|
if o == nil || IsNil(o.Stdout) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Stdout
|
|
}
|
|
|
|
// GetStdoutOk returns a tuple with the Stdout field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SandboxRan) GetStdoutOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Stdout) {
|
|
return nil, false
|
|
}
|
|
return o.Stdout, true
|
|
}
|
|
|
|
// HasStdout returns a boolean if a field has been set.
|
|
func (o *SandboxRan) HasStdout() bool {
|
|
if o != nil && !IsNil(o.Stdout) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStdout gets a reference to the given string and assigns it to the Stdout field.
|
|
func (o *SandboxRan) SetStdout(v string) {
|
|
o.Stdout = &v
|
|
}
|
|
|
|
func (o SandboxRan) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SandboxRan) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.ExitCode) {
|
|
toSerialize["exitCode"] = o.ExitCode
|
|
}
|
|
if !IsNil(o.Stderr) {
|
|
toSerialize["stderr"] = o.Stderr
|
|
}
|
|
if !IsNil(o.Stdout) {
|
|
toSerialize["stdout"] = o.Stdout
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SandboxRan) UnmarshalJSON(data []byte) (err error) {
|
|
varSandboxRan := _SandboxRan{}
|
|
|
|
err = json.Unmarshal(data, &varSandboxRan)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SandboxRan(varSandboxRan)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "exitCode")
|
|
delete(additionalProperties, "stderr")
|
|
delete(additionalProperties, "stdout")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSandboxRan struct {
|
|
value *SandboxRan
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSandboxRan) Get() *SandboxRan {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSandboxRan) Set(val *SandboxRan) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSandboxRan) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSandboxRan) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSandboxRan(val *SandboxRan) *NullableSandboxRan {
|
|
return &NullableSandboxRan{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSandboxRan) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSandboxRan) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|