mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
353 lines
8.3 KiB
Go
353 lines
8.3 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 PrivateRegion type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PrivateRegion{}
|
|
|
|
// PrivateRegion struct for PrivateRegion
|
|
type PrivateRegion 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"`
|
|
OrganizationID string `json:"organizationID"`
|
|
CreatorID string `json:"creatorID"`
|
|
Secret *PrivateRegionAllOfSecret `json:"secret,omitempty"`
|
|
}
|
|
|
|
// NewPrivateRegion instantiates a new PrivateRegion 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 NewPrivateRegion(id string, baseUrl string, createdAt string, active bool, name string, organizationID string, creatorID string) *PrivateRegion {
|
|
this := PrivateRegion{}
|
|
this.Id = id
|
|
this.BaseUrl = baseUrl
|
|
this.CreatedAt = createdAt
|
|
this.Active = active
|
|
this.Name = name
|
|
this.OrganizationID = organizationID
|
|
this.CreatorID = creatorID
|
|
return &this
|
|
}
|
|
|
|
// NewPrivateRegionWithDefaults instantiates a new PrivateRegion 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 NewPrivateRegionWithDefaults() *PrivateRegion {
|
|
this := PrivateRegion{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *PrivateRegion) 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 *PrivateRegion) GetIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *PrivateRegion) SetId(v string) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetBaseUrl returns the BaseUrl field value
|
|
func (o *PrivateRegion) 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 *PrivateRegion) GetBaseUrlOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.BaseUrl, true
|
|
}
|
|
|
|
// SetBaseUrl sets field value
|
|
func (o *PrivateRegion) SetBaseUrl(v string) {
|
|
o.BaseUrl = v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value
|
|
func (o *PrivateRegion) 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 *PrivateRegion) GetCreatedAtOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.CreatedAt, true
|
|
}
|
|
|
|
// SetCreatedAt sets field value
|
|
func (o *PrivateRegion) SetCreatedAt(v string) {
|
|
o.CreatedAt = v
|
|
}
|
|
|
|
// GetActive returns the Active field value
|
|
func (o *PrivateRegion) 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 *PrivateRegion) GetActiveOk() (*bool, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Active, true
|
|
}
|
|
|
|
// SetActive sets field value
|
|
func (o *PrivateRegion) SetActive(v bool) {
|
|
o.Active = v
|
|
}
|
|
|
|
// GetLastPing returns the LastPing field value if set, zero value otherwise.
|
|
func (o *PrivateRegion) 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 *PrivateRegion) 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 *PrivateRegion) 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 *PrivateRegion) SetLastPing(v time.Time) {
|
|
o.LastPing = &v
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *PrivateRegion) 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 *PrivateRegion) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *PrivateRegion) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetOrganizationID returns the OrganizationID field value
|
|
func (o *PrivateRegion) GetOrganizationID() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.OrganizationID
|
|
}
|
|
|
|
// GetOrganizationIDOk returns a tuple with the OrganizationID field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrivateRegion) GetOrganizationIDOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.OrganizationID, true
|
|
}
|
|
|
|
// SetOrganizationID sets field value
|
|
func (o *PrivateRegion) SetOrganizationID(v string) {
|
|
o.OrganizationID = v
|
|
}
|
|
|
|
// GetCreatorID returns the CreatorID field value
|
|
func (o *PrivateRegion) GetCreatorID() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.CreatorID
|
|
}
|
|
|
|
// GetCreatorIDOk returns a tuple with the CreatorID field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrivateRegion) GetCreatorIDOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.CreatorID, true
|
|
}
|
|
|
|
// SetCreatorID sets field value
|
|
func (o *PrivateRegion) SetCreatorID(v string) {
|
|
o.CreatorID = v
|
|
}
|
|
|
|
// GetSecret returns the Secret field value if set, zero value otherwise.
|
|
func (o *PrivateRegion) GetSecret() PrivateRegionAllOfSecret {
|
|
if o == nil || IsNil(o.Secret) {
|
|
var ret PrivateRegionAllOfSecret
|
|
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 *PrivateRegion) GetSecretOk() (*PrivateRegionAllOfSecret, 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 *PrivateRegion) HasSecret() bool {
|
|
if o != nil && !IsNil(o.Secret) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSecret gets a reference to the given PrivateRegionAllOfSecret and assigns it to the Secret field.
|
|
func (o *PrivateRegion) SetSecret(v PrivateRegionAllOfSecret) {
|
|
o.Secret = &v
|
|
}
|
|
|
|
func (o PrivateRegion) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PrivateRegion) 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["organizationID"] = o.OrganizationID
|
|
toSerialize["creatorID"] = o.CreatorID
|
|
if !IsNil(o.Secret) {
|
|
toSerialize["secret"] = o.Secret
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePrivateRegion struct {
|
|
value *PrivateRegion
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePrivateRegion) Get() *PrivateRegion {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePrivateRegion) Set(val *PrivateRegion) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePrivateRegion) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePrivateRegion) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePrivateRegion(val *PrivateRegion) *NullablePrivateRegion {
|
|
return &NullablePrivateRegion{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePrivateRegion) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePrivateRegion) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|