mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.0 KiB
Go
307 lines
8.0 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 EsignEsignPDF type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EsignEsignPDF{}
|
|
|
|
// EsignEsignPDF struct for EsignEsignPDF
|
|
type EsignEsignPDF struct {
|
|
// Filename is the name to save it under, built from the title and marked _signed once it is sealed.
|
|
Filename *string `json:"filename,omitempty"`
|
|
// ID is the document this PDF was rendered from.
|
|
Id *string `json:"id,omitempty"`
|
|
// PdfBase64 is the PDF itself, base64-encoded. There is one field either way, so Sealed is what tells you which artifact you are holding.
|
|
PdfBase64 *string `json:"pdfBase64,omitempty"`
|
|
// Sealed is whether this is the SEALED artifact — the field values rendered onto the page and a real x509 PKCS#7 signature applied — rather than the original upload.
|
|
Sealed *bool `json:"sealed,omitempty"`
|
|
// Status is the document's state at the moment it was read.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EsignEsignPDF EsignEsignPDF
|
|
|
|
// NewEsignEsignPDF instantiates a new EsignEsignPDF 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 NewEsignEsignPDF() *EsignEsignPDF {
|
|
this := EsignEsignPDF{}
|
|
return &this
|
|
}
|
|
|
|
// NewEsignEsignPDFWithDefaults instantiates a new EsignEsignPDF 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 NewEsignEsignPDFWithDefaults() *EsignEsignPDF {
|
|
this := EsignEsignPDF{}
|
|
return &this
|
|
}
|
|
|
|
// GetFilename returns the Filename field value if set, zero value otherwise.
|
|
func (o *EsignEsignPDF) GetFilename() string {
|
|
if o == nil || IsNil(o.Filename) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Filename
|
|
}
|
|
|
|
// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignPDF) GetFilenameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Filename) {
|
|
return nil, false
|
|
}
|
|
return o.Filename, true
|
|
}
|
|
|
|
// HasFilename returns a boolean if a field has been set.
|
|
func (o *EsignEsignPDF) HasFilename() bool {
|
|
if o != nil && !IsNil(o.Filename) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFilename gets a reference to the given string and assigns it to the Filename field.
|
|
func (o *EsignEsignPDF) SetFilename(v string) {
|
|
o.Filename = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *EsignEsignPDF) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignPDF) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *EsignEsignPDF) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *EsignEsignPDF) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetPdfBase64 returns the PdfBase64 field value if set, zero value otherwise.
|
|
func (o *EsignEsignPDF) 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 *EsignEsignPDF) 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 *EsignEsignPDF) 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 *EsignEsignPDF) SetPdfBase64(v string) {
|
|
o.PdfBase64 = &v
|
|
}
|
|
|
|
// GetSealed returns the Sealed field value if set, zero value otherwise.
|
|
func (o *EsignEsignPDF) GetSealed() bool {
|
|
if o == nil || IsNil(o.Sealed) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Sealed
|
|
}
|
|
|
|
// GetSealedOk returns a tuple with the Sealed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignPDF) GetSealedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Sealed) {
|
|
return nil, false
|
|
}
|
|
return o.Sealed, true
|
|
}
|
|
|
|
// HasSealed returns a boolean if a field has been set.
|
|
func (o *EsignEsignPDF) HasSealed() bool {
|
|
if o != nil && !IsNil(o.Sealed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSealed gets a reference to the given bool and assigns it to the Sealed field.
|
|
func (o *EsignEsignPDF) SetSealed(v bool) {
|
|
o.Sealed = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *EsignEsignPDF) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignPDF) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *EsignEsignPDF) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *EsignEsignPDF) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o EsignEsignPDF) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EsignEsignPDF) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Filename) {
|
|
toSerialize["filename"] = o.Filename
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.PdfBase64) {
|
|
toSerialize["pdfBase64"] = o.PdfBase64
|
|
}
|
|
if !IsNil(o.Sealed) {
|
|
toSerialize["sealed"] = o.Sealed
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EsignEsignPDF) UnmarshalJSON(data []byte) (err error) {
|
|
varEsignEsignPDF := _EsignEsignPDF{}
|
|
|
|
err = json.Unmarshal(data, &varEsignEsignPDF)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EsignEsignPDF(varEsignEsignPDF)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "filename")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "pdfBase64")
|
|
delete(additionalProperties, "sealed")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEsignEsignPDF struct {
|
|
value *EsignEsignPDF
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEsignEsignPDF) Get() *EsignEsignPDF {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEsignEsignPDF) Set(val *EsignEsignPDF) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEsignEsignPDF) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEsignEsignPDF) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEsignEsignPDF(val *EsignEsignPDF) *NullableEsignEsignPDF {
|
|
return &NullableEsignEsignPDF{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEsignEsignPDF) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEsignEsignPDF) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|