mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.1 KiB
Go
193 lines
5.1 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 DomainRenewResult type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DomainRenewResult{}
|
|
|
|
// DomainRenewResult struct for DomainRenewResult
|
|
type DomainRenewResult struct {
|
|
// what this renewal cost, in cents
|
|
PaidCents *int64 `json:"paidCents,omitempty"`
|
|
// the ownership row with its new expiry
|
|
Record *DomainHolding `json:"record,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DomainRenewResult DomainRenewResult
|
|
|
|
// NewDomainRenewResult instantiates a new DomainRenewResult 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 NewDomainRenewResult() *DomainRenewResult {
|
|
this := DomainRenewResult{}
|
|
return &this
|
|
}
|
|
|
|
// NewDomainRenewResultWithDefaults instantiates a new DomainRenewResult 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 NewDomainRenewResultWithDefaults() *DomainRenewResult {
|
|
this := DomainRenewResult{}
|
|
return &this
|
|
}
|
|
|
|
// GetPaidCents returns the PaidCents field value if set, zero value otherwise.
|
|
func (o *DomainRenewResult) GetPaidCents() int64 {
|
|
if o == nil || IsNil(o.PaidCents) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.PaidCents
|
|
}
|
|
|
|
// GetPaidCentsOk returns a tuple with the PaidCents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DomainRenewResult) GetPaidCentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.PaidCents) {
|
|
return nil, false
|
|
}
|
|
return o.PaidCents, true
|
|
}
|
|
|
|
// HasPaidCents returns a boolean if a field has been set.
|
|
func (o *DomainRenewResult) HasPaidCents() bool {
|
|
if o != nil && !IsNil(o.PaidCents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPaidCents gets a reference to the given int64 and assigns it to the PaidCents field.
|
|
func (o *DomainRenewResult) SetPaidCents(v int64) {
|
|
o.PaidCents = &v
|
|
}
|
|
|
|
// GetRecord returns the Record field value if set, zero value otherwise.
|
|
func (o *DomainRenewResult) GetRecord() DomainHolding {
|
|
if o == nil || IsNil(o.Record) {
|
|
var ret DomainHolding
|
|
return ret
|
|
}
|
|
return *o.Record
|
|
}
|
|
|
|
// GetRecordOk returns a tuple with the Record field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DomainRenewResult) GetRecordOk() (*DomainHolding, bool) {
|
|
if o == nil || IsNil(o.Record) {
|
|
return nil, false
|
|
}
|
|
return o.Record, true
|
|
}
|
|
|
|
// HasRecord returns a boolean if a field has been set.
|
|
func (o *DomainRenewResult) HasRecord() bool {
|
|
if o != nil && !IsNil(o.Record) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecord gets a reference to the given DomainHolding and assigns it to the Record field.
|
|
func (o *DomainRenewResult) SetRecord(v DomainHolding) {
|
|
o.Record = &v
|
|
}
|
|
|
|
func (o DomainRenewResult) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DomainRenewResult) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.PaidCents) {
|
|
toSerialize["paidCents"] = o.PaidCents
|
|
}
|
|
if !IsNil(o.Record) {
|
|
toSerialize["record"] = o.Record
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DomainRenewResult) UnmarshalJSON(data []byte) (err error) {
|
|
varDomainRenewResult := _DomainRenewResult{}
|
|
|
|
err = json.Unmarshal(data, &varDomainRenewResult)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DomainRenewResult(varDomainRenewResult)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "paidCents")
|
|
delete(additionalProperties, "record")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDomainRenewResult struct {
|
|
value *DomainRenewResult
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDomainRenewResult) Get() *DomainRenewResult {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDomainRenewResult) Set(val *DomainRenewResult) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDomainRenewResult) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDomainRenewResult) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDomainRenewResult(val *DomainRenewResult) *NullableDomainRenewResult {
|
|
return &NullableDomainRenewResult{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDomainRenewResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDomainRenewResult) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|