mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
400 lines
9.7 KiB
Go
400 lines
9.7 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the Invitation type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Invitation{}
|
|
|
|
// Invitation struct for Invitation
|
|
type Invitation struct {
|
|
Id string `json:"id"`
|
|
OrganizationId string `json:"organizationId"`
|
|
UserEmail string `json:"userEmail"`
|
|
Status string `json:"status"`
|
|
CreationDate time.Time `json:"creationDate"`
|
|
UpdatedAt *string `json:"updatedAt,omitempty"`
|
|
Role Role `json:"role"`
|
|
StackClaims []StackClaim `json:"stackClaims,omitempty"`
|
|
UserId *string `json:"userId,omitempty"`
|
|
OrganizationAccess *OrganizationUser `json:"organizationAccess,omitempty"`
|
|
}
|
|
|
|
// NewInvitation instantiates a new Invitation 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 NewInvitation(id string, organizationId string, userEmail string, status string, creationDate time.Time, role Role) *Invitation {
|
|
this := Invitation{}
|
|
this.Id = id
|
|
this.OrganizationId = organizationId
|
|
this.UserEmail = userEmail
|
|
this.Status = status
|
|
this.CreationDate = creationDate
|
|
this.Role = role
|
|
return &this
|
|
}
|
|
|
|
// NewInvitationWithDefaults instantiates a new Invitation 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 NewInvitationWithDefaults() *Invitation {
|
|
this := Invitation{}
|
|
var role Role = EMPTY
|
|
this.Role = role
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *Invitation) GetId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *Invitation) SetId(v string) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetOrganizationId returns the OrganizationId field value
|
|
func (o *Invitation) GetOrganizationId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.OrganizationId
|
|
}
|
|
|
|
// GetOrganizationIdOk returns a tuple with the OrganizationId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetOrganizationIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.OrganizationId, true
|
|
}
|
|
|
|
// SetOrganizationId sets field value
|
|
func (o *Invitation) SetOrganizationId(v string) {
|
|
o.OrganizationId = v
|
|
}
|
|
|
|
// GetUserEmail returns the UserEmail field value
|
|
func (o *Invitation) GetUserEmail() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.UserEmail
|
|
}
|
|
|
|
// GetUserEmailOk returns a tuple with the UserEmail field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetUserEmailOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.UserEmail, true
|
|
}
|
|
|
|
// SetUserEmail sets field value
|
|
func (o *Invitation) SetUserEmail(v string) {
|
|
o.UserEmail = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value
|
|
func (o *Invitation) GetStatus() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetStatusOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Status, true
|
|
}
|
|
|
|
// SetStatus sets field value
|
|
func (o *Invitation) SetStatus(v string) {
|
|
o.Status = v
|
|
}
|
|
|
|
// GetCreationDate returns the CreationDate field value
|
|
func (o *Invitation) GetCreationDate() time.Time {
|
|
if o == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
|
|
return o.CreationDate
|
|
}
|
|
|
|
// GetCreationDateOk returns a tuple with the CreationDate field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetCreationDateOk() (*time.Time, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.CreationDate, true
|
|
}
|
|
|
|
// SetCreationDate sets field value
|
|
func (o *Invitation) SetCreationDate(v time.Time) {
|
|
o.CreationDate = v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *Invitation) GetUpdatedAt() string {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetUpdatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedAt, true
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *Invitation) HasUpdatedAt() bool {
|
|
if o != nil && !IsNil(o.UpdatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
|
|
func (o *Invitation) SetUpdatedAt(v string) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
// GetRole returns the Role field value
|
|
func (o *Invitation) 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 *Invitation) GetRoleOk() (*Role, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Role, true
|
|
}
|
|
|
|
// SetRole sets field value
|
|
func (o *Invitation) SetRole(v Role) {
|
|
o.Role = v
|
|
}
|
|
|
|
// GetStackClaims returns the StackClaims field value if set, zero value otherwise.
|
|
func (o *Invitation) GetStackClaims() []StackClaim {
|
|
if o == nil || IsNil(o.StackClaims) {
|
|
var ret []StackClaim
|
|
return ret
|
|
}
|
|
return o.StackClaims
|
|
}
|
|
|
|
// GetStackClaimsOk returns a tuple with the StackClaims field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetStackClaimsOk() ([]StackClaim, bool) {
|
|
if o == nil || IsNil(o.StackClaims) {
|
|
return nil, false
|
|
}
|
|
return o.StackClaims, true
|
|
}
|
|
|
|
// HasStackClaims returns a boolean if a field has been set.
|
|
func (o *Invitation) HasStackClaims() bool {
|
|
if o != nil && !IsNil(o.StackClaims) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStackClaims gets a reference to the given []StackClaim and assigns it to the StackClaims field.
|
|
func (o *Invitation) SetStackClaims(v []StackClaim) {
|
|
o.StackClaims = v
|
|
}
|
|
|
|
// GetUserId returns the UserId field value if set, zero value otherwise.
|
|
func (o *Invitation) GetUserId() string {
|
|
if o == nil || IsNil(o.UserId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UserId
|
|
}
|
|
|
|
// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetUserIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UserId) {
|
|
return nil, false
|
|
}
|
|
return o.UserId, true
|
|
}
|
|
|
|
// HasUserId returns a boolean if a field has been set.
|
|
func (o *Invitation) HasUserId() bool {
|
|
if o != nil && !IsNil(o.UserId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserId gets a reference to the given string and assigns it to the UserId field.
|
|
func (o *Invitation) SetUserId(v string) {
|
|
o.UserId = &v
|
|
}
|
|
|
|
// GetOrganizationAccess returns the OrganizationAccess field value if set, zero value otherwise.
|
|
func (o *Invitation) GetOrganizationAccess() OrganizationUser {
|
|
if o == nil || IsNil(o.OrganizationAccess) {
|
|
var ret OrganizationUser
|
|
return ret
|
|
}
|
|
return *o.OrganizationAccess
|
|
}
|
|
|
|
// GetOrganizationAccessOk returns a tuple with the OrganizationAccess field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Invitation) GetOrganizationAccessOk() (*OrganizationUser, bool) {
|
|
if o == nil || IsNil(o.OrganizationAccess) {
|
|
return nil, false
|
|
}
|
|
return o.OrganizationAccess, true
|
|
}
|
|
|
|
// HasOrganizationAccess returns a boolean if a field has been set.
|
|
func (o *Invitation) HasOrganizationAccess() bool {
|
|
if o != nil && !IsNil(o.OrganizationAccess) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrganizationAccess gets a reference to the given OrganizationUser and assigns it to the OrganizationAccess field.
|
|
func (o *Invitation) SetOrganizationAccess(v OrganizationUser) {
|
|
o.OrganizationAccess = &v
|
|
}
|
|
|
|
func (o Invitation) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Invitation) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["id"] = o.Id
|
|
toSerialize["organizationId"] = o.OrganizationId
|
|
toSerialize["userEmail"] = o.UserEmail
|
|
toSerialize["status"] = o.Status
|
|
toSerialize["creationDate"] = o.CreationDate
|
|
if !IsNil(o.UpdatedAt) {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
toSerialize["role"] = o.Role
|
|
if !IsNil(o.StackClaims) {
|
|
toSerialize["stackClaims"] = o.StackClaims
|
|
}
|
|
if !IsNil(o.UserId) {
|
|
toSerialize["userId"] = o.UserId
|
|
}
|
|
if !IsNil(o.OrganizationAccess) {
|
|
toSerialize["organizationAccess"] = o.OrganizationAccess
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableInvitation struct {
|
|
value *Invitation
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableInvitation) Get() *Invitation {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableInvitation) Set(val *Invitation) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableInvitation) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableInvitation) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableInvitation(val *Invitation) *NullableInvitation {
|
|
return &NullableInvitation{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableInvitation) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableInvitation) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|