/* Libre Graph API Libre Graph is a free API for cloud collaboration inspired by the MS Graph API. API version: v1.0.8 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package libregraph import ( "encoding/json" ) // checks if the Invitation type satisfies the MappedNullable interface at compile time var _ MappedNullable = &Invitation{} // Invitation Represents an invitation to a drive item. type Invitation struct { // The display name of the user being invited. InvitedUserDisplayName *string `json:"invitedUserDisplayName,omitempty"` // The email address of the user being invited. Required. InvitedUserEmailAddress *string `json:"invitedUserEmailAddress,omitempty"` InvitedUserMessageInfo *InvitedUserMessageInfo `json:"invitedUserMessageInfo,omitempty"` // Indicates whether an invitation message should be sent to the user. SendInvitationMessage *bool `json:"sendInvitationMessage,omitempty"` // The URL to which the user is redirected after accepting the invitation. Required. InviteRedirectUrl *string `json:"inviteRedirectUrl,omitempty"` // The URL that the user can use to redeem the invitation. Read-only. InviteRedeemUrl *string `json:"inviteRedeemUrl,omitempty"` // The status of the invitation. Read-only. Status *string `json:"status,omitempty"` InvitedUser *User `json:"invitedUser,omitempty"` // The type of user being invited. InvitedUserType *string `json:"invitedUserType,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() *Invitation { this := Invitation{} 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{} return &this } // GetInvitedUserDisplayName returns the InvitedUserDisplayName field value if set, zero value otherwise. func (o *Invitation) GetInvitedUserDisplayName() string { if o == nil || IsNil(o.InvitedUserDisplayName) { var ret string return ret } return *o.InvitedUserDisplayName } // GetInvitedUserDisplayNameOk returns a tuple with the InvitedUserDisplayName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetInvitedUserDisplayNameOk() (*string, bool) { if o == nil || IsNil(o.InvitedUserDisplayName) { return nil, false } return o.InvitedUserDisplayName, true } // HasInvitedUserDisplayName returns a boolean if a field has been set. func (o *Invitation) HasInvitedUserDisplayName() bool { if o != nil && !IsNil(o.InvitedUserDisplayName) { return true } return false } // SetInvitedUserDisplayName gets a reference to the given string and assigns it to the InvitedUserDisplayName field. func (o *Invitation) SetInvitedUserDisplayName(v string) { o.InvitedUserDisplayName = &v } // GetInvitedUserEmailAddress returns the InvitedUserEmailAddress field value if set, zero value otherwise. func (o *Invitation) GetInvitedUserEmailAddress() string { if o == nil || IsNil(o.InvitedUserEmailAddress) { var ret string return ret } return *o.InvitedUserEmailAddress } // GetInvitedUserEmailAddressOk returns a tuple with the InvitedUserEmailAddress field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetInvitedUserEmailAddressOk() (*string, bool) { if o == nil || IsNil(o.InvitedUserEmailAddress) { return nil, false } return o.InvitedUserEmailAddress, true } // HasInvitedUserEmailAddress returns a boolean if a field has been set. func (o *Invitation) HasInvitedUserEmailAddress() bool { if o != nil && !IsNil(o.InvitedUserEmailAddress) { return true } return false } // SetInvitedUserEmailAddress gets a reference to the given string and assigns it to the InvitedUserEmailAddress field. func (o *Invitation) SetInvitedUserEmailAddress(v string) { o.InvitedUserEmailAddress = &v } // GetInvitedUserMessageInfo returns the InvitedUserMessageInfo field value if set, zero value otherwise. func (o *Invitation) GetInvitedUserMessageInfo() InvitedUserMessageInfo { if o == nil || IsNil(o.InvitedUserMessageInfo) { var ret InvitedUserMessageInfo return ret } return *o.InvitedUserMessageInfo } // GetInvitedUserMessageInfoOk returns a tuple with the InvitedUserMessageInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetInvitedUserMessageInfoOk() (*InvitedUserMessageInfo, bool) { if o == nil || IsNil(o.InvitedUserMessageInfo) { return nil, false } return o.InvitedUserMessageInfo, true } // HasInvitedUserMessageInfo returns a boolean if a field has been set. func (o *Invitation) HasInvitedUserMessageInfo() bool { if o != nil && !IsNil(o.InvitedUserMessageInfo) { return true } return false } // SetInvitedUserMessageInfo gets a reference to the given InvitedUserMessageInfo and assigns it to the InvitedUserMessageInfo field. func (o *Invitation) SetInvitedUserMessageInfo(v InvitedUserMessageInfo) { o.InvitedUserMessageInfo = &v } // GetSendInvitationMessage returns the SendInvitationMessage field value if set, zero value otherwise. func (o *Invitation) GetSendInvitationMessage() bool { if o == nil || IsNil(o.SendInvitationMessage) { var ret bool return ret } return *o.SendInvitationMessage } // GetSendInvitationMessageOk returns a tuple with the SendInvitationMessage field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetSendInvitationMessageOk() (*bool, bool) { if o == nil || IsNil(o.SendInvitationMessage) { return nil, false } return o.SendInvitationMessage, true } // HasSendInvitationMessage returns a boolean if a field has been set. func (o *Invitation) HasSendInvitationMessage() bool { if o != nil && !IsNil(o.SendInvitationMessage) { return true } return false } // SetSendInvitationMessage gets a reference to the given bool and assigns it to the SendInvitationMessage field. func (o *Invitation) SetSendInvitationMessage(v bool) { o.SendInvitationMessage = &v } // GetInviteRedirectUrl returns the InviteRedirectUrl field value if set, zero value otherwise. func (o *Invitation) GetInviteRedirectUrl() string { if o == nil || IsNil(o.InviteRedirectUrl) { var ret string return ret } return *o.InviteRedirectUrl } // GetInviteRedirectUrlOk returns a tuple with the InviteRedirectUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetInviteRedirectUrlOk() (*string, bool) { if o == nil || IsNil(o.InviteRedirectUrl) { return nil, false } return o.InviteRedirectUrl, true } // HasInviteRedirectUrl returns a boolean if a field has been set. func (o *Invitation) HasInviteRedirectUrl() bool { if o != nil && !IsNil(o.InviteRedirectUrl) { return true } return false } // SetInviteRedirectUrl gets a reference to the given string and assigns it to the InviteRedirectUrl field. func (o *Invitation) SetInviteRedirectUrl(v string) { o.InviteRedirectUrl = &v } // GetInviteRedeemUrl returns the InviteRedeemUrl field value if set, zero value otherwise. func (o *Invitation) GetInviteRedeemUrl() string { if o == nil || IsNil(o.InviteRedeemUrl) { var ret string return ret } return *o.InviteRedeemUrl } // GetInviteRedeemUrlOk returns a tuple with the InviteRedeemUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetInviteRedeemUrlOk() (*string, bool) { if o == nil || IsNil(o.InviteRedeemUrl) { return nil, false } return o.InviteRedeemUrl, true } // HasInviteRedeemUrl returns a boolean if a field has been set. func (o *Invitation) HasInviteRedeemUrl() bool { if o != nil && !IsNil(o.InviteRedeemUrl) { return true } return false } // SetInviteRedeemUrl gets a reference to the given string and assigns it to the InviteRedeemUrl field. func (o *Invitation) SetInviteRedeemUrl(v string) { o.InviteRedeemUrl = &v } // GetStatus returns the Status field value if set, zero value otherwise. func (o *Invitation) GetStatus() string { if o == nil || IsNil(o.Status) { var ret string return ret } return *o.Status } // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetStatusOk() (*string, bool) { if o == nil || IsNil(o.Status) { return nil, false } return o.Status, true } // HasStatus returns a boolean if a field has been set. func (o *Invitation) HasStatus() bool { if o != nil && !IsNil(o.Status) { return true } return false } // SetStatus gets a reference to the given string and assigns it to the Status field. func (o *Invitation) SetStatus(v string) { o.Status = &v } // GetInvitedUser returns the InvitedUser field value if set, zero value otherwise. func (o *Invitation) GetInvitedUser() User { if o == nil || IsNil(o.InvitedUser) { var ret User return ret } return *o.InvitedUser } // GetInvitedUserOk returns a tuple with the InvitedUser field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetInvitedUserOk() (*User, bool) { if o == nil || IsNil(o.InvitedUser) { return nil, false } return o.InvitedUser, true } // HasInvitedUser returns a boolean if a field has been set. func (o *Invitation) HasInvitedUser() bool { if o != nil && !IsNil(o.InvitedUser) { return true } return false } // SetInvitedUser gets a reference to the given User and assigns it to the InvitedUser field. func (o *Invitation) SetInvitedUser(v User) { o.InvitedUser = &v } // GetInvitedUserType returns the InvitedUserType field value if set, zero value otherwise. func (o *Invitation) GetInvitedUserType() string { if o == nil || IsNil(o.InvitedUserType) { var ret string return ret } return *o.InvitedUserType } // GetInvitedUserTypeOk returns a tuple with the InvitedUserType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Invitation) GetInvitedUserTypeOk() (*string, bool) { if o == nil || IsNil(o.InvitedUserType) { return nil, false } return o.InvitedUserType, true } // HasInvitedUserType returns a boolean if a field has been set. func (o *Invitation) HasInvitedUserType() bool { if o != nil && !IsNil(o.InvitedUserType) { return true } return false } // SetInvitedUserType gets a reference to the given string and assigns it to the InvitedUserType field. func (o *Invitation) SetInvitedUserType(v string) { o.InvitedUserType = &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{}{} if !IsNil(o.InvitedUserDisplayName) { toSerialize["invitedUserDisplayName"] = o.InvitedUserDisplayName } if !IsNil(o.InvitedUserEmailAddress) { toSerialize["invitedUserEmailAddress"] = o.InvitedUserEmailAddress } if !IsNil(o.InvitedUserMessageInfo) { toSerialize["invitedUserMessageInfo"] = o.InvitedUserMessageInfo } if !IsNil(o.SendInvitationMessage) { toSerialize["sendInvitationMessage"] = o.SendInvitationMessage } if !IsNil(o.InviteRedirectUrl) { toSerialize["inviteRedirectUrl"] = o.InviteRedirectUrl } if !IsNil(o.InviteRedeemUrl) { toSerialize["inviteRedeemUrl"] = o.InviteRedeemUrl } if !IsNil(o.Status) { toSerialize["status"] = o.Status } if !IsNil(o.InvitedUser) { toSerialize["invitedUser"] = o.InvitedUser } if !IsNil(o.InvitedUserType) { toSerialize["invitedUserType"] = o.InvitedUserType } 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) }