mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 21:00:06 +01:00
fix: rename sdk to match repo & introduce git subtree
This commit is contained in:
484
sdk/go/model_dto_server_response.go
Normal file
484
sdk/go/model_dto_server_response.go
Normal file
@@ -0,0 +1,484 @@
|
||||
/*
|
||||
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 DtoServerResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DtoServerResponse{}
|
||||
|
||||
// DtoServerResponse struct for DtoServerResponse
|
||||
type DtoServerResponse struct {
|
||||
CreatedAt *string `json:"created_at,omitempty"`
|
||||
Hostname *string `json:"hostname,omitempty"`
|
||||
Id *string `json:"id,omitempty"`
|
||||
OrganizationId *string `json:"organization_id,omitempty"`
|
||||
PrivateIpAddress *string `json:"private_ip_address,omitempty"`
|
||||
PublicIpAddress *string `json:"public_ip_address,omitempty"`
|
||||
Role *string `json:"role,omitempty"`
|
||||
SshKeyId *string `json:"ssh_key_id,omitempty"`
|
||||
SshUser *string `json:"ssh_user,omitempty"`
|
||||
Status *string `json:"status,omitempty"`
|
||||
UpdatedAt *string `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
// NewDtoServerResponse instantiates a new DtoServerResponse 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 NewDtoServerResponse() *DtoServerResponse {
|
||||
this := DtoServerResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDtoServerResponseWithDefaults instantiates a new DtoServerResponse 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 NewDtoServerResponseWithDefaults() *DtoServerResponse {
|
||||
this := DtoServerResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) SetCreatedAt(v string) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetHostname returns the Hostname field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) GetHostname() string {
|
||||
if o == nil || IsNil(o.Hostname) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Hostname
|
||||
}
|
||||
|
||||
// GetHostnameOk returns a tuple with the Hostname field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoServerResponse) GetHostnameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Hostname) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Hostname, true
|
||||
}
|
||||
|
||||
// HasHostname returns a boolean if a field has been set.
|
||||
func (o *DtoServerResponse) HasHostname() bool {
|
||||
if o != nil && !IsNil(o.Hostname) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetHostname gets a reference to the given string and assigns it to the Hostname field.
|
||||
func (o *DtoServerResponse) SetHostname(v string) {
|
||||
o.Hostname = &v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) SetOrganizationId(v string) {
|
||||
o.OrganizationId = &v
|
||||
}
|
||||
|
||||
// GetPrivateIpAddress returns the PrivateIpAddress field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) GetPrivateIpAddress() string {
|
||||
if o == nil || IsNil(o.PrivateIpAddress) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PrivateIpAddress
|
||||
}
|
||||
|
||||
// GetPrivateIpAddressOk returns a tuple with the PrivateIpAddress field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoServerResponse) GetPrivateIpAddressOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.PrivateIpAddress) {
|
||||
return nil, false
|
||||
}
|
||||
return o.PrivateIpAddress, true
|
||||
}
|
||||
|
||||
// HasPrivateIpAddress returns a boolean if a field has been set.
|
||||
func (o *DtoServerResponse) HasPrivateIpAddress() bool {
|
||||
if o != nil && !IsNil(o.PrivateIpAddress) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPrivateIpAddress gets a reference to the given string and assigns it to the PrivateIpAddress field.
|
||||
func (o *DtoServerResponse) SetPrivateIpAddress(v string) {
|
||||
o.PrivateIpAddress = &v
|
||||
}
|
||||
|
||||
// GetPublicIpAddress returns the PublicIpAddress field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) GetPublicIpAddress() string {
|
||||
if o == nil || IsNil(o.PublicIpAddress) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PublicIpAddress
|
||||
}
|
||||
|
||||
// GetPublicIpAddressOk returns a tuple with the PublicIpAddress field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoServerResponse) GetPublicIpAddressOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.PublicIpAddress) {
|
||||
return nil, false
|
||||
}
|
||||
return o.PublicIpAddress, true
|
||||
}
|
||||
|
||||
// HasPublicIpAddress returns a boolean if a field has been set.
|
||||
func (o *DtoServerResponse) HasPublicIpAddress() bool {
|
||||
if o != nil && !IsNil(o.PublicIpAddress) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPublicIpAddress gets a reference to the given string and assigns it to the PublicIpAddress field.
|
||||
func (o *DtoServerResponse) SetPublicIpAddress(v string) {
|
||||
o.PublicIpAddress = &v
|
||||
}
|
||||
|
||||
// GetRole returns the Role field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) SetRole(v string) {
|
||||
o.Role = &v
|
||||
}
|
||||
|
||||
// GetSshKeyId returns the SshKeyId field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) GetSshKeyId() string {
|
||||
if o == nil || IsNil(o.SshKeyId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SshKeyId
|
||||
}
|
||||
|
||||
// GetSshKeyIdOk returns a tuple with the SshKeyId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoServerResponse) GetSshKeyIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.SshKeyId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.SshKeyId, true
|
||||
}
|
||||
|
||||
// HasSshKeyId returns a boolean if a field has been set.
|
||||
func (o *DtoServerResponse) HasSshKeyId() bool {
|
||||
if o != nil && !IsNil(o.SshKeyId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSshKeyId gets a reference to the given string and assigns it to the SshKeyId field.
|
||||
func (o *DtoServerResponse) SetSshKeyId(v string) {
|
||||
o.SshKeyId = &v
|
||||
}
|
||||
|
||||
// GetSshUser returns the SshUser field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) GetSshUser() string {
|
||||
if o == nil || IsNil(o.SshUser) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SshUser
|
||||
}
|
||||
|
||||
// GetSshUserOk returns a tuple with the SshUser field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DtoServerResponse) GetSshUserOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.SshUser) {
|
||||
return nil, false
|
||||
}
|
||||
return o.SshUser, true
|
||||
}
|
||||
|
||||
// HasSshUser returns a boolean if a field has been set.
|
||||
func (o *DtoServerResponse) HasSshUser() bool {
|
||||
if o != nil && !IsNil(o.SshUser) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSshUser gets a reference to the given string and assigns it to the SshUser field.
|
||||
func (o *DtoServerResponse) SetSshUser(v string) {
|
||||
o.SshUser = &v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) 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 *DtoServerResponse) SetUpdatedAt(v string) {
|
||||
o.UpdatedAt = &v
|
||||
}
|
||||
|
||||
func (o DtoServerResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize, err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o DtoServerResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.Hostname) {
|
||||
toSerialize["hostname"] = o.Hostname
|
||||
}
|
||||
if !IsNil(o.Id) {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if !IsNil(o.OrganizationId) {
|
||||
toSerialize["organization_id"] = o.OrganizationId
|
||||
}
|
||||
if !IsNil(o.PrivateIpAddress) {
|
||||
toSerialize["private_ip_address"] = o.PrivateIpAddress
|
||||
}
|
||||
if !IsNil(o.PublicIpAddress) {
|
||||
toSerialize["public_ip_address"] = o.PublicIpAddress
|
||||
}
|
||||
if !IsNil(o.Role) {
|
||||
toSerialize["role"] = o.Role
|
||||
}
|
||||
if !IsNil(o.SshKeyId) {
|
||||
toSerialize["ssh_key_id"] = o.SshKeyId
|
||||
}
|
||||
if !IsNil(o.SshUser) {
|
||||
toSerialize["ssh_user"] = o.SshUser
|
||||
}
|
||||
if !IsNil(o.Status) {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
if !IsNil(o.UpdatedAt) {
|
||||
toSerialize["updated_at"] = o.UpdatedAt
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableDtoServerResponse struct {
|
||||
value *DtoServerResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDtoServerResponse) Get() *DtoServerResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDtoServerResponse) Set(val *DtoServerResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDtoServerResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDtoServerResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDtoServerResponse(val *DtoServerResponse) *NullableDtoServerResponse {
|
||||
return &NullableDtoServerResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDtoServerResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDtoServerResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user