Files
sdk/model_patent_disclosure_batch.go

155 lines
4.4 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 PatentDisclosureBatch type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PatentDisclosureBatch{}
// PatentDisclosureBatch struct for PatentDisclosureBatch
type PatentDisclosureBatch struct {
// Disclosures are the documents to append, at most 2000.
Disclosures []PatentPatentDisclosure `json:"disclosures,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PatentDisclosureBatch PatentDisclosureBatch
// NewPatentDisclosureBatch instantiates a new PatentDisclosureBatch 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 NewPatentDisclosureBatch() *PatentDisclosureBatch {
this := PatentDisclosureBatch{}
return &this
}
// NewPatentDisclosureBatchWithDefaults instantiates a new PatentDisclosureBatch 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 NewPatentDisclosureBatchWithDefaults() *PatentDisclosureBatch {
this := PatentDisclosureBatch{}
return &this
}
// GetDisclosures returns the Disclosures field value if set, zero value otherwise.
func (o *PatentDisclosureBatch) GetDisclosures() []PatentPatentDisclosure {
if o == nil || IsNil(o.Disclosures) {
var ret []PatentPatentDisclosure
return ret
}
return o.Disclosures
}
// GetDisclosuresOk returns a tuple with the Disclosures field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PatentDisclosureBatch) GetDisclosuresOk() ([]PatentPatentDisclosure, bool) {
if o == nil || IsNil(o.Disclosures) {
return nil, false
}
return o.Disclosures, true
}
// HasDisclosures returns a boolean if a field has been set.
func (o *PatentDisclosureBatch) HasDisclosures() bool {
if o != nil && !IsNil(o.Disclosures) {
return true
}
return false
}
// SetDisclosures gets a reference to the given []PatentPatentDisclosure and assigns it to the Disclosures field.
func (o *PatentDisclosureBatch) SetDisclosures(v []PatentPatentDisclosure) {
o.Disclosures = v
}
func (o PatentDisclosureBatch) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PatentDisclosureBatch) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Disclosures) {
toSerialize["disclosures"] = o.Disclosures
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PatentDisclosureBatch) UnmarshalJSON(data []byte) (err error) {
varPatentDisclosureBatch := _PatentDisclosureBatch{}
err = json.Unmarshal(data, &varPatentDisclosureBatch)
if err != nil {
return err
}
*o = PatentDisclosureBatch(varPatentDisclosureBatch)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "disclosures")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePatentDisclosureBatch struct {
value *PatentDisclosureBatch
isSet bool
}
func (v NullablePatentDisclosureBatch) Get() *PatentDisclosureBatch {
return v.value
}
func (v *NullablePatentDisclosureBatch) Set(val *PatentDisclosureBatch) {
v.value = val
v.isSet = true
}
func (v NullablePatentDisclosureBatch) IsSet() bool {
return v.isSet
}
func (v *NullablePatentDisclosureBatch) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePatentDisclosureBatch(val *PatentDisclosureBatch) *NullablePatentDisclosureBatch {
return &NullablePatentDisclosureBatch{value: val, isSet: true}
}
func (v NullablePatentDisclosureBatch) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePatentDisclosureBatch) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}