Files
sdk/model_inbox_item.go

413 lines
10 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 InboxItem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &InboxItem{}
// InboxItem struct for InboxItem
type InboxItem struct {
Category *string `json:"category,omitempty"`
Confidence *string `json:"confidence,omitempty"`
CreatedAt *string `json:"createdAt,omitempty"`
Extracted *Extracted `json:"extracted,omitempty"`
Filename *string `json:"filename,omitempty"`
Id *string `json:"id,omitempty"`
Status *string `json:"status,omitempty"`
Vendor *string `json:"vendor,omitempty"`
AdditionalProperties map[string]interface{}
}
type _InboxItem InboxItem
// NewInboxItem instantiates a new InboxItem 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 NewInboxItem() *InboxItem {
this := InboxItem{}
return &this
}
// NewInboxItemWithDefaults instantiates a new InboxItem 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 NewInboxItemWithDefaults() *InboxItem {
this := InboxItem{}
return &this
}
// GetCategory returns the Category field value if set, zero value otherwise.
func (o *InboxItem) GetCategory() string {
if o == nil || IsNil(o.Category) {
var ret string
return ret
}
return *o.Category
}
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InboxItem) GetCategoryOk() (*string, bool) {
if o == nil || IsNil(o.Category) {
return nil, false
}
return o.Category, true
}
// HasCategory returns a boolean if a field has been set.
func (o *InboxItem) HasCategory() bool {
if o != nil && !IsNil(o.Category) {
return true
}
return false
}
// SetCategory gets a reference to the given string and assigns it to the Category field.
func (o *InboxItem) SetCategory(v string) {
o.Category = &v
}
// GetConfidence returns the Confidence field value if set, zero value otherwise.
func (o *InboxItem) GetConfidence() string {
if o == nil || IsNil(o.Confidence) {
var ret string
return ret
}
return *o.Confidence
}
// GetConfidenceOk returns a tuple with the Confidence field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InboxItem) GetConfidenceOk() (*string, bool) {
if o == nil || IsNil(o.Confidence) {
return nil, false
}
return o.Confidence, true
}
// HasConfidence returns a boolean if a field has been set.
func (o *InboxItem) HasConfidence() bool {
if o != nil && !IsNil(o.Confidence) {
return true
}
return false
}
// SetConfidence gets a reference to the given string and assigns it to the Confidence field.
func (o *InboxItem) SetConfidence(v string) {
o.Confidence = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *InboxItem) GetCreatedAt() string {
if o == nil || IsNil(o.CreatedAt) {
var ret string
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InboxItem) GetCreatedAtOk() (*string, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *InboxItem) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *InboxItem) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetExtracted returns the Extracted field value if set, zero value otherwise.
func (o *InboxItem) GetExtracted() Extracted {
if o == nil || IsNil(o.Extracted) {
var ret Extracted
return ret
}
return *o.Extracted
}
// GetExtractedOk returns a tuple with the Extracted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InboxItem) GetExtractedOk() (*Extracted, bool) {
if o == nil || IsNil(o.Extracted) {
return nil, false
}
return o.Extracted, true
}
// HasExtracted returns a boolean if a field has been set.
func (o *InboxItem) HasExtracted() bool {
if o != nil && !IsNil(o.Extracted) {
return true
}
return false
}
// SetExtracted gets a reference to the given Extracted and assigns it to the Extracted field.
func (o *InboxItem) SetExtracted(v Extracted) {
o.Extracted = &v
}
// GetFilename returns the Filename field value if set, zero value otherwise.
func (o *InboxItem) GetFilename() string {
if o == nil || IsNil(o.Filename) {
var ret string
return ret
}
return *o.Filename
}
// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InboxItem) GetFilenameOk() (*string, bool) {
if o == nil || IsNil(o.Filename) {
return nil, false
}
return o.Filename, true
}
// HasFilename returns a boolean if a field has been set.
func (o *InboxItem) HasFilename() bool {
if o != nil && !IsNil(o.Filename) {
return true
}
return false
}
// SetFilename gets a reference to the given string and assigns it to the Filename field.
func (o *InboxItem) SetFilename(v string) {
o.Filename = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *InboxItem) 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 *InboxItem) 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 *InboxItem) 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 *InboxItem) SetId(v string) {
o.Id = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *InboxItem) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InboxItem) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *InboxItem) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *InboxItem) SetStatus(v string) {
o.Status = &v
}
// GetVendor returns the Vendor field value if set, zero value otherwise.
func (o *InboxItem) GetVendor() string {
if o == nil || IsNil(o.Vendor) {
var ret string
return ret
}
return *o.Vendor
}
// GetVendorOk returns a tuple with the Vendor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InboxItem) GetVendorOk() (*string, bool) {
if o == nil || IsNil(o.Vendor) {
return nil, false
}
return o.Vendor, true
}
// HasVendor returns a boolean if a field has been set.
func (o *InboxItem) HasVendor() bool {
if o != nil && !IsNil(o.Vendor) {
return true
}
return false
}
// SetVendor gets a reference to the given string and assigns it to the Vendor field.
func (o *InboxItem) SetVendor(v string) {
o.Vendor = &v
}
func (o InboxItem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o InboxItem) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Category) {
toSerialize["category"] = o.Category
}
if !IsNil(o.Confidence) {
toSerialize["confidence"] = o.Confidence
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Extracted) {
toSerialize["extracted"] = o.Extracted
}
if !IsNil(o.Filename) {
toSerialize["filename"] = o.Filename
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Vendor) {
toSerialize["vendor"] = o.Vendor
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *InboxItem) UnmarshalJSON(data []byte) (err error) {
varInboxItem := _InboxItem{}
err = json.Unmarshal(data, &varInboxItem)
if err != nil {
return err
}
*o = InboxItem(varInboxItem)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "category")
delete(additionalProperties, "confidence")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "extracted")
delete(additionalProperties, "filename")
delete(additionalProperties, "id")
delete(additionalProperties, "status")
delete(additionalProperties, "vendor")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableInboxItem struct {
value *InboxItem
isSet bool
}
func (v NullableInboxItem) Get() *InboxItem {
return v.value
}
func (v *NullableInboxItem) Set(val *InboxItem) {
v.value = val
v.isSet = true
}
func (v NullableInboxItem) IsSet() bool {
return v.isSet
}
func (v *NullableInboxItem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInboxItem(val *InboxItem) *NullableInboxItem {
return &NullableInboxItem{value: val, isSet: true}
}
func (v NullableInboxItem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInboxItem) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}