mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
611 lines
16 KiB
Go
611 lines
16 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 DataroomTrustAskView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DataroomTrustAskView{}
|
|
|
|
// DataroomTrustAskView struct for DataroomTrustAskView
|
|
type DataroomTrustAskView struct {
|
|
// CreatedAt is when the ask arrived, in unix milliseconds.
|
|
CreatedAt *int64 `json:"createdAt,omitempty"`
|
|
// DecidedAt is when it was answered, in unix milliseconds; 0 while open.
|
|
DecidedAt *int64 `json:"decidedAt,omitempty"`
|
|
// DecidedBy is who answered it.
|
|
DecidedBy *string `json:"decidedBy,omitempty"`
|
|
// Email is the address that asked, as stated and UNVERIFIED — it names a party and proves nothing, which is why the grant is addressed to it rather than trusting it.
|
|
Email *string `json:"email,omitempty"`
|
|
// ExpiresAt is when a granted ask closes, in unix milliseconds.
|
|
ExpiresAt *int64 `json:"expiresAt,omitempty"`
|
|
// ID is the request's id.
|
|
Id *string `json:"id,omitempty"`
|
|
// Item is the item asked for, empty when the whole released tier was asked for.
|
|
Item *string `json:"item,omitempty"`
|
|
// Link is the share link a granted ask became.
|
|
Link *string `json:"link,omitempty"`
|
|
// Nda is the text this party accepted, verbatim as it stood when they accepted.
|
|
Nda *string `json:"nda,omitempty"`
|
|
// Note is what the decider wrote when refusing.
|
|
Note *string `json:"note,omitempty"`
|
|
// Party is the company the asker stated.
|
|
Party *string `json:"party,omitempty"`
|
|
// Reason is why they said they want it.
|
|
Reason *string `json:"reason,omitempty"`
|
|
// State is open, granted or refused.
|
|
State *string `json:"state,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DataroomTrustAskView DataroomTrustAskView
|
|
|
|
// NewDataroomTrustAskView instantiates a new DataroomTrustAskView 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 NewDataroomTrustAskView() *DataroomTrustAskView {
|
|
this := DataroomTrustAskView{}
|
|
return &this
|
|
}
|
|
|
|
// NewDataroomTrustAskViewWithDefaults instantiates a new DataroomTrustAskView 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 NewDataroomTrustAskViewWithDefaults() *DataroomTrustAskView {
|
|
this := DataroomTrustAskView{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetCreatedAt() int64 {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetCreatedAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
|
|
func (o *DataroomTrustAskView) SetCreatedAt(v int64) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetDecidedAt returns the DecidedAt field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetDecidedAt() int64 {
|
|
if o == nil || IsNil(o.DecidedAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.DecidedAt
|
|
}
|
|
|
|
// GetDecidedAtOk returns a tuple with the DecidedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetDecidedAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.DecidedAt) {
|
|
return nil, false
|
|
}
|
|
return o.DecidedAt, true
|
|
}
|
|
|
|
// HasDecidedAt returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasDecidedAt() bool {
|
|
if o != nil && !IsNil(o.DecidedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDecidedAt gets a reference to the given int64 and assigns it to the DecidedAt field.
|
|
func (o *DataroomTrustAskView) SetDecidedAt(v int64) {
|
|
o.DecidedAt = &v
|
|
}
|
|
|
|
// GetDecidedBy returns the DecidedBy field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetDecidedBy() string {
|
|
if o == nil || IsNil(o.DecidedBy) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DecidedBy
|
|
}
|
|
|
|
// GetDecidedByOk returns a tuple with the DecidedBy field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetDecidedByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DecidedBy) {
|
|
return nil, false
|
|
}
|
|
return o.DecidedBy, true
|
|
}
|
|
|
|
// HasDecidedBy returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasDecidedBy() bool {
|
|
if o != nil && !IsNil(o.DecidedBy) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDecidedBy gets a reference to the given string and assigns it to the DecidedBy field.
|
|
func (o *DataroomTrustAskView) SetDecidedBy(v string) {
|
|
o.DecidedBy = &v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) 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 *DataroomTrustAskView) 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 *DataroomTrustAskView) 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 *DataroomTrustAskView) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetExpiresAt() int64 {
|
|
if o == nil || IsNil(o.ExpiresAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ExpiresAt
|
|
}
|
|
|
|
// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetExpiresAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ExpiresAt) {
|
|
return nil, false
|
|
}
|
|
return o.ExpiresAt, true
|
|
}
|
|
|
|
// HasExpiresAt returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasExpiresAt() bool {
|
|
if o != nil && !IsNil(o.ExpiresAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExpiresAt gets a reference to the given int64 and assigns it to the ExpiresAt field.
|
|
func (o *DataroomTrustAskView) SetExpiresAt(v int64) {
|
|
o.ExpiresAt = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) 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 *DataroomTrustAskView) 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 *DataroomTrustAskView) 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 *DataroomTrustAskView) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetItem returns the Item field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetItem() string {
|
|
if o == nil || IsNil(o.Item) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Item
|
|
}
|
|
|
|
// GetItemOk returns a tuple with the Item field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetItemOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Item) {
|
|
return nil, false
|
|
}
|
|
return o.Item, true
|
|
}
|
|
|
|
// HasItem returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasItem() bool {
|
|
if o != nil && !IsNil(o.Item) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetItem gets a reference to the given string and assigns it to the Item field.
|
|
func (o *DataroomTrustAskView) SetItem(v string) {
|
|
o.Item = &v
|
|
}
|
|
|
|
// GetLink returns the Link field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetLink() string {
|
|
if o == nil || IsNil(o.Link) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Link
|
|
}
|
|
|
|
// GetLinkOk returns a tuple with the Link field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetLinkOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Link) {
|
|
return nil, false
|
|
}
|
|
return o.Link, true
|
|
}
|
|
|
|
// HasLink returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasLink() bool {
|
|
if o != nil && !IsNil(o.Link) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLink gets a reference to the given string and assigns it to the Link field.
|
|
func (o *DataroomTrustAskView) SetLink(v string) {
|
|
o.Link = &v
|
|
}
|
|
|
|
// GetNda returns the Nda field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetNda() string {
|
|
if o == nil || IsNil(o.Nda) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Nda
|
|
}
|
|
|
|
// GetNdaOk returns a tuple with the Nda field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetNdaOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Nda) {
|
|
return nil, false
|
|
}
|
|
return o.Nda, true
|
|
}
|
|
|
|
// HasNda returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasNda() bool {
|
|
if o != nil && !IsNil(o.Nda) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNda gets a reference to the given string and assigns it to the Nda field.
|
|
func (o *DataroomTrustAskView) SetNda(v string) {
|
|
o.Nda = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *DataroomTrustAskView) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetParty returns the Party field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetParty() string {
|
|
if o == nil || IsNil(o.Party) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Party
|
|
}
|
|
|
|
// GetPartyOk returns a tuple with the Party field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetPartyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Party) {
|
|
return nil, false
|
|
}
|
|
return o.Party, true
|
|
}
|
|
|
|
// HasParty returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasParty() bool {
|
|
if o != nil && !IsNil(o.Party) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParty gets a reference to the given string and assigns it to the Party field.
|
|
func (o *DataroomTrustAskView) SetParty(v string) {
|
|
o.Party = &v
|
|
}
|
|
|
|
// GetReason returns the Reason field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetReason() string {
|
|
if o == nil || IsNil(o.Reason) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Reason
|
|
}
|
|
|
|
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetReasonOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Reason) {
|
|
return nil, false
|
|
}
|
|
return o.Reason, true
|
|
}
|
|
|
|
// HasReason returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasReason() bool {
|
|
if o != nil && !IsNil(o.Reason) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReason gets a reference to the given string and assigns it to the Reason field.
|
|
func (o *DataroomTrustAskView) SetReason(v string) {
|
|
o.Reason = &v
|
|
}
|
|
|
|
// GetState returns the State field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAskView) GetState() string {
|
|
if o == nil || IsNil(o.State) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.State
|
|
}
|
|
|
|
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAskView) GetStateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.State) {
|
|
return nil, false
|
|
}
|
|
return o.State, true
|
|
}
|
|
|
|
// HasState returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAskView) HasState() bool {
|
|
if o != nil && !IsNil(o.State) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetState gets a reference to the given string and assigns it to the State field.
|
|
func (o *DataroomTrustAskView) SetState(v string) {
|
|
o.State = &v
|
|
}
|
|
|
|
func (o DataroomTrustAskView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DataroomTrustAskView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.DecidedAt) {
|
|
toSerialize["decidedAt"] = o.DecidedAt
|
|
}
|
|
if !IsNil(o.DecidedBy) {
|
|
toSerialize["decidedBy"] = o.DecidedBy
|
|
}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.ExpiresAt) {
|
|
toSerialize["expiresAt"] = o.ExpiresAt
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Item) {
|
|
toSerialize["item"] = o.Item
|
|
}
|
|
if !IsNil(o.Link) {
|
|
toSerialize["link"] = o.Link
|
|
}
|
|
if !IsNil(o.Nda) {
|
|
toSerialize["nda"] = o.Nda
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Party) {
|
|
toSerialize["party"] = o.Party
|
|
}
|
|
if !IsNil(o.Reason) {
|
|
toSerialize["reason"] = o.Reason
|
|
}
|
|
if !IsNil(o.State) {
|
|
toSerialize["state"] = o.State
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DataroomTrustAskView) UnmarshalJSON(data []byte) (err error) {
|
|
varDataroomTrustAskView := _DataroomTrustAskView{}
|
|
|
|
err = json.Unmarshal(data, &varDataroomTrustAskView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DataroomTrustAskView(varDataroomTrustAskView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "decidedAt")
|
|
delete(additionalProperties, "decidedBy")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "expiresAt")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "item")
|
|
delete(additionalProperties, "link")
|
|
delete(additionalProperties, "nda")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "party")
|
|
delete(additionalProperties, "reason")
|
|
delete(additionalProperties, "state")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDataroomTrustAskView struct {
|
|
value *DataroomTrustAskView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDataroomTrustAskView) Get() *DataroomTrustAskView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDataroomTrustAskView) Set(val *DataroomTrustAskView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDataroomTrustAskView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDataroomTrustAskView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDataroomTrustAskView(val *DataroomTrustAskView) *NullableDataroomTrustAskView {
|
|
return &NullableDataroomTrustAskView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDataroomTrustAskView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDataroomTrustAskView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|