mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.1 KiB
Go
307 lines
8.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 EsignEsignLink type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EsignEsignLink{}
|
|
|
|
// EsignEsignLink struct for EsignEsignLink
|
|
type EsignEsignLink struct {
|
|
// Email is the address this link is meant for.
|
|
Email *string `json:"email,omitempty"`
|
|
// RecipientID is the recipient the link identifies.
|
|
RecipientId *string `json:"recipientId,omitempty"`
|
|
// Role is their role — only a SIGNER or an APPROVER gets a link, because only they are asked to act.
|
|
Role *string `json:"role,omitempty"`
|
|
// SigningPath is the tail of the address to send them, relative to wherever the signing page is served.
|
|
SigningPath *string `json:"signingPath,omitempty"`
|
|
// Token is the crypto-random signing capability. It is the entire credential, so treat it as a secret and give each one only to the recipient it names.
|
|
Token *string `json:"token,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EsignEsignLink EsignEsignLink
|
|
|
|
// NewEsignEsignLink instantiates a new EsignEsignLink 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 NewEsignEsignLink() *EsignEsignLink {
|
|
this := EsignEsignLink{}
|
|
return &this
|
|
}
|
|
|
|
// NewEsignEsignLinkWithDefaults instantiates a new EsignEsignLink 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 NewEsignEsignLinkWithDefaults() *EsignEsignLink {
|
|
this := EsignEsignLink{}
|
|
return &this
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *EsignEsignLink) GetEmail() string {
|
|
if o == nil || IsNil(o.Email) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Email
|
|
}
|
|
|
|
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignLink) GetEmailOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Email) {
|
|
return nil, false
|
|
}
|
|
return o.Email, true
|
|
}
|
|
|
|
// HasEmail returns a boolean if a field has been set.
|
|
func (o *EsignEsignLink) HasEmail() bool {
|
|
if o != nil && !IsNil(o.Email) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmail gets a reference to the given string and assigns it to the Email field.
|
|
func (o *EsignEsignLink) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetRecipientId returns the RecipientId field value if set, zero value otherwise.
|
|
func (o *EsignEsignLink) GetRecipientId() string {
|
|
if o == nil || IsNil(o.RecipientId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RecipientId
|
|
}
|
|
|
|
// GetRecipientIdOk returns a tuple with the RecipientId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignLink) GetRecipientIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RecipientId) {
|
|
return nil, false
|
|
}
|
|
return o.RecipientId, true
|
|
}
|
|
|
|
// HasRecipientId returns a boolean if a field has been set.
|
|
func (o *EsignEsignLink) HasRecipientId() bool {
|
|
if o != nil && !IsNil(o.RecipientId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecipientId gets a reference to the given string and assigns it to the RecipientId field.
|
|
func (o *EsignEsignLink) SetRecipientId(v string) {
|
|
o.RecipientId = &v
|
|
}
|
|
|
|
// GetRole returns the Role field value if set, zero value otherwise.
|
|
func (o *EsignEsignLink) GetRole() string {
|
|
if o == nil || IsNil(o.Role) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Role
|
|
}
|
|
|
|
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignLink) GetRoleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Role) {
|
|
return nil, false
|
|
}
|
|
return o.Role, true
|
|
}
|
|
|
|
// HasRole returns a boolean if a field has been set.
|
|
func (o *EsignEsignLink) HasRole() bool {
|
|
if o != nil && !IsNil(o.Role) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRole gets a reference to the given string and assigns it to the Role field.
|
|
func (o *EsignEsignLink) SetRole(v string) {
|
|
o.Role = &v
|
|
}
|
|
|
|
// GetSigningPath returns the SigningPath field value if set, zero value otherwise.
|
|
func (o *EsignEsignLink) GetSigningPath() string {
|
|
if o == nil || IsNil(o.SigningPath) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SigningPath
|
|
}
|
|
|
|
// GetSigningPathOk returns a tuple with the SigningPath field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignLink) GetSigningPathOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SigningPath) {
|
|
return nil, false
|
|
}
|
|
return o.SigningPath, true
|
|
}
|
|
|
|
// HasSigningPath returns a boolean if a field has been set.
|
|
func (o *EsignEsignLink) HasSigningPath() bool {
|
|
if o != nil && !IsNil(o.SigningPath) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSigningPath gets a reference to the given string and assigns it to the SigningPath field.
|
|
func (o *EsignEsignLink) SetSigningPath(v string) {
|
|
o.SigningPath = &v
|
|
}
|
|
|
|
// GetToken returns the Token field value if set, zero value otherwise.
|
|
func (o *EsignEsignLink) GetToken() string {
|
|
if o == nil || IsNil(o.Token) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Token
|
|
}
|
|
|
|
// GetTokenOk returns a tuple with the Token field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EsignEsignLink) GetTokenOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Token) {
|
|
return nil, false
|
|
}
|
|
return o.Token, true
|
|
}
|
|
|
|
// HasToken returns a boolean if a field has been set.
|
|
func (o *EsignEsignLink) HasToken() bool {
|
|
if o != nil && !IsNil(o.Token) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetToken gets a reference to the given string and assigns it to the Token field.
|
|
func (o *EsignEsignLink) SetToken(v string) {
|
|
o.Token = &v
|
|
}
|
|
|
|
func (o EsignEsignLink) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EsignEsignLink) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.RecipientId) {
|
|
toSerialize["recipientId"] = o.RecipientId
|
|
}
|
|
if !IsNil(o.Role) {
|
|
toSerialize["role"] = o.Role
|
|
}
|
|
if !IsNil(o.SigningPath) {
|
|
toSerialize["signingPath"] = o.SigningPath
|
|
}
|
|
if !IsNil(o.Token) {
|
|
toSerialize["token"] = o.Token
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EsignEsignLink) UnmarshalJSON(data []byte) (err error) {
|
|
varEsignEsignLink := _EsignEsignLink{}
|
|
|
|
err = json.Unmarshal(data, &varEsignEsignLink)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EsignEsignLink(varEsignEsignLink)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "recipientId")
|
|
delete(additionalProperties, "role")
|
|
delete(additionalProperties, "signingPath")
|
|
delete(additionalProperties, "token")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEsignEsignLink struct {
|
|
value *EsignEsignLink
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEsignEsignLink) Get() *EsignEsignLink {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEsignEsignLink) Set(val *EsignEsignLink) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEsignEsignLink) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEsignEsignLink) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEsignEsignLink(val *EsignEsignLink) *NullableEsignEsignLink {
|
|
return &NullableEsignEsignLink{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEsignEsignLink) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEsignEsignLink) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|