Files
stack/components/fctl/membershipclient/model_stack_user_access.go

174 lines
4.0 KiB
Go

/*
Membership API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 0.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package membershipclient
import (
"encoding/json"
)
// checks if the StackUserAccess type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StackUserAccess{}
// StackUserAccess struct for StackUserAccess
type StackUserAccess struct {
// Stack ID
StackId string `json:"stackId"`
// User ID
UserId string `json:"userId"`
Role Role `json:"role"`
}
// NewStackUserAccess instantiates a new StackUserAccess 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 NewStackUserAccess(stackId string, userId string, role Role) *StackUserAccess {
this := StackUserAccess{}
this.StackId = stackId
this.UserId = userId
this.Role = role
return &this
}
// NewStackUserAccessWithDefaults instantiates a new StackUserAccess 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 NewStackUserAccessWithDefaults() *StackUserAccess {
this := StackUserAccess{}
return &this
}
// GetStackId returns the StackId field value
func (o *StackUserAccess) GetStackId() string {
if o == nil {
var ret string
return ret
}
return o.StackId
}
// GetStackIdOk returns a tuple with the StackId field value
// and a boolean to check if the value has been set.
func (o *StackUserAccess) GetStackIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.StackId, true
}
// SetStackId sets field value
func (o *StackUserAccess) SetStackId(v string) {
o.StackId = v
}
// GetUserId returns the UserId field value
func (o *StackUserAccess) GetUserId() string {
if o == nil {
var ret string
return ret
}
return o.UserId
}
// GetUserIdOk returns a tuple with the UserId field value
// and a boolean to check if the value has been set.
func (o *StackUserAccess) GetUserIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.UserId, true
}
// SetUserId sets field value
func (o *StackUserAccess) SetUserId(v string) {
o.UserId = v
}
// GetRole returns the Role field value
func (o *StackUserAccess) GetRole() Role {
if o == nil {
var ret Role
return ret
}
return o.Role
}
// GetRoleOk returns a tuple with the Role field value
// and a boolean to check if the value has been set.
func (o *StackUserAccess) GetRoleOk() (*Role, bool) {
if o == nil {
return nil, false
}
return &o.Role, true
}
// SetRole sets field value
func (o *StackUserAccess) SetRole(v Role) {
o.Role = v
}
func (o StackUserAccess) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StackUserAccess) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["stackId"] = o.StackId
toSerialize["userId"] = o.UserId
toSerialize["role"] = o.Role
return toSerialize, nil
}
type NullableStackUserAccess struct {
value *StackUserAccess
isSet bool
}
func (v NullableStackUserAccess) Get() *StackUserAccess {
return v.value
}
func (v *NullableStackUserAccess) Set(val *StackUserAccess) {
v.value = val
v.isSet = true
}
func (v NullableStackUserAccess) IsSet() bool {
return v.isSet
}
func (v *NullableStackUserAccess) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStackUserAccess(val *StackUserAccess) *NullableStackUserAccess {
return &NullableStackUserAccess{value: val, isSet: true}
}
func (v NullableStackUserAccess) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStackUserAccess) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}