Files
sdk/model_esign_esign_invite.go

307 lines
7.9 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 EsignEsignInvite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EsignEsignInvite{}
// EsignEsignInvite struct for EsignEsignInvite
type EsignEsignInvite struct {
// Email is the address the invitation is for, lower-cased.
Email *string `json:"email,omitempty"`
// ID is the new recipient's id, which is what a field is placed against.
Id *string `json:"id,omitempty"`
// Name is the recipient's display name, empty when none was given.
Name *string `json:"name,omitempty"`
// Role is the role they were recorded with — SIGNER unless another was asked for.
Role *string `json:"role,omitempty"`
// Token is the crypto-random signing capability for this recipient. It is the entire credential their signing endpoint accepts, so treat it as a secret and hand it only to them: the signing link is built from it.
Token *string `json:"token,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EsignEsignInvite EsignEsignInvite
// NewEsignEsignInvite instantiates a new EsignEsignInvite 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 NewEsignEsignInvite() *EsignEsignInvite {
this := EsignEsignInvite{}
return &this
}
// NewEsignEsignInviteWithDefaults instantiates a new EsignEsignInvite 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 NewEsignEsignInviteWithDefaults() *EsignEsignInvite {
this := EsignEsignInvite{}
return &this
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) SetEmail(v string) {
o.Email = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) SetId(v string) {
o.Id = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *EsignEsignInvite) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EsignEsignInvite) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *EsignEsignInvite) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *EsignEsignInvite) SetName(v string) {
o.Name = &v
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) SetRole(v string) {
o.Role = &v
}
// GetToken returns the Token field value if set, zero value otherwise.
func (o *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) 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 *EsignEsignInvite) SetToken(v string) {
o.Token = &v
}
func (o EsignEsignInvite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EsignEsignInvite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
if !IsNil(o.Token) {
toSerialize["token"] = o.Token
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EsignEsignInvite) UnmarshalJSON(data []byte) (err error) {
varEsignEsignInvite := _EsignEsignInvite{}
err = json.Unmarshal(data, &varEsignEsignInvite)
if err != nil {
return err
}
*o = EsignEsignInvite(varEsignEsignInvite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "email")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "role")
delete(additionalProperties, "token")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEsignEsignInvite struct {
value *EsignEsignInvite
isSet bool
}
func (v NullableEsignEsignInvite) Get() *EsignEsignInvite {
return v.value
}
func (v *NullableEsignEsignInvite) Set(val *EsignEsignInvite) {
v.value = val
v.isSet = true
}
func (v NullableEsignEsignInvite) IsSet() bool {
return v.isSet
}
func (v *NullableEsignEsignInvite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEsignEsignInvite(val *EsignEsignInvite) *NullableEsignEsignInvite {
return &NullableEsignEsignInvite{value: val, isSet: true}
}
func (v NullableEsignEsignInvite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEsignEsignInvite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}