Files
sdk/model_standing_upkeep.go

345 lines
9.4 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 StandingUpkeep type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StandingUpkeep{}
// StandingUpkeep struct for StandingUpkeep
type StandingUpkeep struct {
// AtLeast reports that some obligation is a minimum, so YearlyCents is a floor rather than a final figure.
AtLeast *bool `json:"atLeast,omitempty"`
// Currency is the ISO code every amount here is denominated in.
Currency *string `json:"currency,omitempty"`
// Jurisdiction is the state whose obligations these are.
Jurisdiction *string `json:"jurisdiction,omitempty"`
// Obligations are the recurring charges, in the order a reader should see them.
Obligations []StandingObligation `json:"obligations,omitempty"`
// Structure is the entity this prices.
Structure *string `json:"structure,omitempty"`
// YearlyCents is what the entity owes every year, all obligations summed.
YearlyCents *int64 `json:"yearlyCents,omitempty"`
AdditionalProperties map[string]interface{}
}
type _StandingUpkeep StandingUpkeep
// NewStandingUpkeep instantiates a new StandingUpkeep 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 NewStandingUpkeep() *StandingUpkeep {
this := StandingUpkeep{}
return &this
}
// NewStandingUpkeepWithDefaults instantiates a new StandingUpkeep 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 NewStandingUpkeepWithDefaults() *StandingUpkeep {
this := StandingUpkeep{}
return &this
}
// GetAtLeast returns the AtLeast field value if set, zero value otherwise.
func (o *StandingUpkeep) GetAtLeast() bool {
if o == nil || IsNil(o.AtLeast) {
var ret bool
return ret
}
return *o.AtLeast
}
// GetAtLeastOk returns a tuple with the AtLeast field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StandingUpkeep) GetAtLeastOk() (*bool, bool) {
if o == nil || IsNil(o.AtLeast) {
return nil, false
}
return o.AtLeast, true
}
// HasAtLeast returns a boolean if a field has been set.
func (o *StandingUpkeep) HasAtLeast() bool {
if o != nil && !IsNil(o.AtLeast) {
return true
}
return false
}
// SetAtLeast gets a reference to the given bool and assigns it to the AtLeast field.
func (o *StandingUpkeep) SetAtLeast(v bool) {
o.AtLeast = &v
}
// GetCurrency returns the Currency field value if set, zero value otherwise.
func (o *StandingUpkeep) GetCurrency() string {
if o == nil || IsNil(o.Currency) {
var ret string
return ret
}
return *o.Currency
}
// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StandingUpkeep) GetCurrencyOk() (*string, bool) {
if o == nil || IsNil(o.Currency) {
return nil, false
}
return o.Currency, true
}
// HasCurrency returns a boolean if a field has been set.
func (o *StandingUpkeep) HasCurrency() bool {
if o != nil && !IsNil(o.Currency) {
return true
}
return false
}
// SetCurrency gets a reference to the given string and assigns it to the Currency field.
func (o *StandingUpkeep) SetCurrency(v string) {
o.Currency = &v
}
// GetJurisdiction returns the Jurisdiction field value if set, zero value otherwise.
func (o *StandingUpkeep) GetJurisdiction() string {
if o == nil || IsNil(o.Jurisdiction) {
var ret string
return ret
}
return *o.Jurisdiction
}
// GetJurisdictionOk returns a tuple with the Jurisdiction field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StandingUpkeep) GetJurisdictionOk() (*string, bool) {
if o == nil || IsNil(o.Jurisdiction) {
return nil, false
}
return o.Jurisdiction, true
}
// HasJurisdiction returns a boolean if a field has been set.
func (o *StandingUpkeep) HasJurisdiction() bool {
if o != nil && !IsNil(o.Jurisdiction) {
return true
}
return false
}
// SetJurisdiction gets a reference to the given string and assigns it to the Jurisdiction field.
func (o *StandingUpkeep) SetJurisdiction(v string) {
o.Jurisdiction = &v
}
// GetObligations returns the Obligations field value if set, zero value otherwise.
func (o *StandingUpkeep) GetObligations() []StandingObligation {
if o == nil || IsNil(o.Obligations) {
var ret []StandingObligation
return ret
}
return o.Obligations
}
// GetObligationsOk returns a tuple with the Obligations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StandingUpkeep) GetObligationsOk() ([]StandingObligation, bool) {
if o == nil || IsNil(o.Obligations) {
return nil, false
}
return o.Obligations, true
}
// HasObligations returns a boolean if a field has been set.
func (o *StandingUpkeep) HasObligations() bool {
if o != nil && !IsNil(o.Obligations) {
return true
}
return false
}
// SetObligations gets a reference to the given []StandingObligation and assigns it to the Obligations field.
func (o *StandingUpkeep) SetObligations(v []StandingObligation) {
o.Obligations = v
}
// GetStructure returns the Structure field value if set, zero value otherwise.
func (o *StandingUpkeep) GetStructure() string {
if o == nil || IsNil(o.Structure) {
var ret string
return ret
}
return *o.Structure
}
// GetStructureOk returns a tuple with the Structure field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StandingUpkeep) GetStructureOk() (*string, bool) {
if o == nil || IsNil(o.Structure) {
return nil, false
}
return o.Structure, true
}
// HasStructure returns a boolean if a field has been set.
func (o *StandingUpkeep) HasStructure() bool {
if o != nil && !IsNil(o.Structure) {
return true
}
return false
}
// SetStructure gets a reference to the given string and assigns it to the Structure field.
func (o *StandingUpkeep) SetStructure(v string) {
o.Structure = &v
}
// GetYearlyCents returns the YearlyCents field value if set, zero value otherwise.
func (o *StandingUpkeep) GetYearlyCents() int64 {
if o == nil || IsNil(o.YearlyCents) {
var ret int64
return ret
}
return *o.YearlyCents
}
// GetYearlyCentsOk returns a tuple with the YearlyCents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StandingUpkeep) GetYearlyCentsOk() (*int64, bool) {
if o == nil || IsNil(o.YearlyCents) {
return nil, false
}
return o.YearlyCents, true
}
// HasYearlyCents returns a boolean if a field has been set.
func (o *StandingUpkeep) HasYearlyCents() bool {
if o != nil && !IsNil(o.YearlyCents) {
return true
}
return false
}
// SetYearlyCents gets a reference to the given int64 and assigns it to the YearlyCents field.
func (o *StandingUpkeep) SetYearlyCents(v int64) {
o.YearlyCents = &v
}
func (o StandingUpkeep) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StandingUpkeep) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AtLeast) {
toSerialize["atLeast"] = o.AtLeast
}
if !IsNil(o.Currency) {
toSerialize["currency"] = o.Currency
}
if !IsNil(o.Jurisdiction) {
toSerialize["jurisdiction"] = o.Jurisdiction
}
if !IsNil(o.Obligations) {
toSerialize["obligations"] = o.Obligations
}
if !IsNil(o.Structure) {
toSerialize["structure"] = o.Structure
}
if !IsNil(o.YearlyCents) {
toSerialize["yearlyCents"] = o.YearlyCents
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *StandingUpkeep) UnmarshalJSON(data []byte) (err error) {
varStandingUpkeep := _StandingUpkeep{}
err = json.Unmarshal(data, &varStandingUpkeep)
if err != nil {
return err
}
*o = StandingUpkeep(varStandingUpkeep)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "atLeast")
delete(additionalProperties, "currency")
delete(additionalProperties, "jurisdiction")
delete(additionalProperties, "obligations")
delete(additionalProperties, "structure")
delete(additionalProperties, "yearlyCents")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableStandingUpkeep struct {
value *StandingUpkeep
isSet bool
}
func (v NullableStandingUpkeep) Get() *StandingUpkeep {
return v.value
}
func (v *NullableStandingUpkeep) Set(val *StandingUpkeep) {
v.value = val
v.isSet = true
}
func (v NullableStandingUpkeep) IsSet() bool {
return v.isSet
}
func (v *NullableStandingUpkeep) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStandingUpkeep(val *StandingUpkeep) *NullableStandingUpkeep {
return &NullableStandingUpkeep{value: val, isSet: true}
}
func (v NullableStandingUpkeep) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStandingUpkeep) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}