mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.0 KiB
Go
345 lines
9.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 DataroomTrustAsk type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DataroomTrustAsk{}
|
|
|
|
// DataroomTrustAsk struct for DataroomTrustAsk
|
|
type DataroomTrustAsk struct {
|
|
// Accept must be true when the centre states an NDA. The text accepted is recorded verbatim on the request, so a later edit to the NDA cannot rewrite what this party agreed to.
|
|
Accept *bool `json:"accept,omitempty"`
|
|
// Email is where the grant will be sent, and the ONLY address the resulting link admits. Required.
|
|
Email *string `json:"email,omitempty"`
|
|
// Item names one published item to ask for. Optional; omitting it asks for everything released on request.
|
|
Item *string `json:"item,omitempty"`
|
|
// Party is the company the asker is from. Optional, and recorded as stated.
|
|
Party *string `json:"party,omitempty"`
|
|
// Reason is why they want it. Optional, and recorded as stated — it is what the person deciding reads.
|
|
Reason *string `json:"reason,omitempty"`
|
|
// Slug is the centre's public address, taken from the path.
|
|
Slug *string `json:"slug,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DataroomTrustAsk DataroomTrustAsk
|
|
|
|
// NewDataroomTrustAsk instantiates a new DataroomTrustAsk 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 NewDataroomTrustAsk() *DataroomTrustAsk {
|
|
this := DataroomTrustAsk{}
|
|
return &this
|
|
}
|
|
|
|
// NewDataroomTrustAskWithDefaults instantiates a new DataroomTrustAsk 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 NewDataroomTrustAskWithDefaults() *DataroomTrustAsk {
|
|
this := DataroomTrustAsk{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccept returns the Accept field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAsk) GetAccept() bool {
|
|
if o == nil || IsNil(o.Accept) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Accept
|
|
}
|
|
|
|
// GetAcceptOk returns a tuple with the Accept field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAsk) GetAcceptOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Accept) {
|
|
return nil, false
|
|
}
|
|
return o.Accept, true
|
|
}
|
|
|
|
// HasAccept returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAsk) HasAccept() bool {
|
|
if o != nil && !IsNil(o.Accept) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAccept gets a reference to the given bool and assigns it to the Accept field.
|
|
func (o *DataroomTrustAsk) SetAccept(v bool) {
|
|
o.Accept = &v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetItem returns the Item field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) SetItem(v string) {
|
|
o.Item = &v
|
|
}
|
|
|
|
// GetParty returns the Party field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) SetParty(v string) {
|
|
o.Party = &v
|
|
}
|
|
|
|
// GetReason returns the Reason field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) 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 *DataroomTrustAsk) SetReason(v string) {
|
|
o.Reason = &v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value if set, zero value otherwise.
|
|
func (o *DataroomTrustAsk) GetSlug() string {
|
|
if o == nil || IsNil(o.Slug) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Slug
|
|
}
|
|
|
|
// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustAsk) GetSlugOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Slug) {
|
|
return nil, false
|
|
}
|
|
return o.Slug, true
|
|
}
|
|
|
|
// HasSlug returns a boolean if a field has been set.
|
|
func (o *DataroomTrustAsk) HasSlug() bool {
|
|
if o != nil && !IsNil(o.Slug) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSlug gets a reference to the given string and assigns it to the Slug field.
|
|
func (o *DataroomTrustAsk) SetSlug(v string) {
|
|
o.Slug = &v
|
|
}
|
|
|
|
func (o DataroomTrustAsk) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DataroomTrustAsk) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Accept) {
|
|
toSerialize["accept"] = o.Accept
|
|
}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.Item) {
|
|
toSerialize["item"] = o.Item
|
|
}
|
|
if !IsNil(o.Party) {
|
|
toSerialize["party"] = o.Party
|
|
}
|
|
if !IsNil(o.Reason) {
|
|
toSerialize["reason"] = o.Reason
|
|
}
|
|
if !IsNil(o.Slug) {
|
|
toSerialize["slug"] = o.Slug
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DataroomTrustAsk) UnmarshalJSON(data []byte) (err error) {
|
|
varDataroomTrustAsk := _DataroomTrustAsk{}
|
|
|
|
err = json.Unmarshal(data, &varDataroomTrustAsk)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DataroomTrustAsk(varDataroomTrustAsk)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "accept")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "item")
|
|
delete(additionalProperties, "party")
|
|
delete(additionalProperties, "reason")
|
|
delete(additionalProperties, "slug")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDataroomTrustAsk struct {
|
|
value *DataroomTrustAsk
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDataroomTrustAsk) Get() *DataroomTrustAsk {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDataroomTrustAsk) Set(val *DataroomTrustAsk) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDataroomTrustAsk) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDataroomTrustAsk) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDataroomTrustAsk(val *DataroomTrustAsk) *NullableDataroomTrustAsk {
|
|
return &NullableDataroomTrustAsk{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDataroomTrustAsk) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDataroomTrustAsk) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|