Files
stack/components/fctl/membershipclient/model_invitation_claim.go
2024-01-09 09:24:38 +00:00

158 lines
3.8 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 InvitationClaim type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &InvitationClaim{}
// InvitationClaim struct for InvitationClaim
type InvitationClaim struct {
Role *Role `json:"role,omitempty"`
StackClaims []StackClaim `json:"stackClaims"`
}
// NewInvitationClaim instantiates a new InvitationClaim 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 NewInvitationClaim(stackClaims []StackClaim) *InvitationClaim {
this := InvitationClaim{}
var role Role = EMPTY
this.Role = &role
this.StackClaims = stackClaims
return &this
}
// NewInvitationClaimWithDefaults instantiates a new InvitationClaim 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 NewInvitationClaimWithDefaults() *InvitationClaim {
this := InvitationClaim{}
var role Role = EMPTY
this.Role = &role
return &this
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *InvitationClaim) GetRole() Role {
if o == nil || IsNil(o.Role) {
var ret Role
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 *InvitationClaim) GetRoleOk() (*Role, 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 *InvitationClaim) HasRole() bool {
if o != nil && !IsNil(o.Role) {
return true
}
return false
}
// SetRole gets a reference to the given Role and assigns it to the Role field.
func (o *InvitationClaim) SetRole(v Role) {
o.Role = &v
}
// GetStackClaims returns the StackClaims field value
func (o *InvitationClaim) GetStackClaims() []StackClaim {
if o == nil {
var ret []StackClaim
return ret
}
return o.StackClaims
}
// GetStackClaimsOk returns a tuple with the StackClaims field value
// and a boolean to check if the value has been set.
func (o *InvitationClaim) GetStackClaimsOk() ([]StackClaim, bool) {
if o == nil {
return nil, false
}
return o.StackClaims, true
}
// SetStackClaims sets field value
func (o *InvitationClaim) SetStackClaims(v []StackClaim) {
o.StackClaims = v
}
func (o InvitationClaim) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o InvitationClaim) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
toSerialize["stackClaims"] = o.StackClaims
return toSerialize, nil
}
type NullableInvitationClaim struct {
value *InvitationClaim
isSet bool
}
func (v NullableInvitationClaim) Get() *InvitationClaim {
return v.value
}
func (v *NullableInvitationClaim) Set(val *InvitationClaim) {
v.value = val
v.isSet = true
}
func (v NullableInvitationClaim) IsSet() bool {
return v.isSet
}
func (v *NullableInvitationClaim) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInvitationClaim(val *InvitationClaim) *NullableInvitationClaim {
return &NullableInvitationClaim{value: val, isSet: true}
}
func (v NullableInvitationClaim) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInvitationClaim) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}