mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
839 lines
24 KiB
Go
839 lines
24 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 FunctionFunctionDetail type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FunctionFunctionDetail{}
|
|
|
|
// FunctionFunctionDetail struct for FunctionFunctionDetail
|
|
type FunctionFunctionDetail 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"`
|
|
// RecentInvocations is its twenty most recent runs, newest first.
|
|
RecentInvocations []FunctionInvocationView `json:"recentInvocations,omitempty"`
|
|
// Secrets are the NAMES it mounts. Values are never read or returned.
|
|
Secrets []string `json:"secrets,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"`
|
|
// Triggers is how this function is reached.
|
|
Triggers []FunctionTriggerView `json:"triggers,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FunctionFunctionDetail FunctionFunctionDetail
|
|
|
|
// NewFunctionFunctionDetail instantiates a new FunctionFunctionDetail 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 NewFunctionFunctionDetail() *FunctionFunctionDetail {
|
|
this := FunctionFunctionDetail{}
|
|
return &this
|
|
}
|
|
|
|
// NewFunctionFunctionDetailWithDefaults instantiates a new FunctionFunctionDetail 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 NewFunctionFunctionDetailWithDefaults() *FunctionFunctionDetail {
|
|
this := FunctionFunctionDetail{}
|
|
return &this
|
|
}
|
|
|
|
// GetAvgDurationMs returns the AvgDurationMs field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetAvgDurationMs(v float64) {
|
|
o.AvgDurationMs = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetEndpoint returns the Endpoint field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetEndpoint(v string) {
|
|
o.Endpoint = &v
|
|
}
|
|
|
|
// GetEnvCount returns the EnvCount field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetEnvCount(v int64) {
|
|
o.EnvCount = &v
|
|
}
|
|
|
|
// GetEnvironment returns the Environment field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetEnvironment(v string) {
|
|
o.Environment = &v
|
|
}
|
|
|
|
// GetErrors7d returns the Errors7d field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetErrors7d(v int64) {
|
|
o.Errors7d = &v
|
|
}
|
|
|
|
// GetImage returns the Image field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetImage(v string) {
|
|
o.Image = &v
|
|
}
|
|
|
|
// GetInvocations7d returns the Invocations7d field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetInvocations7d(v int64) {
|
|
o.Invocations7d = &v
|
|
}
|
|
|
|
// GetLastDeployedAt returns the LastDeployedAt field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetLastDeployedAt(v string) {
|
|
o.LastDeployedAt = &v
|
|
}
|
|
|
|
// GetMemoryLimit returns the MemoryLimit field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetMemoryLimit(v string) {
|
|
o.MemoryLimit = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetNamespace(v string) {
|
|
o.Namespace = &v
|
|
}
|
|
|
|
// GetRecentInvocations returns the RecentInvocations field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) GetRecentInvocations() []FunctionInvocationView {
|
|
if o == nil || IsNil(o.RecentInvocations) {
|
|
var ret []FunctionInvocationView
|
|
return ret
|
|
}
|
|
return o.RecentInvocations
|
|
}
|
|
|
|
// GetRecentInvocationsOk returns a tuple with the RecentInvocations field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionDetail) GetRecentInvocationsOk() ([]FunctionInvocationView, bool) {
|
|
if o == nil || IsNil(o.RecentInvocations) {
|
|
return nil, false
|
|
}
|
|
return o.RecentInvocations, true
|
|
}
|
|
|
|
// HasRecentInvocations returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionDetail) HasRecentInvocations() bool {
|
|
if o != nil && !IsNil(o.RecentInvocations) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecentInvocations gets a reference to the given []FunctionInvocationView and assigns it to the RecentInvocations field.
|
|
func (o *FunctionFunctionDetail) SetRecentInvocations(v []FunctionInvocationView) {
|
|
o.RecentInvocations = v
|
|
}
|
|
|
|
// GetSecrets returns the Secrets field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) GetSecrets() []string {
|
|
if o == nil || IsNil(o.Secrets) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Secrets
|
|
}
|
|
|
|
// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionDetail) GetSecretsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Secrets) {
|
|
return nil, false
|
|
}
|
|
return o.Secrets, true
|
|
}
|
|
|
|
// HasSecrets returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionDetail) HasSecrets() bool {
|
|
if o != nil && !IsNil(o.Secrets) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSecrets gets a reference to the given []string and assigns it to the Secrets field.
|
|
func (o *FunctionFunctionDetail) SetSecrets(v []string) {
|
|
o.Secrets = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetSuccessRate returns the SuccessRate field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetSuccessRate(v float64) {
|
|
o.SuccessRate = &v
|
|
}
|
|
|
|
// GetTarget returns the Target field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetTarget(v string) {
|
|
o.Target = &v
|
|
}
|
|
|
|
// GetTimeoutSec returns the TimeoutSec field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) 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 *FunctionFunctionDetail) SetTimeoutSec(v int64) {
|
|
o.TimeoutSec = &v
|
|
}
|
|
|
|
// GetTriggers returns the Triggers field value if set, zero value otherwise.
|
|
func (o *FunctionFunctionDetail) GetTriggers() []FunctionTriggerView {
|
|
if o == nil || IsNil(o.Triggers) {
|
|
var ret []FunctionTriggerView
|
|
return ret
|
|
}
|
|
return o.Triggers
|
|
}
|
|
|
|
// GetTriggersOk returns a tuple with the Triggers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionFunctionDetail) GetTriggersOk() ([]FunctionTriggerView, bool) {
|
|
if o == nil || IsNil(o.Triggers) {
|
|
return nil, false
|
|
}
|
|
return o.Triggers, true
|
|
}
|
|
|
|
// HasTriggers returns a boolean if a field has been set.
|
|
func (o *FunctionFunctionDetail) HasTriggers() bool {
|
|
if o != nil && !IsNil(o.Triggers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTriggers gets a reference to the given []FunctionTriggerView and assigns it to the Triggers field.
|
|
func (o *FunctionFunctionDetail) SetTriggers(v []FunctionTriggerView) {
|
|
o.Triggers = v
|
|
}
|
|
|
|
func (o FunctionFunctionDetail) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FunctionFunctionDetail) 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.RecentInvocations) {
|
|
toSerialize["recentInvocations"] = o.RecentInvocations
|
|
}
|
|
if !IsNil(o.Secrets) {
|
|
toSerialize["secrets"] = o.Secrets
|
|
}
|
|
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
|
|
}
|
|
if !IsNil(o.Triggers) {
|
|
toSerialize["triggers"] = o.Triggers
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FunctionFunctionDetail) UnmarshalJSON(data []byte) (err error) {
|
|
varFunctionFunctionDetail := _FunctionFunctionDetail{}
|
|
|
|
err = json.Unmarshal(data, &varFunctionFunctionDetail)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FunctionFunctionDetail(varFunctionFunctionDetail)
|
|
|
|
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, "recentInvocations")
|
|
delete(additionalProperties, "secrets")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "successRate")
|
|
delete(additionalProperties, "target")
|
|
delete(additionalProperties, "timeoutSec")
|
|
delete(additionalProperties, "triggers")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFunctionFunctionDetail struct {
|
|
value *FunctionFunctionDetail
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFunctionFunctionDetail) Get() *FunctionFunctionDetail {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFunctionFunctionDetail) Set(val *FunctionFunctionDetail) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFunctionFunctionDetail) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFunctionFunctionDetail) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFunctionFunctionDetail(val *FunctionFunctionDetail) *NullableFunctionFunctionDetail {
|
|
return &NullableFunctionFunctionDetail{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFunctionFunctionDetail) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFunctionFunctionDetail) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|