mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.0 KiB
Go
269 lines
7.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 ComplianceSubjectReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ComplianceSubjectReq{}
|
|
|
|
// ComplianceSubjectReq struct for ComplianceSubjectReq
|
|
type ComplianceSubjectReq struct {
|
|
// Email is the subject's contact email, sealed at rest.
|
|
Email *string `json:"email,omitempty"`
|
|
// Kind is the party type: \"individual\" (KYC) or \"business\" (KYB).
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Name is the subject's name, sealed at rest.
|
|
Name *string `json:"name,omitempty"`
|
|
// Ref is the org's own opaque external id for this subject.
|
|
Ref *string `json:"ref,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ComplianceSubjectReq ComplianceSubjectReq
|
|
|
|
// NewComplianceSubjectReq instantiates a new ComplianceSubjectReq 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 NewComplianceSubjectReq() *ComplianceSubjectReq {
|
|
this := ComplianceSubjectReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewComplianceSubjectReqWithDefaults instantiates a new ComplianceSubjectReq 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 NewComplianceSubjectReqWithDefaults() *ComplianceSubjectReq {
|
|
this := ComplianceSubjectReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *ComplianceSubjectReq) 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 *ComplianceSubjectReq) 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 *ComplianceSubjectReq) 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 *ComplianceSubjectReq) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *ComplianceSubjectReq) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ComplianceSubjectReq) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *ComplianceSubjectReq) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *ComplianceSubjectReq) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ComplianceSubjectReq) 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 *ComplianceSubjectReq) 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 *ComplianceSubjectReq) 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 *ComplianceSubjectReq) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetRef returns the Ref field value if set, zero value otherwise.
|
|
func (o *ComplianceSubjectReq) GetRef() string {
|
|
if o == nil || IsNil(o.Ref) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Ref
|
|
}
|
|
|
|
// GetRefOk returns a tuple with the Ref field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ComplianceSubjectReq) GetRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Ref) {
|
|
return nil, false
|
|
}
|
|
return o.Ref, true
|
|
}
|
|
|
|
// HasRef returns a boolean if a field has been set.
|
|
func (o *ComplianceSubjectReq) HasRef() bool {
|
|
if o != nil && !IsNil(o.Ref) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRef gets a reference to the given string and assigns it to the Ref field.
|
|
func (o *ComplianceSubjectReq) SetRef(v string) {
|
|
o.Ref = &v
|
|
}
|
|
|
|
func (o ComplianceSubjectReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ComplianceSubjectReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Ref) {
|
|
toSerialize["ref"] = o.Ref
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ComplianceSubjectReq) UnmarshalJSON(data []byte) (err error) {
|
|
varComplianceSubjectReq := _ComplianceSubjectReq{}
|
|
|
|
err = json.Unmarshal(data, &varComplianceSubjectReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ComplianceSubjectReq(varComplianceSubjectReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "ref")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableComplianceSubjectReq struct {
|
|
value *ComplianceSubjectReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableComplianceSubjectReq) Get() *ComplianceSubjectReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableComplianceSubjectReq) Set(val *ComplianceSubjectReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableComplianceSubjectReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableComplianceSubjectReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableComplianceSubjectReq(val *ComplianceSubjectReq) *NullableComplianceSubjectReq {
|
|
return &NullableComplianceSubjectReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableComplianceSubjectReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableComplianceSubjectReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|