mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.3 KiB
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 FunctionStatusBreakdown type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FunctionStatusBreakdown{}
|
|
|
|
// FunctionStatusBreakdown struct for FunctionStatusBreakdown
|
|
type FunctionStatusBreakdown struct {
|
|
// invocations that ran and failed
|
|
Error *int64 `json:"error,omitempty"`
|
|
// invocations whose code ran and wrote nothing to stderr
|
|
Success *int64 `json:"success,omitempty"`
|
|
// invocations that hit their configured deadline
|
|
Timeout *int64 `json:"timeout,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FunctionStatusBreakdown FunctionStatusBreakdown
|
|
|
|
// NewFunctionStatusBreakdown instantiates a new FunctionStatusBreakdown 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 NewFunctionStatusBreakdown() *FunctionStatusBreakdown {
|
|
this := FunctionStatusBreakdown{}
|
|
return &this
|
|
}
|
|
|
|
// NewFunctionStatusBreakdownWithDefaults instantiates a new FunctionStatusBreakdown 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 NewFunctionStatusBreakdownWithDefaults() *FunctionStatusBreakdown {
|
|
this := FunctionStatusBreakdown{}
|
|
return &this
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *FunctionStatusBreakdown) GetError() int64 {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionStatusBreakdown) GetErrorOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *FunctionStatusBreakdown) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given int64 and assigns it to the Error field.
|
|
func (o *FunctionStatusBreakdown) SetError(v int64) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetSuccess returns the Success field value if set, zero value otherwise.
|
|
func (o *FunctionStatusBreakdown) GetSuccess() int64 {
|
|
if o == nil || IsNil(o.Success) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Success
|
|
}
|
|
|
|
// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionStatusBreakdown) GetSuccessOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Success) {
|
|
return nil, false
|
|
}
|
|
return o.Success, true
|
|
}
|
|
|
|
// HasSuccess returns a boolean if a field has been set.
|
|
func (o *FunctionStatusBreakdown) HasSuccess() bool {
|
|
if o != nil && !IsNil(o.Success) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSuccess gets a reference to the given int64 and assigns it to the Success field.
|
|
func (o *FunctionStatusBreakdown) SetSuccess(v int64) {
|
|
o.Success = &v
|
|
}
|
|
|
|
// GetTimeout returns the Timeout field value if set, zero value otherwise.
|
|
func (o *FunctionStatusBreakdown) GetTimeout() int64 {
|
|
if o == nil || IsNil(o.Timeout) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Timeout
|
|
}
|
|
|
|
// GetTimeoutOk returns a tuple with the Timeout field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionStatusBreakdown) GetTimeoutOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Timeout) {
|
|
return nil, false
|
|
}
|
|
return o.Timeout, true
|
|
}
|
|
|
|
// HasTimeout returns a boolean if a field has been set.
|
|
func (o *FunctionStatusBreakdown) HasTimeout() bool {
|
|
if o != nil && !IsNil(o.Timeout) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTimeout gets a reference to the given int64 and assigns it to the Timeout field.
|
|
func (o *FunctionStatusBreakdown) SetTimeout(v int64) {
|
|
o.Timeout = &v
|
|
}
|
|
|
|
func (o FunctionStatusBreakdown) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FunctionStatusBreakdown) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Success) {
|
|
toSerialize["success"] = o.Success
|
|
}
|
|
if !IsNil(o.Timeout) {
|
|
toSerialize["timeout"] = o.Timeout
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FunctionStatusBreakdown) UnmarshalJSON(data []byte) (err error) {
|
|
varFunctionStatusBreakdown := _FunctionStatusBreakdown{}
|
|
|
|
err = json.Unmarshal(data, &varFunctionStatusBreakdown)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FunctionStatusBreakdown(varFunctionStatusBreakdown)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "success")
|
|
delete(additionalProperties, "timeout")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFunctionStatusBreakdown struct {
|
|
value *FunctionStatusBreakdown
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFunctionStatusBreakdown) Get() *FunctionStatusBreakdown {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFunctionStatusBreakdown) Set(val *FunctionStatusBreakdown) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFunctionStatusBreakdown) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFunctionStatusBreakdown) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFunctionStatusBreakdown(val *FunctionStatusBreakdown) *NullableFunctionStatusBreakdown {
|
|
return &NullableFunctionStatusBreakdown{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFunctionStatusBreakdown) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFunctionStatusBreakdown) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|