mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.9 KiB
Go
231 lines
5.9 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 ToolBuildOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ToolBuildOut{}
|
|
|
|
// ToolBuildOut struct for ToolBuildOut
|
|
type ToolBuildOut struct {
|
|
// Bytes is the size of the bundled CommonJS the runtime will execute.
|
|
Bytes *int64 `json:"bytes,omitempty"`
|
|
// Generated is whether a model wrote the source from a spec, rather than the caller posting the source itself.
|
|
Generated *bool `json:"generated,omitempty"`
|
|
// Plugin is the plugin as stored, with its derived id and build time.
|
|
Plugin *ToolAuthoredPlugin `json:"plugin,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ToolBuildOut ToolBuildOut
|
|
|
|
// NewToolBuildOut instantiates a new ToolBuildOut 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 NewToolBuildOut() *ToolBuildOut {
|
|
this := ToolBuildOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewToolBuildOutWithDefaults instantiates a new ToolBuildOut 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 NewToolBuildOutWithDefaults() *ToolBuildOut {
|
|
this := ToolBuildOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetBytes returns the Bytes field value if set, zero value otherwise.
|
|
func (o *ToolBuildOut) GetBytes() int64 {
|
|
if o == nil || IsNil(o.Bytes) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Bytes
|
|
}
|
|
|
|
// GetBytesOk returns a tuple with the Bytes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolBuildOut) GetBytesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Bytes) {
|
|
return nil, false
|
|
}
|
|
return o.Bytes, true
|
|
}
|
|
|
|
// HasBytes returns a boolean if a field has been set.
|
|
func (o *ToolBuildOut) HasBytes() bool {
|
|
if o != nil && !IsNil(o.Bytes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBytes gets a reference to the given int64 and assigns it to the Bytes field.
|
|
func (o *ToolBuildOut) SetBytes(v int64) {
|
|
o.Bytes = &v
|
|
}
|
|
|
|
// GetGenerated returns the Generated field value if set, zero value otherwise.
|
|
func (o *ToolBuildOut) GetGenerated() bool {
|
|
if o == nil || IsNil(o.Generated) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Generated
|
|
}
|
|
|
|
// GetGeneratedOk returns a tuple with the Generated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolBuildOut) GetGeneratedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Generated) {
|
|
return nil, false
|
|
}
|
|
return o.Generated, true
|
|
}
|
|
|
|
// HasGenerated returns a boolean if a field has been set.
|
|
func (o *ToolBuildOut) HasGenerated() bool {
|
|
if o != nil && !IsNil(o.Generated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGenerated gets a reference to the given bool and assigns it to the Generated field.
|
|
func (o *ToolBuildOut) SetGenerated(v bool) {
|
|
o.Generated = &v
|
|
}
|
|
|
|
// GetPlugin returns the Plugin field value if set, zero value otherwise.
|
|
func (o *ToolBuildOut) GetPlugin() ToolAuthoredPlugin {
|
|
if o == nil || IsNil(o.Plugin) {
|
|
var ret ToolAuthoredPlugin
|
|
return ret
|
|
}
|
|
return *o.Plugin
|
|
}
|
|
|
|
// GetPluginOk returns a tuple with the Plugin field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolBuildOut) GetPluginOk() (*ToolAuthoredPlugin, bool) {
|
|
if o == nil || IsNil(o.Plugin) {
|
|
return nil, false
|
|
}
|
|
return o.Plugin, true
|
|
}
|
|
|
|
// HasPlugin returns a boolean if a field has been set.
|
|
func (o *ToolBuildOut) HasPlugin() bool {
|
|
if o != nil && !IsNil(o.Plugin) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPlugin gets a reference to the given ToolAuthoredPlugin and assigns it to the Plugin field.
|
|
func (o *ToolBuildOut) SetPlugin(v ToolAuthoredPlugin) {
|
|
o.Plugin = &v
|
|
}
|
|
|
|
func (o ToolBuildOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ToolBuildOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Bytes) {
|
|
toSerialize["bytes"] = o.Bytes
|
|
}
|
|
if !IsNil(o.Generated) {
|
|
toSerialize["generated"] = o.Generated
|
|
}
|
|
if !IsNil(o.Plugin) {
|
|
toSerialize["plugin"] = o.Plugin
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ToolBuildOut) UnmarshalJSON(data []byte) (err error) {
|
|
varToolBuildOut := _ToolBuildOut{}
|
|
|
|
err = json.Unmarshal(data, &varToolBuildOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ToolBuildOut(varToolBuildOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "bytes")
|
|
delete(additionalProperties, "generated")
|
|
delete(additionalProperties, "plugin")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableToolBuildOut struct {
|
|
value *ToolBuildOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableToolBuildOut) Get() *ToolBuildOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableToolBuildOut) Set(val *ToolBuildOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableToolBuildOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableToolBuildOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableToolBuildOut(val *ToolBuildOut) *NullableToolBuildOut {
|
|
return &NullableToolBuildOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableToolBuildOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableToolBuildOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|