Files
autoglue/sdk/go/model_dto_node_pool_response.go
allanice001 334df457ce feat: complete node pool api, sdk and ui
Signed-off-by: allanice001 <allanice001@gmail.com>
2025-11-08 10:22:45 +00:00

449 lines
12 KiB
Go

/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoNodePoolResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoNodePoolResponse{}
// DtoNodePoolResponse struct for DtoNodePoolResponse
type DtoNodePoolResponse struct {
Annotations []DtoAnnotationResponse `json:"annotations,omitempty"`
CreatedAt *string `json:"created_at,omitempty"`
Id *string `json:"id,omitempty"`
Labels []DtoLabelResponse `json:"labels,omitempty"`
Name *string `json:"name,omitempty"`
OrganizationId *string `json:"organization_id,omitempty"`
Role *string `json:"role,omitempty"`
Servers []DtoServerResponse `json:"servers,omitempty"`
Taints []DtoTaintResponse `json:"taints,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty"`
}
// NewDtoNodePoolResponse instantiates a new DtoNodePoolResponse 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 NewDtoNodePoolResponse() *DtoNodePoolResponse {
this := DtoNodePoolResponse{}
return &this
}
// NewDtoNodePoolResponseWithDefaults instantiates a new DtoNodePoolResponse 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 NewDtoNodePoolResponseWithDefaults() *DtoNodePoolResponse {
this := DtoNodePoolResponse{}
return &this
}
// GetAnnotations returns the Annotations field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetAnnotations() []DtoAnnotationResponse {
if o == nil || IsNil(o.Annotations) {
var ret []DtoAnnotationResponse
return ret
}
return o.Annotations
}
// GetAnnotationsOk returns a tuple with the Annotations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetAnnotationsOk() ([]DtoAnnotationResponse, bool) {
if o == nil || IsNil(o.Annotations) {
return nil, false
}
return o.Annotations, true
}
// HasAnnotations returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasAnnotations() bool {
if o != nil && !IsNil(o.Annotations) {
return true
}
return false
}
// SetAnnotations gets a reference to the given []DtoAnnotationResponse and assigns it to the Annotations field.
func (o *DtoNodePoolResponse) SetAnnotations(v []DtoAnnotationResponse) {
o.Annotations = v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) 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 *DtoNodePoolResponse) 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 *DtoNodePoolResponse) 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 *DtoNodePoolResponse) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DtoNodePoolResponse) SetId(v string) {
o.Id = &v
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetLabels() []DtoLabelResponse {
if o == nil || IsNil(o.Labels) {
var ret []DtoLabelResponse
return ret
}
return o.Labels
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetLabelsOk() ([]DtoLabelResponse, bool) {
if o == nil || IsNil(o.Labels) {
return nil, false
}
return o.Labels, true
}
// HasLabels returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasLabels() bool {
if o != nil && !IsNil(o.Labels) {
return true
}
return false
}
// SetLabels gets a reference to the given []DtoLabelResponse and assigns it to the Labels field.
func (o *DtoNodePoolResponse) SetLabels(v []DtoLabelResponse) {
o.Labels = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) 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 *DtoNodePoolResponse) 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 *DtoNodePoolResponse) 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 *DtoNodePoolResponse) SetName(v string) {
o.Name = &v
}
// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetOrganizationId() string {
if o == nil || IsNil(o.OrganizationId) {
var ret string
return ret
}
return *o.OrganizationId
}
// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetOrganizationIdOk() (*string, bool) {
if o == nil || IsNil(o.OrganizationId) {
return nil, false
}
return o.OrganizationId, true
}
// HasOrganizationId returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasOrganizationId() bool {
if o != nil && !IsNil(o.OrganizationId) {
return true
}
return false
}
// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field.
func (o *DtoNodePoolResponse) SetOrganizationId(v string) {
o.OrganizationId = &v
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetRole() string {
if o == nil || IsNil(o.Role) {
var ret string
return ret
}
return *o.Role
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetRoleOk() (*string, bool) {
if o == nil || IsNil(o.Role) {
return nil, false
}
return o.Role, true
}
// HasRole returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasRole() bool {
if o != nil && !IsNil(o.Role) {
return true
}
return false
}
// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *DtoNodePoolResponse) SetRole(v string) {
o.Role = &v
}
// GetServers returns the Servers field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetServers() []DtoServerResponse {
if o == nil || IsNil(o.Servers) {
var ret []DtoServerResponse
return ret
}
return o.Servers
}
// GetServersOk returns a tuple with the Servers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetServersOk() ([]DtoServerResponse, bool) {
if o == nil || IsNil(o.Servers) {
return nil, false
}
return o.Servers, true
}
// HasServers returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasServers() bool {
if o != nil && !IsNil(o.Servers) {
return true
}
return false
}
// SetServers gets a reference to the given []DtoServerResponse and assigns it to the Servers field.
func (o *DtoNodePoolResponse) SetServers(v []DtoServerResponse) {
o.Servers = v
}
// GetTaints returns the Taints field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetTaints() []DtoTaintResponse {
if o == nil || IsNil(o.Taints) {
var ret []DtoTaintResponse
return ret
}
return o.Taints
}
// GetTaintsOk returns a tuple with the Taints field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetTaintsOk() ([]DtoTaintResponse, bool) {
if o == nil || IsNil(o.Taints) {
return nil, false
}
return o.Taints, true
}
// HasTaints returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasTaints() bool {
if o != nil && !IsNil(o.Taints) {
return true
}
return false
}
// SetTaints gets a reference to the given []DtoTaintResponse and assigns it to the Taints field.
func (o *DtoNodePoolResponse) SetTaints(v []DtoTaintResponse) {
o.Taints = v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetUpdatedAt() string {
if o == nil || IsNil(o.UpdatedAt) {
var ret string
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetUpdatedAtOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
func (o *DtoNodePoolResponse) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o DtoNodePoolResponse) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoNodePoolResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Annotations) {
toSerialize["annotations"] = o.Annotations
}
if !IsNil(o.CreatedAt) {
toSerialize["created_at"] = o.CreatedAt
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Labels) {
toSerialize["labels"] = o.Labels
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.OrganizationId) {
toSerialize["organization_id"] = o.OrganizationId
}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
if !IsNil(o.Servers) {
toSerialize["servers"] = o.Servers
}
if !IsNil(o.Taints) {
toSerialize["taints"] = o.Taints
}
if !IsNil(o.UpdatedAt) {
toSerialize["updated_at"] = o.UpdatedAt
}
return toSerialize, nil
}
type NullableDtoNodePoolResponse struct {
value *DtoNodePoolResponse
isSet bool
}
func (v NullableDtoNodePoolResponse) Get() *DtoNodePoolResponse {
return v.value
}
func (v *NullableDtoNodePoolResponse) Set(val *DtoNodePoolResponse) {
v.value = val
v.isSet = true
}
func (v NullableDtoNodePoolResponse) IsSet() bool {
return v.isSet
}
func (v *NullableDtoNodePoolResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoNodePoolResponse(val *DtoNodePoolResponse) *NullableDtoNodePoolResponse {
return &NullableDtoNodePoolResponse{value: val, isSet: true}
}
func (v NullableDtoNodePoolResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoNodePoolResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}