mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.4 KiB
Go
269 lines
7.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 EsignEsignSession type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EsignEsignSession{}
|
|
|
|
// EsignEsignSession struct for EsignEsignSession
|
|
type EsignEsignSession struct {
|
|
// Document is what is being signed.
|
|
Document *EsignEsignState `json:"document,omitempty"`
|
|
// Fields is only the fields this recipient must fill — never another party's, so the layout a signer sees cannot reveal what anyone else was asked for.
|
|
Fields []EsignEsignField `json:"fields,omitempty"`
|
|
// PdfBase64 is the PDF to display, base64-encoded. Null when the document's stored bytes are missing.
|
|
PdfBase64 *string `json:"pdfBase64,omitempty"`
|
|
// Recipient is who the token says you are.
|
|
Recipient *EsignEsignSigner `json:"recipient,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EsignEsignSession EsignEsignSession
|
|
|
|
// NewEsignEsignSession instantiates a new EsignEsignSession 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 NewEsignEsignSession() *EsignEsignSession {
|
|
this := EsignEsignSession{}
|
|
return &this
|
|
}
|
|
|
|
// NewEsignEsignSessionWithDefaults instantiates a new EsignEsignSession 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 NewEsignEsignSessionWithDefaults() *EsignEsignSession {
|
|
this := EsignEsignSession{}
|
|
return &this
|
|
}
|
|
|
|
// GetDocument returns the Document field value if set, zero value otherwise.
|
|
func (o *EsignEsignSession) GetDocument() EsignEsignState {
|
|
if o == nil || IsNil(o.Document) {
|
|
var ret EsignEsignState
|
|
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 *EsignEsignSession) GetDocumentOk() (*EsignEsignState, 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 *EsignEsignSession) HasDocument() bool {
|
|
if o != nil && !IsNil(o.Document) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocument gets a reference to the given EsignEsignState and assigns it to the Document field.
|
|
func (o *EsignEsignSession) SetDocument(v EsignEsignState) {
|
|
o.Document = &v
|
|
}
|
|
|
|
// GetFields returns the Fields field value if set, zero value otherwise.
|
|
func (o *EsignEsignSession) GetFields() []EsignEsignField {
|
|
if o == nil || IsNil(o.Fields) {
|
|
var ret []EsignEsignField
|
|
return ret
|
|
}
|
|
return o.Fields
|
|
}
|
|
|
|
// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignSession) GetFieldsOk() ([]EsignEsignField, bool) {
|
|
if o == nil || IsNil(o.Fields) {
|
|
return nil, false
|
|
}
|
|
return o.Fields, true
|
|
}
|
|
|
|
// HasFields returns a boolean if a field has been set.
|
|
func (o *EsignEsignSession) HasFields() bool {
|
|
if o != nil && !IsNil(o.Fields) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFields gets a reference to the given []EsignEsignField and assigns it to the Fields field.
|
|
func (o *EsignEsignSession) SetFields(v []EsignEsignField) {
|
|
o.Fields = v
|
|
}
|
|
|
|
// GetPdfBase64 returns the PdfBase64 field value if set, zero value otherwise.
|
|
func (o *EsignEsignSession) GetPdfBase64() string {
|
|
if o == nil || IsNil(o.PdfBase64) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PdfBase64
|
|
}
|
|
|
|
// GetPdfBase64Ok returns a tuple with the PdfBase64 field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignSession) GetPdfBase64Ok() (*string, bool) {
|
|
if o == nil || IsNil(o.PdfBase64) {
|
|
return nil, false
|
|
}
|
|
return o.PdfBase64, true
|
|
}
|
|
|
|
// HasPdfBase64 returns a boolean if a field has been set.
|
|
func (o *EsignEsignSession) HasPdfBase64() bool {
|
|
if o != nil && !IsNil(o.PdfBase64) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPdfBase64 gets a reference to the given string and assigns it to the PdfBase64 field.
|
|
func (o *EsignEsignSession) SetPdfBase64(v string) {
|
|
o.PdfBase64 = &v
|
|
}
|
|
|
|
// GetRecipient returns the Recipient field value if set, zero value otherwise.
|
|
func (o *EsignEsignSession) GetRecipient() EsignEsignSigner {
|
|
if o == nil || IsNil(o.Recipient) {
|
|
var ret EsignEsignSigner
|
|
return ret
|
|
}
|
|
return *o.Recipient
|
|
}
|
|
|
|
// GetRecipientOk returns a tuple with the Recipient field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignSession) GetRecipientOk() (*EsignEsignSigner, bool) {
|
|
if o == nil || IsNil(o.Recipient) {
|
|
return nil, false
|
|
}
|
|
return o.Recipient, true
|
|
}
|
|
|
|
// HasRecipient returns a boolean if a field has been set.
|
|
func (o *EsignEsignSession) HasRecipient() bool {
|
|
if o != nil && !IsNil(o.Recipient) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecipient gets a reference to the given EsignEsignSigner and assigns it to the Recipient field.
|
|
func (o *EsignEsignSession) SetRecipient(v EsignEsignSigner) {
|
|
o.Recipient = &v
|
|
}
|
|
|
|
func (o EsignEsignSession) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EsignEsignSession) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Document) {
|
|
toSerialize["document"] = o.Document
|
|
}
|
|
if !IsNil(o.Fields) {
|
|
toSerialize["fields"] = o.Fields
|
|
}
|
|
if !IsNil(o.PdfBase64) {
|
|
toSerialize["pdfBase64"] = o.PdfBase64
|
|
}
|
|
if !IsNil(o.Recipient) {
|
|
toSerialize["recipient"] = o.Recipient
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EsignEsignSession) UnmarshalJSON(data []byte) (err error) {
|
|
varEsignEsignSession := _EsignEsignSession{}
|
|
|
|
err = json.Unmarshal(data, &varEsignEsignSession)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EsignEsignSession(varEsignEsignSession)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "document")
|
|
delete(additionalProperties, "fields")
|
|
delete(additionalProperties, "pdfBase64")
|
|
delete(additionalProperties, "recipient")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEsignEsignSession struct {
|
|
value *EsignEsignSession
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEsignEsignSession) Get() *EsignEsignSession {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEsignEsignSession) Set(val *EsignEsignSession) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEsignEsignSession) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEsignEsignSession) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEsignEsignSession(val *EsignEsignSession) *NullableEsignEsignSession {
|
|
return &NullableEsignEsignSession{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEsignEsignSession) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEsignEsignSession) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|