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

290 lines
6.5 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"
"time"
)
// checks if the PublicRegion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PublicRegion{}
// PublicRegion struct for PublicRegion
type PublicRegion struct {
Id string `json:"id"`
BaseUrl string `json:"baseUrl"`
CreatedAt string `json:"createdAt"`
Active bool `json:"active"`
LastPing *time.Time `json:"lastPing,omitempty"`
Name string `json:"name"`
Production bool `json:"production"`
}
// NewPublicRegion instantiates a new PublicRegion 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 NewPublicRegion(id string, baseUrl string, createdAt string, active bool, name string, production bool) *PublicRegion {
this := PublicRegion{}
this.Id = id
this.BaseUrl = baseUrl
this.CreatedAt = createdAt
this.Active = active
this.Name = name
this.Production = production
return &this
}
// NewPublicRegionWithDefaults instantiates a new PublicRegion 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 NewPublicRegionWithDefaults() *PublicRegion {
this := PublicRegion{}
return &this
}
// GetId returns the Id field value
func (o *PublicRegion) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *PublicRegion) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *PublicRegion) SetId(v string) {
o.Id = v
}
// GetBaseUrl returns the BaseUrl field value
func (o *PublicRegion) GetBaseUrl() string {
if o == nil {
var ret string
return ret
}
return o.BaseUrl
}
// GetBaseUrlOk returns a tuple with the BaseUrl field value
// and a boolean to check if the value has been set.
func (o *PublicRegion) GetBaseUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.BaseUrl, true
}
// SetBaseUrl sets field value
func (o *PublicRegion) SetBaseUrl(v string) {
o.BaseUrl = v
}
// GetCreatedAt returns the CreatedAt field value
func (o *PublicRegion) GetCreatedAt() string {
if o == nil {
var ret string
return ret
}
return o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *PublicRegion) GetCreatedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CreatedAt, true
}
// SetCreatedAt sets field value
func (o *PublicRegion) SetCreatedAt(v string) {
o.CreatedAt = v
}
// GetActive returns the Active field value
func (o *PublicRegion) GetActive() bool {
if o == nil {
var ret bool
return ret
}
return o.Active
}
// GetActiveOk returns a tuple with the Active field value
// and a boolean to check if the value has been set.
func (o *PublicRegion) GetActiveOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Active, true
}
// SetActive sets field value
func (o *PublicRegion) SetActive(v bool) {
o.Active = v
}
// GetLastPing returns the LastPing field value if set, zero value otherwise.
func (o *PublicRegion) GetLastPing() time.Time {
if o == nil || IsNil(o.LastPing) {
var ret time.Time
return ret
}
return *o.LastPing
}
// GetLastPingOk returns a tuple with the LastPing field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PublicRegion) GetLastPingOk() (*time.Time, bool) {
if o == nil || IsNil(o.LastPing) {
return nil, false
}
return o.LastPing, true
}
// HasLastPing returns a boolean if a field has been set.
func (o *PublicRegion) HasLastPing() bool {
if o != nil && !IsNil(o.LastPing) {
return true
}
return false
}
// SetLastPing gets a reference to the given time.Time and assigns it to the LastPing field.
func (o *PublicRegion) SetLastPing(v time.Time) {
o.LastPing = &v
}
// GetName returns the Name field value
func (o *PublicRegion) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *PublicRegion) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *PublicRegion) SetName(v string) {
o.Name = v
}
// GetProduction returns the Production field value
func (o *PublicRegion) GetProduction() bool {
if o == nil {
var ret bool
return ret
}
return o.Production
}
// GetProductionOk returns a tuple with the Production field value
// and a boolean to check if the value has been set.
func (o *PublicRegion) GetProductionOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Production, true
}
// SetProduction sets field value
func (o *PublicRegion) SetProduction(v bool) {
o.Production = v
}
func (o PublicRegion) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PublicRegion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["baseUrl"] = o.BaseUrl
toSerialize["createdAt"] = o.CreatedAt
toSerialize["active"] = o.Active
if !IsNil(o.LastPing) {
toSerialize["lastPing"] = o.LastPing
}
toSerialize["name"] = o.Name
toSerialize["production"] = o.Production
return toSerialize, nil
}
type NullablePublicRegion struct {
value *PublicRegion
isSet bool
}
func (v NullablePublicRegion) Get() *PublicRegion {
return v.value
}
func (v *NullablePublicRegion) Set(val *PublicRegion) {
v.value = val
v.isSet = true
}
func (v NullablePublicRegion) IsSet() bool {
return v.isSet
}
func (v *NullablePublicRegion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePublicRegion(val *PublicRegion) *NullablePublicRegion {
return &NullablePublicRegion{value: val, isSet: true}
}
func (v NullablePublicRegion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePublicRegion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}