Files
sdk/model_dataroom_trust_settings.go

269 lines
7.6 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 DataroomTrustSettings type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DataroomTrustSettings{}
// DataroomTrustSettings struct for DataroomTrustSettings
type DataroomTrustSettings struct {
// Name is the centre's display name. Required to publish.
Name *string `json:"name,omitempty"`
// Nda is the text a party must accept before asking for a document. Optional; empty asks for no acceptance. The text in force is copied onto each request as it is accepted, so editing it never changes what anyone already agreed to.
Nda *string `json:"nda,omitempty"`
// Publish makes the centre answer at its public address. False withdraws it: the address stops answering while every item, grant and record stays exactly as it was, so withdrawing is reversible and loses nothing.
Publish *bool `json:"publish,omitempty"`
// Slug is the public address to answer at — a lowercase label of letters, digits and hyphens. Required to publish, unique across the deployment, and one org holds one: publishing under a new address MOVES the centre rather than leaving the old one answering.
Slug *string `json:"slug,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DataroomTrustSettings DataroomTrustSettings
// NewDataroomTrustSettings instantiates a new DataroomTrustSettings 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 NewDataroomTrustSettings() *DataroomTrustSettings {
this := DataroomTrustSettings{}
return &this
}
// NewDataroomTrustSettingsWithDefaults instantiates a new DataroomTrustSettings 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 NewDataroomTrustSettingsWithDefaults() *DataroomTrustSettings {
this := DataroomTrustSettings{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DataroomTrustSettings) 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 *DataroomTrustSettings) 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 *DataroomTrustSettings) 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 *DataroomTrustSettings) SetName(v string) {
o.Name = &v
}
// GetNda returns the Nda field value if set, zero value otherwise.
func (o *DataroomTrustSettings) 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 *DataroomTrustSettings) 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 *DataroomTrustSettings) 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 *DataroomTrustSettings) SetNda(v string) {
o.Nda = &v
}
// GetPublish returns the Publish field value if set, zero value otherwise.
func (o *DataroomTrustSettings) GetPublish() bool {
if o == nil || IsNil(o.Publish) {
var ret bool
return ret
}
return *o.Publish
}
// GetPublishOk returns a tuple with the Publish field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DataroomTrustSettings) GetPublishOk() (*bool, bool) {
if o == nil || IsNil(o.Publish) {
return nil, false
}
return o.Publish, true
}
// HasPublish returns a boolean if a field has been set.
func (o *DataroomTrustSettings) HasPublish() bool {
if o != nil && !IsNil(o.Publish) {
return true
}
return false
}
// SetPublish gets a reference to the given bool and assigns it to the Publish field.
func (o *DataroomTrustSettings) SetPublish(v bool) {
o.Publish = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *DataroomTrustSettings) 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 *DataroomTrustSettings) 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 *DataroomTrustSettings) 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 *DataroomTrustSettings) SetSlug(v string) {
o.Slug = &v
}
func (o DataroomTrustSettings) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DataroomTrustSettings) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Nda) {
toSerialize["nda"] = o.Nda
}
if !IsNil(o.Publish) {
toSerialize["publish"] = o.Publish
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DataroomTrustSettings) UnmarshalJSON(data []byte) (err error) {
varDataroomTrustSettings := _DataroomTrustSettings{}
err = json.Unmarshal(data, &varDataroomTrustSettings)
if err != nil {
return err
}
*o = DataroomTrustSettings(varDataroomTrustSettings)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "nda")
delete(additionalProperties, "publish")
delete(additionalProperties, "slug")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDataroomTrustSettings struct {
value *DataroomTrustSettings
isSet bool
}
func (v NullableDataroomTrustSettings) Get() *DataroomTrustSettings {
return v.value
}
func (v *NullableDataroomTrustSettings) Set(val *DataroomTrustSettings) {
v.value = val
v.isSet = true
}
func (v NullableDataroomTrustSettings) IsSet() bool {
return v.isSet
}
func (v *NullableDataroomTrustSettings) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDataroomTrustSettings(val *DataroomTrustSettings) *NullableDataroomTrustSettings {
return &NullableDataroomTrustSettings{value: val, isSet: true}
}
func (v NullableDataroomTrustSettings) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDataroomTrustSettings) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}