Files
sdk/model_legal_document_reply.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 LegalDocumentReply type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LegalDocumentReply{}
// LegalDocumentReply struct for LegalDocumentReply
type LegalDocumentReply struct {
// Disclaimer is the boundary made visible on the wire.
Disclaimer *string `json:"disclaimer,omitempty"`
// Document is the document, rendered content included.
Document *LegalDocumentView `json:"document,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LegalDocumentReply LegalDocumentReply
// NewLegalDocumentReply instantiates a new LegalDocumentReply 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 NewLegalDocumentReply() *LegalDocumentReply {
this := LegalDocumentReply{}
return &this
}
// NewLegalDocumentReplyWithDefaults instantiates a new LegalDocumentReply 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 NewLegalDocumentReplyWithDefaults() *LegalDocumentReply {
this := LegalDocumentReply{}
return &this
}
// GetDisclaimer returns the Disclaimer field value if set, zero value otherwise.
func (o *LegalDocumentReply) GetDisclaimer() string {
if o == nil || IsNil(o.Disclaimer) {
var ret string
return ret
}
return *o.Disclaimer
}
// GetDisclaimerOk returns a tuple with the Disclaimer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LegalDocumentReply) GetDisclaimerOk() (*string, bool) {
if o == nil || IsNil(o.Disclaimer) {
return nil, false
}
return o.Disclaimer, true
}
// HasDisclaimer returns a boolean if a field has been set.
func (o *LegalDocumentReply) HasDisclaimer() bool {
if o != nil && !IsNil(o.Disclaimer) {
return true
}
return false
}
// SetDisclaimer gets a reference to the given string and assigns it to the Disclaimer field.
func (o *LegalDocumentReply) SetDisclaimer(v string) {
o.Disclaimer = &v
}
// GetDocument returns the Document field value if set, zero value otherwise.
func (o *LegalDocumentReply) GetDocument() LegalDocumentView {
if o == nil || IsNil(o.Document) {
var ret LegalDocumentView
return ret
}
return *o.Document
}
// GetDocumentOk returns a tuple with the Document field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LegalDocumentReply) GetDocumentOk() (*LegalDocumentView, bool) {
if o == nil || IsNil(o.Document) {
return nil, false
}
return o.Document, true
}
// HasDocument returns a boolean if a field has been set.
func (o *LegalDocumentReply) HasDocument() bool {
if o != nil && !IsNil(o.Document) {
return true
}
return false
}
// SetDocument gets a reference to the given LegalDocumentView and assigns it to the Document field.
func (o *LegalDocumentReply) SetDocument(v LegalDocumentView) {
o.Document = &v
}
func (o LegalDocumentReply) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LegalDocumentReply) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Disclaimer) {
toSerialize["disclaimer"] = o.Disclaimer
}
if !IsNil(o.Document) {
toSerialize["document"] = o.Document
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LegalDocumentReply) UnmarshalJSON(data []byte) (err error) {
varLegalDocumentReply := _LegalDocumentReply{}
err = json.Unmarshal(data, &varLegalDocumentReply)
if err != nil {
return err
}
*o = LegalDocumentReply(varLegalDocumentReply)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "disclaimer")
delete(additionalProperties, "document")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLegalDocumentReply struct {
value *LegalDocumentReply
isSet bool
}
func (v NullableLegalDocumentReply) Get() *LegalDocumentReply {
return v.value
}
func (v *NullableLegalDocumentReply) Set(val *LegalDocumentReply) {
v.value = val
v.isSet = true
}
func (v NullableLegalDocumentReply) IsSet() bool {
return v.isSet
}
func (v *NullableLegalDocumentReply) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLegalDocumentReply(val *LegalDocumentReply) *NullableLegalDocumentReply {
return &NullableLegalDocumentReply{value: val, isSet: true}
}
func (v NullableLegalDocumentReply) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLegalDocumentReply) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}