mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
376 lines
9.4 KiB
Go
376 lines
9.4 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 FrameworkDocPerm type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FrameworkDocPerm{}
|
|
|
|
// FrameworkDocPerm struct for FrameworkDocPerm
|
|
type FrameworkDocPerm struct {
|
|
Cancel *bool `json:"cancel,omitempty"`
|
|
Create *bool `json:"create,omitempty"`
|
|
Delete *bool `json:"delete,omitempty"`
|
|
Read *bool `json:"read,omitempty"`
|
|
Role *string `json:"role,omitempty"`
|
|
Submit *bool `json:"submit,omitempty"`
|
|
Write *bool `json:"write,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FrameworkDocPerm FrameworkDocPerm
|
|
|
|
// NewFrameworkDocPerm instantiates a new FrameworkDocPerm 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 NewFrameworkDocPerm() *FrameworkDocPerm {
|
|
this := FrameworkDocPerm{}
|
|
return &this
|
|
}
|
|
|
|
// NewFrameworkDocPermWithDefaults instantiates a new FrameworkDocPerm 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 NewFrameworkDocPermWithDefaults() *FrameworkDocPerm {
|
|
this := FrameworkDocPerm{}
|
|
return &this
|
|
}
|
|
|
|
// GetCancel returns the Cancel field value if set, zero value otherwise.
|
|
func (o *FrameworkDocPerm) GetCancel() bool {
|
|
if o == nil || IsNil(o.Cancel) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Cancel
|
|
}
|
|
|
|
// GetCancelOk returns a tuple with the Cancel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkDocPerm) GetCancelOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Cancel) {
|
|
return nil, false
|
|
}
|
|
return o.Cancel, true
|
|
}
|
|
|
|
// HasCancel returns a boolean if a field has been set.
|
|
func (o *FrameworkDocPerm) HasCancel() bool {
|
|
if o != nil && !IsNil(o.Cancel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCancel gets a reference to the given bool and assigns it to the Cancel field.
|
|
func (o *FrameworkDocPerm) SetCancel(v bool) {
|
|
o.Cancel = &v
|
|
}
|
|
|
|
// GetCreate returns the Create field value if set, zero value otherwise.
|
|
func (o *FrameworkDocPerm) GetCreate() bool {
|
|
if o == nil || IsNil(o.Create) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Create
|
|
}
|
|
|
|
// GetCreateOk returns a tuple with the Create field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkDocPerm) GetCreateOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Create) {
|
|
return nil, false
|
|
}
|
|
return o.Create, true
|
|
}
|
|
|
|
// HasCreate returns a boolean if a field has been set.
|
|
func (o *FrameworkDocPerm) HasCreate() bool {
|
|
if o != nil && !IsNil(o.Create) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreate gets a reference to the given bool and assigns it to the Create field.
|
|
func (o *FrameworkDocPerm) SetCreate(v bool) {
|
|
o.Create = &v
|
|
}
|
|
|
|
// GetDelete returns the Delete field value if set, zero value otherwise.
|
|
func (o *FrameworkDocPerm) GetDelete() bool {
|
|
if o == nil || IsNil(o.Delete) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Delete
|
|
}
|
|
|
|
// GetDeleteOk returns a tuple with the Delete field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkDocPerm) GetDeleteOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Delete) {
|
|
return nil, false
|
|
}
|
|
return o.Delete, true
|
|
}
|
|
|
|
// HasDelete returns a boolean if a field has been set.
|
|
func (o *FrameworkDocPerm) HasDelete() bool {
|
|
if o != nil && !IsNil(o.Delete) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDelete gets a reference to the given bool and assigns it to the Delete field.
|
|
func (o *FrameworkDocPerm) SetDelete(v bool) {
|
|
o.Delete = &v
|
|
}
|
|
|
|
// GetRead returns the Read field value if set, zero value otherwise.
|
|
func (o *FrameworkDocPerm) GetRead() bool {
|
|
if o == nil || IsNil(o.Read) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Read
|
|
}
|
|
|
|
// GetReadOk returns a tuple with the Read field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkDocPerm) GetReadOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Read) {
|
|
return nil, false
|
|
}
|
|
return o.Read, true
|
|
}
|
|
|
|
// HasRead returns a boolean if a field has been set.
|
|
func (o *FrameworkDocPerm) HasRead() bool {
|
|
if o != nil && !IsNil(o.Read) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRead gets a reference to the given bool and assigns it to the Read field.
|
|
func (o *FrameworkDocPerm) SetRead(v bool) {
|
|
o.Read = &v
|
|
}
|
|
|
|
// GetRole returns the Role field value if set, zero value otherwise.
|
|
func (o *FrameworkDocPerm) GetRole() string {
|
|
if o == nil || IsNil(o.Role) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Role
|
|
}
|
|
|
|
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkDocPerm) GetRoleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Role) {
|
|
return nil, false
|
|
}
|
|
return o.Role, true
|
|
}
|
|
|
|
// HasRole returns a boolean if a field has been set.
|
|
func (o *FrameworkDocPerm) HasRole() bool {
|
|
if o != nil && !IsNil(o.Role) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRole gets a reference to the given string and assigns it to the Role field.
|
|
func (o *FrameworkDocPerm) SetRole(v string) {
|
|
o.Role = &v
|
|
}
|
|
|
|
// GetSubmit returns the Submit field value if set, zero value otherwise.
|
|
func (o *FrameworkDocPerm) GetSubmit() bool {
|
|
if o == nil || IsNil(o.Submit) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Submit
|
|
}
|
|
|
|
// GetSubmitOk returns a tuple with the Submit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkDocPerm) GetSubmitOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Submit) {
|
|
return nil, false
|
|
}
|
|
return o.Submit, true
|
|
}
|
|
|
|
// HasSubmit returns a boolean if a field has been set.
|
|
func (o *FrameworkDocPerm) HasSubmit() bool {
|
|
if o != nil && !IsNil(o.Submit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSubmit gets a reference to the given bool and assigns it to the Submit field.
|
|
func (o *FrameworkDocPerm) SetSubmit(v bool) {
|
|
o.Submit = &v
|
|
}
|
|
|
|
// GetWrite returns the Write field value if set, zero value otherwise.
|
|
func (o *FrameworkDocPerm) GetWrite() bool {
|
|
if o == nil || IsNil(o.Write) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Write
|
|
}
|
|
|
|
// GetWriteOk returns a tuple with the Write field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkDocPerm) GetWriteOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Write) {
|
|
return nil, false
|
|
}
|
|
return o.Write, true
|
|
}
|
|
|
|
// HasWrite returns a boolean if a field has been set.
|
|
func (o *FrameworkDocPerm) HasWrite() bool {
|
|
if o != nil && !IsNil(o.Write) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWrite gets a reference to the given bool and assigns it to the Write field.
|
|
func (o *FrameworkDocPerm) SetWrite(v bool) {
|
|
o.Write = &v
|
|
}
|
|
|
|
func (o FrameworkDocPerm) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FrameworkDocPerm) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Cancel) {
|
|
toSerialize["cancel"] = o.Cancel
|
|
}
|
|
if !IsNil(o.Create) {
|
|
toSerialize["create"] = o.Create
|
|
}
|
|
if !IsNil(o.Delete) {
|
|
toSerialize["delete"] = o.Delete
|
|
}
|
|
if !IsNil(o.Read) {
|
|
toSerialize["read"] = o.Read
|
|
}
|
|
if !IsNil(o.Role) {
|
|
toSerialize["role"] = o.Role
|
|
}
|
|
if !IsNil(o.Submit) {
|
|
toSerialize["submit"] = o.Submit
|
|
}
|
|
if !IsNil(o.Write) {
|
|
toSerialize["write"] = o.Write
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FrameworkDocPerm) UnmarshalJSON(data []byte) (err error) {
|
|
varFrameworkDocPerm := _FrameworkDocPerm{}
|
|
|
|
err = json.Unmarshal(data, &varFrameworkDocPerm)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FrameworkDocPerm(varFrameworkDocPerm)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "cancel")
|
|
delete(additionalProperties, "create")
|
|
delete(additionalProperties, "delete")
|
|
delete(additionalProperties, "read")
|
|
delete(additionalProperties, "role")
|
|
delete(additionalProperties, "submit")
|
|
delete(additionalProperties, "write")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFrameworkDocPerm struct {
|
|
value *FrameworkDocPerm
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFrameworkDocPerm) Get() *FrameworkDocPerm {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFrameworkDocPerm) Set(val *FrameworkDocPerm) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFrameworkDocPerm) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFrameworkDocPerm) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFrameworkDocPerm(val *FrameworkDocPerm) *NullableFrameworkDocPerm {
|
|
return &NullableFrameworkDocPerm{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFrameworkDocPerm) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFrameworkDocPerm) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|