mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.0 KiB
Go
345 lines
9.0 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 BooksQuestion type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BooksQuestion{}
|
|
|
|
// BooksQuestion struct for BooksQuestion
|
|
type BooksQuestion struct {
|
|
// Account is the chart number the questioned entry posted to, where one applies.
|
|
Account *string `json:"account,omitempty"`
|
|
// Amount is the figure that makes the question concrete, already FORMATTED for display with its currency symbol — a string, not cents, and not for arithmetic.
|
|
Amount *string `json:"amount,omitempty"`
|
|
// ID is the source transaction the question is about, so answering it leads straight back to the entry that raised it.
|
|
Id *string `json:"id,omitempty"`
|
|
// Kind is what looked wrong: outlier (a charge far above the usual), reversal (a posting undone), roundoff (a balancing plug big enough to be worth explaining), uncosted (revenue booked with no cost matched to it), or overdrawn (a wallet spent past its balance).
|
|
Kind *string `json:"kind,omitempty"`
|
|
// PostedAt anchors the question in time — when the entry it concerns posted.
|
|
PostedAt *string `json:"postedAt,omitempty"`
|
|
// Text is the question itself, written for a founder to answer directly.
|
|
Text *string `json:"text,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BooksQuestion BooksQuestion
|
|
|
|
// NewBooksQuestion instantiates a new BooksQuestion 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 NewBooksQuestion() *BooksQuestion {
|
|
this := BooksQuestion{}
|
|
return &this
|
|
}
|
|
|
|
// NewBooksQuestionWithDefaults instantiates a new BooksQuestion 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 NewBooksQuestionWithDefaults() *BooksQuestion {
|
|
this := BooksQuestion{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *BooksQuestion) GetAccount() string {
|
|
if o == nil || IsNil(o.Account) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Account
|
|
}
|
|
|
|
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksQuestion) GetAccountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Account) {
|
|
return nil, false
|
|
}
|
|
return o.Account, true
|
|
}
|
|
|
|
// HasAccount returns a boolean if a field has been set.
|
|
func (o *BooksQuestion) HasAccount() bool {
|
|
if o != nil && !IsNil(o.Account) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAccount gets a reference to the given string and assigns it to the Account field.
|
|
func (o *BooksQuestion) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetAmount returns the Amount field value if set, zero value otherwise.
|
|
func (o *BooksQuestion) GetAmount() string {
|
|
if o == nil || IsNil(o.Amount) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Amount
|
|
}
|
|
|
|
// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksQuestion) GetAmountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Amount) {
|
|
return nil, false
|
|
}
|
|
return o.Amount, true
|
|
}
|
|
|
|
// HasAmount returns a boolean if a field has been set.
|
|
func (o *BooksQuestion) HasAmount() bool {
|
|
if o != nil && !IsNil(o.Amount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAmount gets a reference to the given string and assigns it to the Amount field.
|
|
func (o *BooksQuestion) SetAmount(v string) {
|
|
o.Amount = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *BooksQuestion) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksQuestion) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *BooksQuestion) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *BooksQuestion) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *BooksQuestion) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksQuestion) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *BooksQuestion) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *BooksQuestion) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetPostedAt returns the PostedAt field value if set, zero value otherwise.
|
|
func (o *BooksQuestion) GetPostedAt() string {
|
|
if o == nil || IsNil(o.PostedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PostedAt
|
|
}
|
|
|
|
// GetPostedAtOk returns a tuple with the PostedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksQuestion) GetPostedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PostedAt) {
|
|
return nil, false
|
|
}
|
|
return o.PostedAt, true
|
|
}
|
|
|
|
// HasPostedAt returns a boolean if a field has been set.
|
|
func (o *BooksQuestion) HasPostedAt() bool {
|
|
if o != nil && !IsNil(o.PostedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPostedAt gets a reference to the given string and assigns it to the PostedAt field.
|
|
func (o *BooksQuestion) SetPostedAt(v string) {
|
|
o.PostedAt = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *BooksQuestion) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksQuestion) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *BooksQuestion) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *BooksQuestion) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
func (o BooksQuestion) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BooksQuestion) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Account) {
|
|
toSerialize["account"] = o.Account
|
|
}
|
|
if !IsNil(o.Amount) {
|
|
toSerialize["amount"] = o.Amount
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.PostedAt) {
|
|
toSerialize["postedAt"] = o.PostedAt
|
|
}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BooksQuestion) UnmarshalJSON(data []byte) (err error) {
|
|
varBooksQuestion := _BooksQuestion{}
|
|
|
|
err = json.Unmarshal(data, &varBooksQuestion)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BooksQuestion(varBooksQuestion)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "account")
|
|
delete(additionalProperties, "amount")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "postedAt")
|
|
delete(additionalProperties, "text")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBooksQuestion struct {
|
|
value *BooksQuestion
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBooksQuestion) Get() *BooksQuestion {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBooksQuestion) Set(val *BooksQuestion) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBooksQuestion) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBooksQuestion) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBooksQuestion(val *BooksQuestion) *NullableBooksQuestion {
|
|
return &NullableBooksQuestion{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBooksQuestion) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBooksQuestion) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|