Files
sdk/model_framework_summary_view.go

193 lines
5.2 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 FrameworkSummaryView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FrameworkSummaryView{}
// FrameworkSummaryView struct for FrameworkSummaryView
type FrameworkSummaryView struct {
// DocTypes is how many DocTypes the org has defined.
Doctypes *int64 `json:"doctypes,omitempty"`
// Documents is how many documents exist across them.
Documents *int64 `json:"documents,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FrameworkSummaryView FrameworkSummaryView
// NewFrameworkSummaryView instantiates a new FrameworkSummaryView 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 NewFrameworkSummaryView() *FrameworkSummaryView {
this := FrameworkSummaryView{}
return &this
}
// NewFrameworkSummaryViewWithDefaults instantiates a new FrameworkSummaryView 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 NewFrameworkSummaryViewWithDefaults() *FrameworkSummaryView {
this := FrameworkSummaryView{}
return &this
}
// GetDoctypes returns the Doctypes field value if set, zero value otherwise.
func (o *FrameworkSummaryView) GetDoctypes() int64 {
if o == nil || IsNil(o.Doctypes) {
var ret int64
return ret
}
return *o.Doctypes
}
// GetDoctypesOk returns a tuple with the Doctypes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FrameworkSummaryView) GetDoctypesOk() (*int64, bool) {
if o == nil || IsNil(o.Doctypes) {
return nil, false
}
return o.Doctypes, true
}
// HasDoctypes returns a boolean if a field has been set.
func (o *FrameworkSummaryView) HasDoctypes() bool {
if o != nil && !IsNil(o.Doctypes) {
return true
}
return false
}
// SetDoctypes gets a reference to the given int64 and assigns it to the Doctypes field.
func (o *FrameworkSummaryView) SetDoctypes(v int64) {
o.Doctypes = &v
}
// GetDocuments returns the Documents field value if set, zero value otherwise.
func (o *FrameworkSummaryView) GetDocuments() int64 {
if o == nil || IsNil(o.Documents) {
var ret int64
return ret
}
return *o.Documents
}
// GetDocumentsOk returns a tuple with the Documents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FrameworkSummaryView) GetDocumentsOk() (*int64, bool) {
if o == nil || IsNil(o.Documents) {
return nil, false
}
return o.Documents, true
}
// HasDocuments returns a boolean if a field has been set.
func (o *FrameworkSummaryView) HasDocuments() bool {
if o != nil && !IsNil(o.Documents) {
return true
}
return false
}
// SetDocuments gets a reference to the given int64 and assigns it to the Documents field.
func (o *FrameworkSummaryView) SetDocuments(v int64) {
o.Documents = &v
}
func (o FrameworkSummaryView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FrameworkSummaryView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Doctypes) {
toSerialize["doctypes"] = o.Doctypes
}
if !IsNil(o.Documents) {
toSerialize["documents"] = o.Documents
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FrameworkSummaryView) UnmarshalJSON(data []byte) (err error) {
varFrameworkSummaryView := _FrameworkSummaryView{}
err = json.Unmarshal(data, &varFrameworkSummaryView)
if err != nil {
return err
}
*o = FrameworkSummaryView(varFrameworkSummaryView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "doctypes")
delete(additionalProperties, "documents")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFrameworkSummaryView struct {
value *FrameworkSummaryView
isSet bool
}
func (v NullableFrameworkSummaryView) Get() *FrameworkSummaryView {
return v.value
}
func (v *NullableFrameworkSummaryView) Set(val *FrameworkSummaryView) {
v.value = val
v.isSet = true
}
func (v NullableFrameworkSummaryView) IsSet() bool {
return v.isSet
}
func (v *NullableFrameworkSummaryView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFrameworkSummaryView(val *FrameworkSummaryView) *NullableFrameworkSummaryView {
return &NullableFrameworkSummaryView{value: val, isSet: true}
}
func (v NullableFrameworkSummaryView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFrameworkSummaryView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}