Files
sdk/model_billing_invoice_ref.go

193 lines
5.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 BillingInvoiceRef type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BillingInvoiceRef{}
// BillingInvoiceRef struct for BillingInvoiceRef
type BillingInvoiceRef struct {
// Brand is the brand that bills (hanzo, lux, zoo, pars), whose mark and address a rendered invoice carries. The edge sets it from the caller's issuer; empty is Hanzo.
Brand *string `json:"brand,omitempty"`
// ID is the invoice id.
Id *string `json:"id,omitempty"`
AdditionalProperties map[string]interface{}
}
type _BillingInvoiceRef BillingInvoiceRef
// NewBillingInvoiceRef instantiates a new BillingInvoiceRef 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 NewBillingInvoiceRef() *BillingInvoiceRef {
this := BillingInvoiceRef{}
return &this
}
// NewBillingInvoiceRefWithDefaults instantiates a new BillingInvoiceRef 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 NewBillingInvoiceRefWithDefaults() *BillingInvoiceRef {
this := BillingInvoiceRef{}
return &this
}
// GetBrand returns the Brand field value if set, zero value otherwise.
func (o *BillingInvoiceRef) GetBrand() string {
if o == nil || IsNil(o.Brand) {
var ret string
return ret
}
return *o.Brand
}
// GetBrandOk returns a tuple with the Brand field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingInvoiceRef) GetBrandOk() (*string, bool) {
if o == nil || IsNil(o.Brand) {
return nil, false
}
return o.Brand, true
}
// HasBrand returns a boolean if a field has been set.
func (o *BillingInvoiceRef) HasBrand() bool {
if o != nil && !IsNil(o.Brand) {
return true
}
return false
}
// SetBrand gets a reference to the given string and assigns it to the Brand field.
func (o *BillingInvoiceRef) SetBrand(v string) {
o.Brand = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *BillingInvoiceRef) 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 *BillingInvoiceRef) 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 *BillingInvoiceRef) 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 *BillingInvoiceRef) SetId(v string) {
o.Id = &v
}
func (o BillingInvoiceRef) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BillingInvoiceRef) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Brand) {
toSerialize["brand"] = o.Brand
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *BillingInvoiceRef) UnmarshalJSON(data []byte) (err error) {
varBillingInvoiceRef := _BillingInvoiceRef{}
err = json.Unmarshal(data, &varBillingInvoiceRef)
if err != nil {
return err
}
*o = BillingInvoiceRef(varBillingInvoiceRef)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "brand")
delete(additionalProperties, "id")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBillingInvoiceRef struct {
value *BillingInvoiceRef
isSet bool
}
func (v NullableBillingInvoiceRef) Get() *BillingInvoiceRef {
return v.value
}
func (v *NullableBillingInvoiceRef) Set(val *BillingInvoiceRef) {
v.value = val
v.isSet = true
}
func (v NullableBillingInvoiceRef) IsSet() bool {
return v.isSet
}
func (v *NullableBillingInvoiceRef) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBillingInvoiceRef(val *BillingInvoiceRef) *NullableBillingInvoiceRef {
return &NullableBillingInvoiceRef{value: val, isSet: true}
}
func (v NullableBillingInvoiceRef) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBillingInvoiceRef) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}