mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.0 KiB
Go
193 lines
5.0 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 GitPoolDeclared type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GitPoolDeclared{}
|
|
|
|
// GitPoolDeclared struct for GitPoolDeclared
|
|
type GitPoolDeclared struct {
|
|
// Pool is the capacity that now exists.
|
|
Pool *GitPoolView `json:"pool,omitempty"`
|
|
// Secret is what a runner daemon presents to enter the pool. It is answered HERE AND NOWHERE ELSE — only a digest is stored — so a lost one is replaced by declaring the pool again.
|
|
Secret *string `json:"secret,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GitPoolDeclared GitPoolDeclared
|
|
|
|
// NewGitPoolDeclared instantiates a new GitPoolDeclared 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 NewGitPoolDeclared() *GitPoolDeclared {
|
|
this := GitPoolDeclared{}
|
|
return &this
|
|
}
|
|
|
|
// NewGitPoolDeclaredWithDefaults instantiates a new GitPoolDeclared 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 NewGitPoolDeclaredWithDefaults() *GitPoolDeclared {
|
|
this := GitPoolDeclared{}
|
|
return &this
|
|
}
|
|
|
|
// GetPool returns the Pool field value if set, zero value otherwise.
|
|
func (o *GitPoolDeclared) GetPool() GitPoolView {
|
|
if o == nil || IsNil(o.Pool) {
|
|
var ret GitPoolView
|
|
return ret
|
|
}
|
|
return *o.Pool
|
|
}
|
|
|
|
// GetPoolOk returns a tuple with the Pool field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GitPoolDeclared) GetPoolOk() (*GitPoolView, bool) {
|
|
if o == nil || IsNil(o.Pool) {
|
|
return nil, false
|
|
}
|
|
return o.Pool, true
|
|
}
|
|
|
|
// HasPool returns a boolean if a field has been set.
|
|
func (o *GitPoolDeclared) HasPool() bool {
|
|
if o != nil && !IsNil(o.Pool) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPool gets a reference to the given GitPoolView and assigns it to the Pool field.
|
|
func (o *GitPoolDeclared) SetPool(v GitPoolView) {
|
|
o.Pool = &v
|
|
}
|
|
|
|
// GetSecret returns the Secret field value if set, zero value otherwise.
|
|
func (o *GitPoolDeclared) GetSecret() string {
|
|
if o == nil || IsNil(o.Secret) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Secret
|
|
}
|
|
|
|
// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GitPoolDeclared) GetSecretOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Secret) {
|
|
return nil, false
|
|
}
|
|
return o.Secret, true
|
|
}
|
|
|
|
// HasSecret returns a boolean if a field has been set.
|
|
func (o *GitPoolDeclared) HasSecret() bool {
|
|
if o != nil && !IsNil(o.Secret) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSecret gets a reference to the given string and assigns it to the Secret field.
|
|
func (o *GitPoolDeclared) SetSecret(v string) {
|
|
o.Secret = &v
|
|
}
|
|
|
|
func (o GitPoolDeclared) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GitPoolDeclared) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Pool) {
|
|
toSerialize["pool"] = o.Pool
|
|
}
|
|
if !IsNil(o.Secret) {
|
|
toSerialize["secret"] = o.Secret
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GitPoolDeclared) UnmarshalJSON(data []byte) (err error) {
|
|
varGitPoolDeclared := _GitPoolDeclared{}
|
|
|
|
err = json.Unmarshal(data, &varGitPoolDeclared)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GitPoolDeclared(varGitPoolDeclared)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "pool")
|
|
delete(additionalProperties, "secret")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGitPoolDeclared struct {
|
|
value *GitPoolDeclared
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGitPoolDeclared) Get() *GitPoolDeclared {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGitPoolDeclared) Set(val *GitPoolDeclared) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGitPoolDeclared) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGitPoolDeclared) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGitPoolDeclared(val *GitPoolDeclared) *NullableGitPoolDeclared {
|
|
return &NullableGitPoolDeclared{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGitPoolDeclared) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGitPoolDeclared) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|