Files
stack/components/fctl/membershipclient/model_server_info.go

190 lines
4.6 KiB
Go

/*
Membership API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 0.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package membershipclient
import (
"encoding/json"
)
// checks if the ServerInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ServerInfo{}
// ServerInfo struct for ServerInfo
type ServerInfo struct {
Version string `json:"version"`
Capabilities []Capability `json:"capabilities,omitempty"`
ConsoleURL *string `json:"consoleURL,omitempty"`
}
// NewServerInfo instantiates a new ServerInfo 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 NewServerInfo(version string) *ServerInfo {
this := ServerInfo{}
this.Version = version
return &this
}
// NewServerInfoWithDefaults instantiates a new ServerInfo 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 NewServerInfoWithDefaults() *ServerInfo {
this := ServerInfo{}
return &this
}
// GetVersion returns the Version field value
func (o *ServerInfo) GetVersion() string {
if o == nil {
var ret string
return ret
}
return o.Version
}
// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
func (o *ServerInfo) GetVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Version, true
}
// SetVersion sets field value
func (o *ServerInfo) SetVersion(v string) {
o.Version = v
}
// GetCapabilities returns the Capabilities field value if set, zero value otherwise.
func (o *ServerInfo) GetCapabilities() []Capability {
if o == nil || IsNil(o.Capabilities) {
var ret []Capability
return ret
}
return o.Capabilities
}
// GetCapabilitiesOk returns a tuple with the Capabilities field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServerInfo) GetCapabilitiesOk() ([]Capability, bool) {
if o == nil || IsNil(o.Capabilities) {
return nil, false
}
return o.Capabilities, true
}
// HasCapabilities returns a boolean if a field has been set.
func (o *ServerInfo) HasCapabilities() bool {
if o != nil && !IsNil(o.Capabilities) {
return true
}
return false
}
// SetCapabilities gets a reference to the given []Capability and assigns it to the Capabilities field.
func (o *ServerInfo) SetCapabilities(v []Capability) {
o.Capabilities = v
}
// GetConsoleURL returns the ConsoleURL field value if set, zero value otherwise.
func (o *ServerInfo) GetConsoleURL() string {
if o == nil || IsNil(o.ConsoleURL) {
var ret string
return ret
}
return *o.ConsoleURL
}
// GetConsoleURLOk returns a tuple with the ConsoleURL field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ServerInfo) GetConsoleURLOk() (*string, bool) {
if o == nil || IsNil(o.ConsoleURL) {
return nil, false
}
return o.ConsoleURL, true
}
// HasConsoleURL returns a boolean if a field has been set.
func (o *ServerInfo) HasConsoleURL() bool {
if o != nil && !IsNil(o.ConsoleURL) {
return true
}
return false
}
// SetConsoleURL gets a reference to the given string and assigns it to the ConsoleURL field.
func (o *ServerInfo) SetConsoleURL(v string) {
o.ConsoleURL = &v
}
func (o ServerInfo) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ServerInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["version"] = o.Version
if !IsNil(o.Capabilities) {
toSerialize["capabilities"] = o.Capabilities
}
if !IsNil(o.ConsoleURL) {
toSerialize["consoleURL"] = o.ConsoleURL
}
return toSerialize, nil
}
type NullableServerInfo struct {
value *ServerInfo
isSet bool
}
func (v NullableServerInfo) Get() *ServerInfo {
return v.value
}
func (v *NullableServerInfo) Set(val *ServerInfo) {
v.value = val
v.isSet = true
}
func (v NullableServerInfo) IsSet() bool {
return v.isSet
}
func (v *NullableServerInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableServerInfo(val *ServerInfo) *NullableServerInfo {
return &NullableServerInfo{value: val, isSet: true}
}
func (v NullableServerInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableServerInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}