Files
sdk/model_project_projects_domains.go

269 lines
7.3 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the ProjectProjectsDomains type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectProjectsDomains{}
// ProjectProjectsDomains struct for ProjectProjectsDomains
type ProjectProjectsDomains struct {
// Claims is one row per host — live, or pending with the DNS records it still owes.
Claims []ProjectProjectsDomain `json:"claims,omitempty"`
// Domains are the hostnames that are VERIFIED and routing right now.
Domains []string `json:"domains,omitempty"`
// Org is the organisation that owns the site.
Org *string `json:"org,omitempty"`
// Slug is the site the panel belongs to.
Slug *string `json:"slug,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProjectProjectsDomains ProjectProjectsDomains
// NewProjectProjectsDomains instantiates a new ProjectProjectsDomains 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 NewProjectProjectsDomains() *ProjectProjectsDomains {
this := ProjectProjectsDomains{}
return &this
}
// NewProjectProjectsDomainsWithDefaults instantiates a new ProjectProjectsDomains 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 NewProjectProjectsDomainsWithDefaults() *ProjectProjectsDomains {
this := ProjectProjectsDomains{}
return &this
}
// GetClaims returns the Claims field value if set, zero value otherwise.
func (o *ProjectProjectsDomains) GetClaims() []ProjectProjectsDomain {
if o == nil || IsNil(o.Claims) {
var ret []ProjectProjectsDomain
return ret
}
return o.Claims
}
// GetClaimsOk returns a tuple with the Claims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsDomains) GetClaimsOk() ([]ProjectProjectsDomain, bool) {
if o == nil || IsNil(o.Claims) {
return nil, false
}
return o.Claims, true
}
// HasClaims returns a boolean if a field has been set.
func (o *ProjectProjectsDomains) HasClaims() bool {
if o != nil && !IsNil(o.Claims) {
return true
}
return false
}
// SetClaims gets a reference to the given []ProjectProjectsDomain and assigns it to the Claims field.
func (o *ProjectProjectsDomains) SetClaims(v []ProjectProjectsDomain) {
o.Claims = v
}
// GetDomains returns the Domains field value if set, zero value otherwise.
func (o *ProjectProjectsDomains) GetDomains() []string {
if o == nil || IsNil(o.Domains) {
var ret []string
return ret
}
return o.Domains
}
// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsDomains) GetDomainsOk() ([]string, bool) {
if o == nil || IsNil(o.Domains) {
return nil, false
}
return o.Domains, true
}
// HasDomains returns a boolean if a field has been set.
func (o *ProjectProjectsDomains) HasDomains() bool {
if o != nil && !IsNil(o.Domains) {
return true
}
return false
}
// SetDomains gets a reference to the given []string and assigns it to the Domains field.
func (o *ProjectProjectsDomains) SetDomains(v []string) {
o.Domains = v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *ProjectProjectsDomains) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsDomains) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *ProjectProjectsDomains) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *ProjectProjectsDomains) SetOrg(v string) {
o.Org = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *ProjectProjectsDomains) GetSlug() string {
if o == nil || IsNil(o.Slug) {
var ret string
return ret
}
return *o.Slug
}
// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsDomains) GetSlugOk() (*string, bool) {
if o == nil || IsNil(o.Slug) {
return nil, false
}
return o.Slug, true
}
// HasSlug returns a boolean if a field has been set.
func (o *ProjectProjectsDomains) HasSlug() bool {
if o != nil && !IsNil(o.Slug) {
return true
}
return false
}
// SetSlug gets a reference to the given string and assigns it to the Slug field.
func (o *ProjectProjectsDomains) SetSlug(v string) {
o.Slug = &v
}
func (o ProjectProjectsDomains) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectProjectsDomains) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Claims) {
toSerialize["claims"] = o.Claims
}
if !IsNil(o.Domains) {
toSerialize["domains"] = o.Domains
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProjectProjectsDomains) UnmarshalJSON(data []byte) (err error) {
varProjectProjectsDomains := _ProjectProjectsDomains{}
err = json.Unmarshal(data, &varProjectProjectsDomains)
if err != nil {
return err
}
*o = ProjectProjectsDomains(varProjectProjectsDomains)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "claims")
delete(additionalProperties, "domains")
delete(additionalProperties, "org")
delete(additionalProperties, "slug")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProjectProjectsDomains struct {
value *ProjectProjectsDomains
isSet bool
}
func (v NullableProjectProjectsDomains) Get() *ProjectProjectsDomains {
return v.value
}
func (v *NullableProjectProjectsDomains) Set(val *ProjectProjectsDomains) {
v.value = val
v.isSet = true
}
func (v NullableProjectProjectsDomains) IsSet() bool {
return v.isSet
}
func (v *NullableProjectProjectsDomains) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectProjectsDomains(val *ProjectProjectsDomains) *NullableProjectProjectsDomains {
return &NullableProjectProjectsDomains{value: val, isSet: true}
}
func (v NullableProjectProjectsDomains) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectProjectsDomains) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}