Files
sdk/model_dataroom_trust_desk.go

383 lines
10 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 DataroomTrustDesk type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DataroomTrustDesk{}
// DataroomTrustDesk struct for DataroomTrustDesk
type DataroomTrustDesk struct {
// Grants is every grant that has been made, newest first.
Grants []DataroomTrustGrantView `json:"grants,omitempty"`
// Items is everything the org holds, both tiers, retired included.
Items []DataroomTrustItemView `json:"items,omitempty"`
// Name is the centre's display name.
Name *string `json:"name,omitempty"`
// Nda is the text a party must accept before asking.
Nda *string `json:"nda,omitempty"`
// Published is whether the centre answers at its public address.
Published *bool `json:"published,omitempty"`
// Requests is every ask, newest first, open ones included.
Requests []DataroomTrustAskView `json:"requests,omitempty"`
// Slug is the public address, empty until the centre is published.
Slug *string `json:"slug,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DataroomTrustDesk DataroomTrustDesk
// NewDataroomTrustDesk instantiates a new DataroomTrustDesk 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 NewDataroomTrustDesk() *DataroomTrustDesk {
this := DataroomTrustDesk{}
return &this
}
// NewDataroomTrustDeskWithDefaults instantiates a new DataroomTrustDesk 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 NewDataroomTrustDeskWithDefaults() *DataroomTrustDesk {
this := DataroomTrustDesk{}
return &this
}
// GetGrants returns the Grants field value if set, zero value otherwise.
func (o *DataroomTrustDesk) GetGrants() []DataroomTrustGrantView {
if o == nil || IsNil(o.Grants) {
var ret []DataroomTrustGrantView
return ret
}
return o.Grants
}
// GetGrantsOk returns a tuple with the Grants field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomTrustDesk) GetGrantsOk() ([]DataroomTrustGrantView, bool) {
if o == nil || IsNil(o.Grants) {
return nil, false
}
return o.Grants, true
}
// HasGrants returns a boolean if a field has been set.
func (o *DataroomTrustDesk) HasGrants() bool {
if o != nil && !IsNil(o.Grants) {
return true
}
return false
}
// SetGrants gets a reference to the given []DataroomTrustGrantView and assigns it to the Grants field.
func (o *DataroomTrustDesk) SetGrants(v []DataroomTrustGrantView) {
o.Grants = v
}
// GetItems returns the Items field value if set, zero value otherwise.
func (o *DataroomTrustDesk) GetItems() []DataroomTrustItemView {
if o == nil || IsNil(o.Items) {
var ret []DataroomTrustItemView
return ret
}
return o.Items
}
// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomTrustDesk) GetItemsOk() ([]DataroomTrustItemView, bool) {
if o == nil || IsNil(o.Items) {
return nil, false
}
return o.Items, true
}
// HasItems returns a boolean if a field has been set.
func (o *DataroomTrustDesk) HasItems() bool {
if o != nil && !IsNil(o.Items) {
return true
}
return false
}
// SetItems gets a reference to the given []DataroomTrustItemView and assigns it to the Items field.
func (o *DataroomTrustDesk) SetItems(v []DataroomTrustItemView) {
o.Items = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DataroomTrustDesk) 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 *DataroomTrustDesk) 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 *DataroomTrustDesk) 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 *DataroomTrustDesk) SetName(v string) {
o.Name = &v
}
// GetNda returns the Nda field value if set, zero value otherwise.
func (o *DataroomTrustDesk) 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 *DataroomTrustDesk) 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 *DataroomTrustDesk) 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 *DataroomTrustDesk) SetNda(v string) {
o.Nda = &v
}
// GetPublished returns the Published field value if set, zero value otherwise.
func (o *DataroomTrustDesk) GetPublished() bool {
if o == nil || IsNil(o.Published) {
var ret bool
return ret
}
return *o.Published
}
// GetPublishedOk returns a tuple with the Published field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomTrustDesk) GetPublishedOk() (*bool, bool) {
if o == nil || IsNil(o.Published) {
return nil, false
}
return o.Published, true
}
// HasPublished returns a boolean if a field has been set.
func (o *DataroomTrustDesk) HasPublished() bool {
if o != nil && !IsNil(o.Published) {
return true
}
return false
}
// SetPublished gets a reference to the given bool and assigns it to the Published field.
func (o *DataroomTrustDesk) SetPublished(v bool) {
o.Published = &v
}
// GetRequests returns the Requests field value if set, zero value otherwise.
func (o *DataroomTrustDesk) GetRequests() []DataroomTrustAskView {
if o == nil || IsNil(o.Requests) {
var ret []DataroomTrustAskView
return ret
}
return o.Requests
}
// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomTrustDesk) GetRequestsOk() ([]DataroomTrustAskView, bool) {
if o == nil || IsNil(o.Requests) {
return nil, false
}
return o.Requests, true
}
// HasRequests returns a boolean if a field has been set.
func (o *DataroomTrustDesk) HasRequests() bool {
if o != nil && !IsNil(o.Requests) {
return true
}
return false
}
// SetRequests gets a reference to the given []DataroomTrustAskView and assigns it to the Requests field.
func (o *DataroomTrustDesk) SetRequests(v []DataroomTrustAskView) {
o.Requests = v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *DataroomTrustDesk) 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 *DataroomTrustDesk) 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 *DataroomTrustDesk) 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 *DataroomTrustDesk) SetSlug(v string) {
o.Slug = &v
}
func (o DataroomTrustDesk) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataroomTrustDesk) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Grants) {
toSerialize["grants"] = o.Grants
}
if !IsNil(o.Items) {
toSerialize["items"] = o.Items
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Nda) {
toSerialize["nda"] = o.Nda
}
if !IsNil(o.Published) {
toSerialize["published"] = o.Published
}
if !IsNil(o.Requests) {
toSerialize["requests"] = o.Requests
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DataroomTrustDesk) UnmarshalJSON(data []byte) (err error) {
varDataroomTrustDesk := _DataroomTrustDesk{}
err = json.Unmarshal(data, &varDataroomTrustDesk)
if err != nil {
return err
}
*o = DataroomTrustDesk(varDataroomTrustDesk)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "grants")
delete(additionalProperties, "items")
delete(additionalProperties, "name")
delete(additionalProperties, "nda")
delete(additionalProperties, "published")
delete(additionalProperties, "requests")
delete(additionalProperties, "slug")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDataroomTrustDesk struct {
value *DataroomTrustDesk
isSet bool
}
func (v NullableDataroomTrustDesk) Get() *DataroomTrustDesk {
return v.value
}
func (v *NullableDataroomTrustDesk) Set(val *DataroomTrustDesk) {
v.value = val
v.isSet = true
}
func (v NullableDataroomTrustDesk) IsSet() bool {
return v.isSet
}
func (v *NullableDataroomTrustDesk) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDataroomTrustDesk(val *DataroomTrustDesk) *NullableDataroomTrustDesk {
return &NullableDataroomTrustDesk{value: val, isSet: true}
}
func (v NullableDataroomTrustDesk) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDataroomTrustDesk) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}