mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
459 lines
12 KiB
Go
459 lines
12 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 StandingObligation type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StandingObligation{}
|
|
|
|
// StandingObligation struct for StandingObligation
|
|
type StandingObligation struct {
|
|
// AmountCents is what it costs each period.
|
|
AmountCents *int64 `json:"amountCents,omitempty"`
|
|
// AsOf is when that amount was last checked against its source, RFC 3339 date.
|
|
AsOf *string `json:"asOf,omitempty"`
|
|
// Code names the obligation so a caller can branch without reading prose.
|
|
Code *string `json:"code,omitempty"`
|
|
// Every is how often it falls due — \"yearly\" for every obligation known here.
|
|
Every *string `json:"every,omitempty"`
|
|
// Label is what the payer sees.
|
|
Label *string `json:"label,omitempty"`
|
|
// Minimum marks a floor rather than a fixed price — a franchise tax that scales with shares or assets is quoted at its minimum, and an entity past the threshold owes more. Saying so is the difference between a quote and a number someone later disputes.
|
|
Minimum *bool `json:"minimum,omitempty"`
|
|
// PassThrough marks money we collect and remit to the state rather than keep.
|
|
PassThrough *bool `json:"passThrough,omitempty"`
|
|
// Source names the authority that publishes a pass-through amount, so the figure can be checked without first working out who would know.
|
|
Source *string `json:"source,omitempty"`
|
|
// Stale reports that AsOf is older than the review window. It tells; it does not block.
|
|
Stale *bool `json:"stale,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StandingObligation StandingObligation
|
|
|
|
// NewStandingObligation instantiates a new StandingObligation 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 NewStandingObligation() *StandingObligation {
|
|
this := StandingObligation{}
|
|
return &this
|
|
}
|
|
|
|
// NewStandingObligationWithDefaults instantiates a new StandingObligation 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 NewStandingObligationWithDefaults() *StandingObligation {
|
|
this := StandingObligation{}
|
|
return &this
|
|
}
|
|
|
|
// GetAmountCents returns the AmountCents field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetAmountCents() int64 {
|
|
if o == nil || IsNil(o.AmountCents) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.AmountCents
|
|
}
|
|
|
|
// GetAmountCentsOk returns a tuple with the AmountCents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetAmountCentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.AmountCents) {
|
|
return nil, false
|
|
}
|
|
return o.AmountCents, true
|
|
}
|
|
|
|
// HasAmountCents returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasAmountCents() bool {
|
|
if o != nil && !IsNil(o.AmountCents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAmountCents gets a reference to the given int64 and assigns it to the AmountCents field.
|
|
func (o *StandingObligation) SetAmountCents(v int64) {
|
|
o.AmountCents = &v
|
|
}
|
|
|
|
// GetAsOf returns the AsOf field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetAsOf() string {
|
|
if o == nil || IsNil(o.AsOf) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AsOf
|
|
}
|
|
|
|
// GetAsOfOk returns a tuple with the AsOf field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetAsOfOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AsOf) {
|
|
return nil, false
|
|
}
|
|
return o.AsOf, true
|
|
}
|
|
|
|
// HasAsOf returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasAsOf() bool {
|
|
if o != nil && !IsNil(o.AsOf) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAsOf gets a reference to the given string and assigns it to the AsOf field.
|
|
func (o *StandingObligation) SetAsOf(v string) {
|
|
o.AsOf = &v
|
|
}
|
|
|
|
// GetCode returns the Code field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetCode() string {
|
|
if o == nil || IsNil(o.Code) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Code
|
|
}
|
|
|
|
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetCodeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Code) {
|
|
return nil, false
|
|
}
|
|
return o.Code, true
|
|
}
|
|
|
|
// HasCode returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasCode() bool {
|
|
if o != nil && !IsNil(o.Code) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCode gets a reference to the given string and assigns it to the Code field.
|
|
func (o *StandingObligation) SetCode(v string) {
|
|
o.Code = &v
|
|
}
|
|
|
|
// GetEvery returns the Every field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetEvery() string {
|
|
if o == nil || IsNil(o.Every) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Every
|
|
}
|
|
|
|
// GetEveryOk returns a tuple with the Every field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetEveryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Every) {
|
|
return nil, false
|
|
}
|
|
return o.Every, true
|
|
}
|
|
|
|
// HasEvery returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasEvery() bool {
|
|
if o != nil && !IsNil(o.Every) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvery gets a reference to the given string and assigns it to the Every field.
|
|
func (o *StandingObligation) SetEvery(v string) {
|
|
o.Every = &v
|
|
}
|
|
|
|
// GetLabel returns the Label field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetLabel() string {
|
|
if o == nil || IsNil(o.Label) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Label
|
|
}
|
|
|
|
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetLabelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Label) {
|
|
return nil, false
|
|
}
|
|
return o.Label, true
|
|
}
|
|
|
|
// HasLabel returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasLabel() bool {
|
|
if o != nil && !IsNil(o.Label) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLabel gets a reference to the given string and assigns it to the Label field.
|
|
func (o *StandingObligation) SetLabel(v string) {
|
|
o.Label = &v
|
|
}
|
|
|
|
// GetMinimum returns the Minimum field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetMinimum() bool {
|
|
if o == nil || IsNil(o.Minimum) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Minimum
|
|
}
|
|
|
|
// GetMinimumOk returns a tuple with the Minimum field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetMinimumOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Minimum) {
|
|
return nil, false
|
|
}
|
|
return o.Minimum, true
|
|
}
|
|
|
|
// HasMinimum returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasMinimum() bool {
|
|
if o != nil && !IsNil(o.Minimum) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMinimum gets a reference to the given bool and assigns it to the Minimum field.
|
|
func (o *StandingObligation) SetMinimum(v bool) {
|
|
o.Minimum = &v
|
|
}
|
|
|
|
// GetPassThrough returns the PassThrough field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetPassThrough() bool {
|
|
if o == nil || IsNil(o.PassThrough) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.PassThrough
|
|
}
|
|
|
|
// GetPassThroughOk returns a tuple with the PassThrough field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetPassThroughOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.PassThrough) {
|
|
return nil, false
|
|
}
|
|
return o.PassThrough, true
|
|
}
|
|
|
|
// HasPassThrough returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasPassThrough() bool {
|
|
if o != nil && !IsNil(o.PassThrough) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPassThrough gets a reference to the given bool and assigns it to the PassThrough field.
|
|
func (o *StandingObligation) SetPassThrough(v bool) {
|
|
o.PassThrough = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *StandingObligation) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetStale returns the Stale field value if set, zero value otherwise.
|
|
func (o *StandingObligation) GetStale() bool {
|
|
if o == nil || IsNil(o.Stale) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Stale
|
|
}
|
|
|
|
// GetStaleOk returns a tuple with the Stale field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StandingObligation) GetStaleOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Stale) {
|
|
return nil, false
|
|
}
|
|
return o.Stale, true
|
|
}
|
|
|
|
// HasStale returns a boolean if a field has been set.
|
|
func (o *StandingObligation) HasStale() bool {
|
|
if o != nil && !IsNil(o.Stale) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStale gets a reference to the given bool and assigns it to the Stale field.
|
|
func (o *StandingObligation) SetStale(v bool) {
|
|
o.Stale = &v
|
|
}
|
|
|
|
func (o StandingObligation) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StandingObligation) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AmountCents) {
|
|
toSerialize["amountCents"] = o.AmountCents
|
|
}
|
|
if !IsNil(o.AsOf) {
|
|
toSerialize["asOf"] = o.AsOf
|
|
}
|
|
if !IsNil(o.Code) {
|
|
toSerialize["code"] = o.Code
|
|
}
|
|
if !IsNil(o.Every) {
|
|
toSerialize["every"] = o.Every
|
|
}
|
|
if !IsNil(o.Label) {
|
|
toSerialize["label"] = o.Label
|
|
}
|
|
if !IsNil(o.Minimum) {
|
|
toSerialize["minimum"] = o.Minimum
|
|
}
|
|
if !IsNil(o.PassThrough) {
|
|
toSerialize["passThrough"] = o.PassThrough
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Stale) {
|
|
toSerialize["stale"] = o.Stale
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StandingObligation) UnmarshalJSON(data []byte) (err error) {
|
|
varStandingObligation := _StandingObligation{}
|
|
|
|
err = json.Unmarshal(data, &varStandingObligation)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StandingObligation(varStandingObligation)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "amountCents")
|
|
delete(additionalProperties, "asOf")
|
|
delete(additionalProperties, "code")
|
|
delete(additionalProperties, "every")
|
|
delete(additionalProperties, "label")
|
|
delete(additionalProperties, "minimum")
|
|
delete(additionalProperties, "passThrough")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "stale")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStandingObligation struct {
|
|
value *StandingObligation
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStandingObligation) Get() *StandingObligation {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStandingObligation) Set(val *StandingObligation) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStandingObligation) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStandingObligation) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStandingObligation(val *StandingObligation) *NullableStandingObligation {
|
|
return &NullableStandingObligation{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStandingObligation) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStandingObligation) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|