first version
This commit is contained in:
198
model_schema_permission_member_action.go
Normal file
198
model_schema_permission_member_action.go
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
answer
|
||||
|
||||
answer api
|
||||
|
||||
API version: v0.0.1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the SchemaPermissionMemberAction type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaPermissionMemberAction{}
|
||||
|
||||
// SchemaPermissionMemberAction struct for SchemaPermissionMemberAction
|
||||
type SchemaPermissionMemberAction struct {
|
||||
Action *string `json:"action,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// NewSchemaPermissionMemberAction instantiates a new SchemaPermissionMemberAction 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 NewSchemaPermissionMemberAction() *SchemaPermissionMemberAction {
|
||||
this := SchemaPermissionMemberAction{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaPermissionMemberActionWithDefaults instantiates a new SchemaPermissionMemberAction 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 NewSchemaPermissionMemberActionWithDefaults() *SchemaPermissionMemberAction {
|
||||
this := SchemaPermissionMemberAction{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value if set, zero value otherwise.
|
||||
func (o *SchemaPermissionMemberAction) GetAction() string {
|
||||
if o == nil || IsNil(o.Action) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaPermissionMemberAction) GetActionOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Action) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Action, true
|
||||
}
|
||||
|
||||
// HasAction returns a boolean if a field has been set.
|
||||
func (o *SchemaPermissionMemberAction) HasAction() bool {
|
||||
if o != nil && !IsNil(o.Action) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAction gets a reference to the given string and assigns it to the Action field.
|
||||
func (o *SchemaPermissionMemberAction) SetAction(v string) {
|
||||
o.Action = &v
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *SchemaPermissionMemberAction) 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 *SchemaPermissionMemberAction) 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 *SchemaPermissionMemberAction) 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 *SchemaPermissionMemberAction) SetName(v string) {
|
||||
o.Name = &v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value if set, zero value otherwise.
|
||||
func (o *SchemaPermissionMemberAction) GetType() string {
|
||||
if o == nil || IsNil(o.Type) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaPermissionMemberAction) GetTypeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Type) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Type, true
|
||||
}
|
||||
|
||||
// HasType returns a boolean if a field has been set.
|
||||
func (o *SchemaPermissionMemberAction) HasType() bool {
|
||||
if o != nil && !IsNil(o.Type) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetType gets a reference to the given string and assigns it to the Type field.
|
||||
func (o *SchemaPermissionMemberAction) SetType(v string) {
|
||||
o.Type = &v
|
||||
}
|
||||
|
||||
func (o SchemaPermissionMemberAction) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaPermissionMemberAction) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Action) {
|
||||
toSerialize["action"] = o.Action
|
||||
}
|
||||
if !IsNil(o.Name) {
|
||||
toSerialize["name"] = o.Name
|
||||
}
|
||||
if !IsNil(o.Type) {
|
||||
toSerialize["type"] = o.Type
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaPermissionMemberAction struct {
|
||||
value *SchemaPermissionMemberAction
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaPermissionMemberAction) Get() *SchemaPermissionMemberAction {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaPermissionMemberAction) Set(val *SchemaPermissionMemberAction) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaPermissionMemberAction) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaPermissionMemberAction) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaPermissionMemberAction(val *SchemaPermissionMemberAction) *NullableSchemaPermissionMemberAction {
|
||||
return &NullableSchemaPermissionMemberAction{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaPermissionMemberAction) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaPermissionMemberAction) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user