mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
725 lines
20 KiB
Go
725 lines
20 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 FunctionFunctionView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FunctionFunctionView{}
|
|
|
|
// FunctionFunctionView struct for FunctionFunctionView
|
|
type FunctionFunctionView struct {
|
|
// mean wall-clock of those runs
|
|
AvgDurationMs *float64 `json:"avgDurationMs,omitempty"`
|
|
// when it was first published
|
|
CreatedAt *string `json:"createdAt,omitempty"`
|
|
// the path that invokes it
|
|
Endpoint *string `json:"endpoint,omitempty"`
|
|
// how many secret NAMES it mounts; values are never carried
|
|
EnvCount *int64 `json:"envCount,omitempty"`
|
|
// the language it runs under
|
|
Environment *string `json:"environment,omitempty"`
|
|
// how many of those runs failed
|
|
Errors7d *int64 `json:"errors7d,omitempty"`
|
|
// the prebuilt image it runs, when it runs one instead of source
|
|
Image *string `json:"image,omitempty"`
|
|
// runs in the last 7 days; ABSENT, never 0, when it has not run
|
|
Invocations7d *int64 `json:"invocations7d,omitempty"`
|
|
// when its code last changed
|
|
LastDeployedAt *string `json:"lastDeployedAt,omitempty"`
|
|
// the memory it runs with, and the multiplier on its compute charge
|
|
MemoryLimit *string `json:"memoryLimit,omitempty"`
|
|
// the function's org-unique handle
|
|
Name *string `json:"name,omitempty"`
|
|
// the display group it belongs to; the org is the isolation key
|
|
Namespace *string `json:"namespace,omitempty"`
|
|
// whether it is ready to serve
|
|
Status *string `json:"status,omitempty"`
|
|
// share of those runs that succeeded, 0..1
|
|
SuccessRate *float64 `json:"successRate,omitempty"`
|
|
// where it runs: empty for the sandbox, \"fleet\" for the org's GPU fleet
|
|
Target *string `json:"target,omitempty"`
|
|
// its per-invocation deadline
|
|
TimeoutSec *int64 `json:"timeoutSec,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FunctionFunctionView FunctionFunctionView
|
|
|
|
// NewFunctionFunctionView instantiates a new FunctionFunctionView 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 NewFunctionFunctionView() *FunctionFunctionView {
|
|
this := FunctionFunctionView{}
|
|
return &this
|
|
}
|
|
|
|
// NewFunctionFunctionViewWithDefaults instantiates a new FunctionFunctionView 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 NewFunctionFunctionViewWithDefaults() *FunctionFunctionView {
|
|
this := FunctionFunctionView{}
|
|
return &this
|
|
}
|
|
|
|
// GetAvgDurationMs returns the AvgDurationMs field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetAvgDurationMs() float64 {
|
|
if o == nil || IsNil(o.AvgDurationMs) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.AvgDurationMs
|
|
}
|
|
|
|
// GetAvgDurationMsOk returns a tuple with the AvgDurationMs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetAvgDurationMsOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.AvgDurationMs) {
|
|
return nil, false
|
|
}
|
|
return o.AvgDurationMs, true
|
|
}
|
|
|
|
// HasAvgDurationMs returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasAvgDurationMs() bool {
|
|
if o != nil && !IsNil(o.AvgDurationMs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAvgDurationMs gets a reference to the given float64 and assigns it to the AvgDurationMs field.
|
|
func (o *FunctionFunctionView) SetAvgDurationMs(v float64) {
|
|
o.AvgDurationMs = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetCreatedAt() string {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetCreatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
|
|
func (o *FunctionFunctionView) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetEndpoint returns the Endpoint field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetEndpoint() string {
|
|
if o == nil || IsNil(o.Endpoint) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Endpoint
|
|
}
|
|
|
|
// GetEndpointOk returns a tuple with the Endpoint field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetEndpointOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Endpoint) {
|
|
return nil, false
|
|
}
|
|
return o.Endpoint, true
|
|
}
|
|
|
|
// HasEndpoint returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasEndpoint() bool {
|
|
if o != nil && !IsNil(o.Endpoint) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEndpoint gets a reference to the given string and assigns it to the Endpoint field.
|
|
func (o *FunctionFunctionView) SetEndpoint(v string) {
|
|
o.Endpoint = &v
|
|
}
|
|
|
|
// GetEnvCount returns the EnvCount field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetEnvCount() int64 {
|
|
if o == nil || IsNil(o.EnvCount) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.EnvCount
|
|
}
|
|
|
|
// GetEnvCountOk returns a tuple with the EnvCount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetEnvCountOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.EnvCount) {
|
|
return nil, false
|
|
}
|
|
return o.EnvCount, true
|
|
}
|
|
|
|
// HasEnvCount returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasEnvCount() bool {
|
|
if o != nil && !IsNil(o.EnvCount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnvCount gets a reference to the given int64 and assigns it to the EnvCount field.
|
|
func (o *FunctionFunctionView) SetEnvCount(v int64) {
|
|
o.EnvCount = &v
|
|
}
|
|
|
|
// GetEnvironment returns the Environment field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetEnvironment() string {
|
|
if o == nil || IsNil(o.Environment) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Environment
|
|
}
|
|
|
|
// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetEnvironmentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Environment) {
|
|
return nil, false
|
|
}
|
|
return o.Environment, true
|
|
}
|
|
|
|
// HasEnvironment returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasEnvironment() bool {
|
|
if o != nil && !IsNil(o.Environment) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnvironment gets a reference to the given string and assigns it to the Environment field.
|
|
func (o *FunctionFunctionView) SetEnvironment(v string) {
|
|
o.Environment = &v
|
|
}
|
|
|
|
// GetErrors7d returns the Errors7d field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetErrors7d() int64 {
|
|
if o == nil || IsNil(o.Errors7d) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Errors7d
|
|
}
|
|
|
|
// GetErrors7dOk returns a tuple with the Errors7d field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetErrors7dOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Errors7d) {
|
|
return nil, false
|
|
}
|
|
return o.Errors7d, true
|
|
}
|
|
|
|
// HasErrors7d returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasErrors7d() bool {
|
|
if o != nil && !IsNil(o.Errors7d) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetErrors7d gets a reference to the given int64 and assigns it to the Errors7d field.
|
|
func (o *FunctionFunctionView) SetErrors7d(v int64) {
|
|
o.Errors7d = &v
|
|
}
|
|
|
|
// GetImage returns the Image field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetImage() string {
|
|
if o == nil || IsNil(o.Image) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Image
|
|
}
|
|
|
|
// GetImageOk returns a tuple with the Image field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetImageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Image) {
|
|
return nil, false
|
|
}
|
|
return o.Image, true
|
|
}
|
|
|
|
// HasImage returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasImage() bool {
|
|
if o != nil && !IsNil(o.Image) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetImage gets a reference to the given string and assigns it to the Image field.
|
|
func (o *FunctionFunctionView) SetImage(v string) {
|
|
o.Image = &v
|
|
}
|
|
|
|
// GetInvocations7d returns the Invocations7d field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetInvocations7d() int64 {
|
|
if o == nil || IsNil(o.Invocations7d) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Invocations7d
|
|
}
|
|
|
|
// GetInvocations7dOk returns a tuple with the Invocations7d field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetInvocations7dOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Invocations7d) {
|
|
return nil, false
|
|
}
|
|
return o.Invocations7d, true
|
|
}
|
|
|
|
// HasInvocations7d returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasInvocations7d() bool {
|
|
if o != nil && !IsNil(o.Invocations7d) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInvocations7d gets a reference to the given int64 and assigns it to the Invocations7d field.
|
|
func (o *FunctionFunctionView) SetInvocations7d(v int64) {
|
|
o.Invocations7d = &v
|
|
}
|
|
|
|
// GetLastDeployedAt returns the LastDeployedAt field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetLastDeployedAt() string {
|
|
if o == nil || IsNil(o.LastDeployedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LastDeployedAt
|
|
}
|
|
|
|
// GetLastDeployedAtOk returns a tuple with the LastDeployedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetLastDeployedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LastDeployedAt) {
|
|
return nil, false
|
|
}
|
|
return o.LastDeployedAt, true
|
|
}
|
|
|
|
// HasLastDeployedAt returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasLastDeployedAt() bool {
|
|
if o != nil && !IsNil(o.LastDeployedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLastDeployedAt gets a reference to the given string and assigns it to the LastDeployedAt field.
|
|
func (o *FunctionFunctionView) SetLastDeployedAt(v string) {
|
|
o.LastDeployedAt = &v
|
|
}
|
|
|
|
// GetMemoryLimit returns the MemoryLimit field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetMemoryLimit() string {
|
|
if o == nil || IsNil(o.MemoryLimit) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.MemoryLimit
|
|
}
|
|
|
|
// GetMemoryLimitOk returns a tuple with the MemoryLimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetMemoryLimitOk() (*string, bool) {
|
|
if o == nil || IsNil(o.MemoryLimit) {
|
|
return nil, false
|
|
}
|
|
return o.MemoryLimit, true
|
|
}
|
|
|
|
// HasMemoryLimit returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasMemoryLimit() bool {
|
|
if o != nil && !IsNil(o.MemoryLimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMemoryLimit gets a reference to the given string and assigns it to the MemoryLimit field.
|
|
func (o *FunctionFunctionView) SetMemoryLimit(v string) {
|
|
o.MemoryLimit = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) 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 *FunctionFunctionView) 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 *FunctionFunctionView) 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 *FunctionFunctionView) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetNamespace() string {
|
|
if o == nil || IsNil(o.Namespace) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Namespace
|
|
}
|
|
|
|
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetNamespaceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Namespace) {
|
|
return nil, false
|
|
}
|
|
return o.Namespace, true
|
|
}
|
|
|
|
// HasNamespace returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasNamespace() bool {
|
|
if o != nil && !IsNil(o.Namespace) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
|
|
func (o *FunctionFunctionView) SetNamespace(v string) {
|
|
o.Namespace = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *FunctionFunctionView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetSuccessRate returns the SuccessRate field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetSuccessRate() float64 {
|
|
if o == nil || IsNil(o.SuccessRate) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.SuccessRate
|
|
}
|
|
|
|
// GetSuccessRateOk returns a tuple with the SuccessRate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetSuccessRateOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.SuccessRate) {
|
|
return nil, false
|
|
}
|
|
return o.SuccessRate, true
|
|
}
|
|
|
|
// HasSuccessRate returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasSuccessRate() bool {
|
|
if o != nil && !IsNil(o.SuccessRate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSuccessRate gets a reference to the given float64 and assigns it to the SuccessRate field.
|
|
func (o *FunctionFunctionView) SetSuccessRate(v float64) {
|
|
o.SuccessRate = &v
|
|
}
|
|
|
|
// GetTarget returns the Target field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetTarget() string {
|
|
if o == nil || IsNil(o.Target) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Target
|
|
}
|
|
|
|
// GetTargetOk returns a tuple with the Target field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetTargetOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Target) {
|
|
return nil, false
|
|
}
|
|
return o.Target, true
|
|
}
|
|
|
|
// HasTarget returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasTarget() bool {
|
|
if o != nil && !IsNil(o.Target) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTarget gets a reference to the given string and assigns it to the Target field.
|
|
func (o *FunctionFunctionView) SetTarget(v string) {
|
|
o.Target = &v
|
|
}
|
|
|
|
// GetTimeoutSec returns the TimeoutSec field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionView) GetTimeoutSec() int64 {
|
|
if o == nil || IsNil(o.TimeoutSec) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.TimeoutSec
|
|
}
|
|
|
|
// GetTimeoutSecOk returns a tuple with the TimeoutSec field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionView) GetTimeoutSecOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.TimeoutSec) {
|
|
return nil, false
|
|
}
|
|
return o.TimeoutSec, true
|
|
}
|
|
|
|
// HasTimeoutSec returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionView) HasTimeoutSec() bool {
|
|
if o != nil && !IsNil(o.TimeoutSec) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTimeoutSec gets a reference to the given int64 and assigns it to the TimeoutSec field.
|
|
func (o *FunctionFunctionView) SetTimeoutSec(v int64) {
|
|
o.TimeoutSec = &v
|
|
}
|
|
|
|
func (o FunctionFunctionView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FunctionFunctionView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AvgDurationMs) {
|
|
toSerialize["avgDurationMs"] = o.AvgDurationMs
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Endpoint) {
|
|
toSerialize["endpoint"] = o.Endpoint
|
|
}
|
|
if !IsNil(o.EnvCount) {
|
|
toSerialize["envCount"] = o.EnvCount
|
|
}
|
|
if !IsNil(o.Environment) {
|
|
toSerialize["environment"] = o.Environment
|
|
}
|
|
if !IsNil(o.Errors7d) {
|
|
toSerialize["errors7d"] = o.Errors7d
|
|
}
|
|
if !IsNil(o.Image) {
|
|
toSerialize["image"] = o.Image
|
|
}
|
|
if !IsNil(o.Invocations7d) {
|
|
toSerialize["invocations7d"] = o.Invocations7d
|
|
}
|
|
if !IsNil(o.LastDeployedAt) {
|
|
toSerialize["lastDeployedAt"] = o.LastDeployedAt
|
|
}
|
|
if !IsNil(o.MemoryLimit) {
|
|
toSerialize["memoryLimit"] = o.MemoryLimit
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Namespace) {
|
|
toSerialize["namespace"] = o.Namespace
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.SuccessRate) {
|
|
toSerialize["successRate"] = o.SuccessRate
|
|
}
|
|
if !IsNil(o.Target) {
|
|
toSerialize["target"] = o.Target
|
|
}
|
|
if !IsNil(o.TimeoutSec) {
|
|
toSerialize["timeoutSec"] = o.TimeoutSec
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FunctionFunctionView) UnmarshalJSON(data []byte) (err error) {
|
|
varFunctionFunctionView := _FunctionFunctionView{}
|
|
|
|
err = json.Unmarshal(data, &varFunctionFunctionView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FunctionFunctionView(varFunctionFunctionView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "avgDurationMs")
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "endpoint")
|
|
delete(additionalProperties, "envCount")
|
|
delete(additionalProperties, "environment")
|
|
delete(additionalProperties, "errors7d")
|
|
delete(additionalProperties, "image")
|
|
delete(additionalProperties, "invocations7d")
|
|
delete(additionalProperties, "lastDeployedAt")
|
|
delete(additionalProperties, "memoryLimit")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "namespace")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "successRate")
|
|
delete(additionalProperties, "target")
|
|
delete(additionalProperties, "timeoutSec")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFunctionFunctionView struct {
|
|
value *FunctionFunctionView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFunctionFunctionView) Get() *FunctionFunctionView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFunctionFunctionView) Set(val *FunctionFunctionView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFunctionFunctionView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFunctionFunctionView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFunctionFunctionView(val *FunctionFunctionView) *NullableFunctionFunctionView {
|
|
return &NullableFunctionFunctionView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFunctionFunctionView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFunctionFunctionView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|