Files
sdk/model_patent_impl_batch.go

155 lines
4.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 PatentImplBatch type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PatentImplBatch{}
// PatentImplBatch struct for PatentImplBatch
type PatentImplBatch struct {
// Implementations are the records to append, at most 2000.
Implementations []PatentPatentImplementation `json:"implementations,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PatentImplBatch PatentImplBatch
// NewPatentImplBatch instantiates a new PatentImplBatch 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 NewPatentImplBatch() *PatentImplBatch {
this := PatentImplBatch{}
return &this
}
// NewPatentImplBatchWithDefaults instantiates a new PatentImplBatch 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 NewPatentImplBatchWithDefaults() *PatentImplBatch {
this := PatentImplBatch{}
return &this
}
// GetImplementations returns the Implementations field value if set, zero value otherwise.
func (o *PatentImplBatch) GetImplementations() []PatentPatentImplementation {
if o == nil || IsNil(o.Implementations) {
var ret []PatentPatentImplementation
return ret
}
return o.Implementations
}
// GetImplementationsOk returns a tuple with the Implementations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PatentImplBatch) GetImplementationsOk() ([]PatentPatentImplementation, bool) {
if o == nil || IsNil(o.Implementations) {
return nil, false
}
return o.Implementations, true
}
// HasImplementations returns a boolean if a field has been set.
func (o *PatentImplBatch) HasImplementations() bool {
if o != nil && !IsNil(o.Implementations) {
return true
}
return false
}
// SetImplementations gets a reference to the given []PatentPatentImplementation and assigns it to the Implementations field.
func (o *PatentImplBatch) SetImplementations(v []PatentPatentImplementation) {
o.Implementations = v
}
func (o PatentImplBatch) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PatentImplBatch) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Implementations) {
toSerialize["implementations"] = o.Implementations
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PatentImplBatch) UnmarshalJSON(data []byte) (err error) {
varPatentImplBatch := _PatentImplBatch{}
err = json.Unmarshal(data, &varPatentImplBatch)
if err != nil {
return err
}
*o = PatentImplBatch(varPatentImplBatch)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "implementations")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePatentImplBatch struct {
value *PatentImplBatch
isSet bool
}
func (v NullablePatentImplBatch) Get() *PatentImplBatch {
return v.value
}
func (v *NullablePatentImplBatch) Set(val *PatentImplBatch) {
v.value = val
v.isSet = true
}
func (v NullablePatentImplBatch) IsSet() bool {
return v.isSet
}
func (v *NullablePatentImplBatch) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePatentImplBatch(val *PatentImplBatch) *NullablePatentImplBatch {
return &NullablePatentImplBatch{value: val, isSet: true}
}
func (v NullablePatentImplBatch) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePatentImplBatch) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}