mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.1 KiB
Go
193 lines
5.1 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 EsignEsignTrail type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EsignEsignTrail{}
|
|
|
|
// EsignEsignTrail struct for EsignEsignTrail
|
|
type EsignEsignTrail struct {
|
|
// DocumentID is the document the trail belongs to.
|
|
DocumentId *string `json:"documentId,omitempty"`
|
|
// Entries is every recorded event in order, oldest first. It is append-only: nothing in this surface edits or removes an entry.
|
|
Entries []EsignEsignEvent `json:"entries,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EsignEsignTrail EsignEsignTrail
|
|
|
|
// NewEsignEsignTrail instantiates a new EsignEsignTrail 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 NewEsignEsignTrail() *EsignEsignTrail {
|
|
this := EsignEsignTrail{}
|
|
return &this
|
|
}
|
|
|
|
// NewEsignEsignTrailWithDefaults instantiates a new EsignEsignTrail 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 NewEsignEsignTrailWithDefaults() *EsignEsignTrail {
|
|
this := EsignEsignTrail{}
|
|
return &this
|
|
}
|
|
|
|
// GetDocumentId returns the DocumentId field value if set, zero value otherwise.
|
|
func (o *EsignEsignTrail) GetDocumentId() string {
|
|
if o == nil || IsNil(o.DocumentId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DocumentId
|
|
}
|
|
|
|
// GetDocumentIdOk returns a tuple with the DocumentId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignTrail) GetDocumentIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DocumentId) {
|
|
return nil, false
|
|
}
|
|
return o.DocumentId, true
|
|
}
|
|
|
|
// HasDocumentId returns a boolean if a field has been set.
|
|
func (o *EsignEsignTrail) HasDocumentId() bool {
|
|
if o != nil && !IsNil(o.DocumentId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocumentId gets a reference to the given string and assigns it to the DocumentId field.
|
|
func (o *EsignEsignTrail) SetDocumentId(v string) {
|
|
o.DocumentId = &v
|
|
}
|
|
|
|
// GetEntries returns the Entries field value if set, zero value otherwise.
|
|
func (o *EsignEsignTrail) GetEntries() []EsignEsignEvent {
|
|
if o == nil || IsNil(o.Entries) {
|
|
var ret []EsignEsignEvent
|
|
return ret
|
|
}
|
|
return o.Entries
|
|
}
|
|
|
|
// GetEntriesOk returns a tuple with the Entries field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignTrail) GetEntriesOk() ([]EsignEsignEvent, bool) {
|
|
if o == nil || IsNil(o.Entries) {
|
|
return nil, false
|
|
}
|
|
return o.Entries, true
|
|
}
|
|
|
|
// HasEntries returns a boolean if a field has been set.
|
|
func (o *EsignEsignTrail) HasEntries() bool {
|
|
if o != nil && !IsNil(o.Entries) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEntries gets a reference to the given []EsignEsignEvent and assigns it to the Entries field.
|
|
func (o *EsignEsignTrail) SetEntries(v []EsignEsignEvent) {
|
|
o.Entries = v
|
|
}
|
|
|
|
func (o EsignEsignTrail) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EsignEsignTrail) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.DocumentId) {
|
|
toSerialize["documentId"] = o.DocumentId
|
|
}
|
|
if !IsNil(o.Entries) {
|
|
toSerialize["entries"] = o.Entries
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EsignEsignTrail) UnmarshalJSON(data []byte) (err error) {
|
|
varEsignEsignTrail := _EsignEsignTrail{}
|
|
|
|
err = json.Unmarshal(data, &varEsignEsignTrail)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EsignEsignTrail(varEsignEsignTrail)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "documentId")
|
|
delete(additionalProperties, "entries")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEsignEsignTrail struct {
|
|
value *EsignEsignTrail
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEsignEsignTrail) Get() *EsignEsignTrail {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEsignEsignTrail) Set(val *EsignEsignTrail) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEsignEsignTrail) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEsignEsignTrail) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEsignEsignTrail(val *EsignEsignTrail) *NullableEsignEsignTrail {
|
|
return &NullableEsignEsignTrail{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEsignEsignTrail) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEsignEsignTrail) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|