Files
sdk/model_auto_catalog.go

229 lines
6.2 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 AutoCatalog type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoCatalog{}
// AutoCatalog struct for AutoCatalog
type AutoCatalog struct {
ConnectorCount *int64 `json:"connectorCount,omitempty"`
Connectors []AutoConnectorMetadata `json:"connectors,omitempty"`
// RunnableCount is how many of them this deployment can actually invoke. It is the number that matters and it was absent: a caller read connectorCount and reasonably believed all of it worked.
RunnableCount *int64 `json:"runnableCount,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoCatalog AutoCatalog
// NewAutoCatalog instantiates a new AutoCatalog 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 NewAutoCatalog() *AutoCatalog {
this := AutoCatalog{}
return &this
}
// NewAutoCatalogWithDefaults instantiates a new AutoCatalog 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 NewAutoCatalogWithDefaults() *AutoCatalog {
this := AutoCatalog{}
return &this
}
// GetConnectorCount returns the ConnectorCount field value if set, zero value otherwise.
func (o *AutoCatalog) GetConnectorCount() int64 {
if o == nil || IsNil(o.ConnectorCount) {
var ret int64
return ret
}
return *o.ConnectorCount
}
// GetConnectorCountOk returns a tuple with the ConnectorCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoCatalog) GetConnectorCountOk() (*int64, bool) {
if o == nil || IsNil(o.ConnectorCount) {
return nil, false
}
return o.ConnectorCount, true
}
// HasConnectorCount returns a boolean if a field has been set.
func (o *AutoCatalog) HasConnectorCount() bool {
if o != nil && !IsNil(o.ConnectorCount) {
return true
}
return false
}
// SetConnectorCount gets a reference to the given int64 and assigns it to the ConnectorCount field.
func (o *AutoCatalog) SetConnectorCount(v int64) {
o.ConnectorCount = &v
}
// GetConnectors returns the Connectors field value if set, zero value otherwise.
func (o *AutoCatalog) GetConnectors() []AutoConnectorMetadata {
if o == nil || IsNil(o.Connectors) {
var ret []AutoConnectorMetadata
return ret
}
return o.Connectors
}
// GetConnectorsOk returns a tuple with the Connectors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoCatalog) GetConnectorsOk() ([]AutoConnectorMetadata, bool) {
if o == nil || IsNil(o.Connectors) {
return nil, false
}
return o.Connectors, true
}
// HasConnectors returns a boolean if a field has been set.
func (o *AutoCatalog) HasConnectors() bool {
if o != nil && !IsNil(o.Connectors) {
return true
}
return false
}
// SetConnectors gets a reference to the given []AutoConnectorMetadata and assigns it to the Connectors field.
func (o *AutoCatalog) SetConnectors(v []AutoConnectorMetadata) {
o.Connectors = v
}
// GetRunnableCount returns the RunnableCount field value if set, zero value otherwise.
func (o *AutoCatalog) GetRunnableCount() int64 {
if o == nil || IsNil(o.RunnableCount) {
var ret int64
return ret
}
return *o.RunnableCount
}
// GetRunnableCountOk returns a tuple with the RunnableCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoCatalog) GetRunnableCountOk() (*int64, bool) {
if o == nil || IsNil(o.RunnableCount) {
return nil, false
}
return o.RunnableCount, true
}
// HasRunnableCount returns a boolean if a field has been set.
func (o *AutoCatalog) HasRunnableCount() bool {
if o != nil && !IsNil(o.RunnableCount) {
return true
}
return false
}
// SetRunnableCount gets a reference to the given int64 and assigns it to the RunnableCount field.
func (o *AutoCatalog) SetRunnableCount(v int64) {
o.RunnableCount = &v
}
func (o AutoCatalog) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoCatalog) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ConnectorCount) {
toSerialize["connectorCount"] = o.ConnectorCount
}
if !IsNil(o.Connectors) {
toSerialize["connectors"] = o.Connectors
}
if !IsNil(o.RunnableCount) {
toSerialize["runnableCount"] = o.RunnableCount
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoCatalog) UnmarshalJSON(data []byte) (err error) {
varAutoCatalog := _AutoCatalog{}
err = json.Unmarshal(data, &varAutoCatalog)
if err != nil {
return err
}
*o = AutoCatalog(varAutoCatalog)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "connectorCount")
delete(additionalProperties, "connectors")
delete(additionalProperties, "runnableCount")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoCatalog struct {
value *AutoCatalog
isSet bool
}
func (v NullableAutoCatalog) Get() *AutoCatalog {
return v.value
}
func (v *NullableAutoCatalog) Set(val *AutoCatalog) {
v.value = val
v.isSet = true
}
func (v NullableAutoCatalog) IsSet() bool {
return v.isSet
}
func (v *NullableAutoCatalog) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoCatalog(val *AutoCatalog) *NullableAutoCatalog {
return &NullableAutoCatalog{value: val, isSet: true}
}
func (v NullableAutoCatalog) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoCatalog) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}