mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 17:55:24 +02:00
443 lines
14 KiB
Go
443 lines
14 KiB
Go
/*
|
|
Libre Graph API
|
|
|
|
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
|
|
|
|
API version: v1.0.4
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package libregraph
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// checks if the AppRoleAssignment type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AppRoleAssignment{}
|
|
|
|
// AppRoleAssignment struct for AppRoleAssignment
|
|
type AppRoleAssignment struct {
|
|
// The unique identifier for the object. 12345678-9abc-def0-1234-56789abcde. The value of the ID property is often, but not exclusively, in the form of a GUID. The value should be treated as an opaque identifier and not based in being a GUID. Null values are not allowed. Read-only.
|
|
Id *string `json:"id,omitempty"`
|
|
DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"`
|
|
// The identifier (id) for the app role which is assigned to the user. Required on create.
|
|
AppRoleId string `json:"appRoleId"`
|
|
// The time when the app role assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.
|
|
CreatedDateTime NullableTime `json:"createdDateTime,omitempty"`
|
|
// The display name of the user, group, or service principal that was granted the app role assignment. Read-only.
|
|
PrincipalDisplayName NullableString `json:"principalDisplayName,omitempty"`
|
|
// The unique identifier (id) for the user, security group, or service principal being granted the app role. Security groups with dynamic memberships are supported. Required on create.
|
|
PrincipalId NullableString `json:"principalId"`
|
|
// The type of the assigned principal. This can either be User, Group, or ServicePrincipal. Read-only.
|
|
PrincipalType NullableString `json:"principalType,omitempty"`
|
|
// The display name of the resource app's service principal to which the assignment is made.
|
|
ResourceDisplayName NullableString `json:"resourceDisplayName,omitempty"`
|
|
// The unique identifier (id) for the resource service principal for which the assignment is made. Required on create.
|
|
ResourceId NullableString `json:"resourceId"`
|
|
}
|
|
|
|
// NewAppRoleAssignment instantiates a new AppRoleAssignment 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 NewAppRoleAssignment(appRoleId string, principalId NullableString, resourceId NullableString) *AppRoleAssignment {
|
|
this := AppRoleAssignment{}
|
|
this.AppRoleId = appRoleId
|
|
this.PrincipalId = principalId
|
|
this.ResourceId = resourceId
|
|
return &this
|
|
}
|
|
|
|
// NewAppRoleAssignmentWithDefaults instantiates a new AppRoleAssignment 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 NewAppRoleAssignmentWithDefaults() *AppRoleAssignment {
|
|
this := AppRoleAssignment{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *AppRoleAssignment) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AppRoleAssignment) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *AppRoleAssignment) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *AppRoleAssignment) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetDeletedDateTime returns the DeletedDateTime field value if set, zero value otherwise.
|
|
func (o *AppRoleAssignment) GetDeletedDateTime() time.Time {
|
|
if o == nil || IsNil(o.DeletedDateTime) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.DeletedDateTime
|
|
}
|
|
|
|
// GetDeletedDateTimeOk returns a tuple with the DeletedDateTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AppRoleAssignment) GetDeletedDateTimeOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.DeletedDateTime) {
|
|
return nil, false
|
|
}
|
|
return o.DeletedDateTime, true
|
|
}
|
|
|
|
// HasDeletedDateTime returns a boolean if a field has been set.
|
|
func (o *AppRoleAssignment) HasDeletedDateTime() bool {
|
|
if o != nil && !IsNil(o.DeletedDateTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeletedDateTime gets a reference to the given time.Time and assigns it to the DeletedDateTime field.
|
|
func (o *AppRoleAssignment) SetDeletedDateTime(v time.Time) {
|
|
o.DeletedDateTime = &v
|
|
}
|
|
|
|
// GetAppRoleId returns the AppRoleId field value
|
|
func (o *AppRoleAssignment) GetAppRoleId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.AppRoleId
|
|
}
|
|
|
|
// GetAppRoleIdOk returns a tuple with the AppRoleId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AppRoleAssignment) GetAppRoleIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.AppRoleId, true
|
|
}
|
|
|
|
// SetAppRoleId sets field value
|
|
func (o *AppRoleAssignment) SetAppRoleId(v string) {
|
|
o.AppRoleId = v
|
|
}
|
|
|
|
// GetCreatedDateTime returns the CreatedDateTime field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AppRoleAssignment) GetCreatedDateTime() time.Time {
|
|
if o == nil || IsNil(o.CreatedDateTime.Get()) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.CreatedDateTime.Get()
|
|
}
|
|
|
|
// GetCreatedDateTimeOk returns a tuple with the CreatedDateTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AppRoleAssignment) GetCreatedDateTimeOk() (*time.Time, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.CreatedDateTime.Get(), o.CreatedDateTime.IsSet()
|
|
}
|
|
|
|
// HasCreatedDateTime returns a boolean if a field has been set.
|
|
func (o *AppRoleAssignment) HasCreatedDateTime() bool {
|
|
if o != nil && o.CreatedDateTime.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedDateTime gets a reference to the given NullableTime and assigns it to the CreatedDateTime field.
|
|
func (o *AppRoleAssignment) SetCreatedDateTime(v time.Time) {
|
|
o.CreatedDateTime.Set(&v)
|
|
}
|
|
|
|
// SetCreatedDateTimeNil sets the value for CreatedDateTime to be an explicit nil
|
|
func (o *AppRoleAssignment) SetCreatedDateTimeNil() {
|
|
o.CreatedDateTime.Set(nil)
|
|
}
|
|
|
|
// UnsetCreatedDateTime ensures that no value is present for CreatedDateTime, not even an explicit nil
|
|
func (o *AppRoleAssignment) UnsetCreatedDateTime() {
|
|
o.CreatedDateTime.Unset()
|
|
}
|
|
|
|
// GetPrincipalDisplayName returns the PrincipalDisplayName field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AppRoleAssignment) GetPrincipalDisplayName() string {
|
|
if o == nil || IsNil(o.PrincipalDisplayName.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PrincipalDisplayName.Get()
|
|
}
|
|
|
|
// GetPrincipalDisplayNameOk returns a tuple with the PrincipalDisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AppRoleAssignment) GetPrincipalDisplayNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.PrincipalDisplayName.Get(), o.PrincipalDisplayName.IsSet()
|
|
}
|
|
|
|
// HasPrincipalDisplayName returns a boolean if a field has been set.
|
|
func (o *AppRoleAssignment) HasPrincipalDisplayName() bool {
|
|
if o != nil && o.PrincipalDisplayName.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrincipalDisplayName gets a reference to the given NullableString and assigns it to the PrincipalDisplayName field.
|
|
func (o *AppRoleAssignment) SetPrincipalDisplayName(v string) {
|
|
o.PrincipalDisplayName.Set(&v)
|
|
}
|
|
|
|
// SetPrincipalDisplayNameNil sets the value for PrincipalDisplayName to be an explicit nil
|
|
func (o *AppRoleAssignment) SetPrincipalDisplayNameNil() {
|
|
o.PrincipalDisplayName.Set(nil)
|
|
}
|
|
|
|
// UnsetPrincipalDisplayName ensures that no value is present for PrincipalDisplayName, not even an explicit nil
|
|
func (o *AppRoleAssignment) UnsetPrincipalDisplayName() {
|
|
o.PrincipalDisplayName.Unset()
|
|
}
|
|
|
|
// GetPrincipalId returns the PrincipalId field value
|
|
// If the value is explicit nil, the zero value for string will be returned
|
|
func (o *AppRoleAssignment) GetPrincipalId() string {
|
|
if o == nil || o.PrincipalId.Get() == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return *o.PrincipalId.Get()
|
|
}
|
|
|
|
// GetPrincipalIdOk returns a tuple with the PrincipalId field value
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AppRoleAssignment) GetPrincipalIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.PrincipalId.Get(), o.PrincipalId.IsSet()
|
|
}
|
|
|
|
// SetPrincipalId sets field value
|
|
func (o *AppRoleAssignment) SetPrincipalId(v string) {
|
|
o.PrincipalId.Set(&v)
|
|
}
|
|
|
|
// GetPrincipalType returns the PrincipalType field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AppRoleAssignment) GetPrincipalType() string {
|
|
if o == nil || IsNil(o.PrincipalType.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PrincipalType.Get()
|
|
}
|
|
|
|
// GetPrincipalTypeOk returns a tuple with the PrincipalType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AppRoleAssignment) GetPrincipalTypeOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.PrincipalType.Get(), o.PrincipalType.IsSet()
|
|
}
|
|
|
|
// HasPrincipalType returns a boolean if a field has been set.
|
|
func (o *AppRoleAssignment) HasPrincipalType() bool {
|
|
if o != nil && o.PrincipalType.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrincipalType gets a reference to the given NullableString and assigns it to the PrincipalType field.
|
|
func (o *AppRoleAssignment) SetPrincipalType(v string) {
|
|
o.PrincipalType.Set(&v)
|
|
}
|
|
|
|
// SetPrincipalTypeNil sets the value for PrincipalType to be an explicit nil
|
|
func (o *AppRoleAssignment) SetPrincipalTypeNil() {
|
|
o.PrincipalType.Set(nil)
|
|
}
|
|
|
|
// UnsetPrincipalType ensures that no value is present for PrincipalType, not even an explicit nil
|
|
func (o *AppRoleAssignment) UnsetPrincipalType() {
|
|
o.PrincipalType.Unset()
|
|
}
|
|
|
|
// GetResourceDisplayName returns the ResourceDisplayName field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AppRoleAssignment) GetResourceDisplayName() string {
|
|
if o == nil || IsNil(o.ResourceDisplayName.Get()) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ResourceDisplayName.Get()
|
|
}
|
|
|
|
// GetResourceDisplayNameOk returns a tuple with the ResourceDisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AppRoleAssignment) GetResourceDisplayNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.ResourceDisplayName.Get(), o.ResourceDisplayName.IsSet()
|
|
}
|
|
|
|
// HasResourceDisplayName returns a boolean if a field has been set.
|
|
func (o *AppRoleAssignment) HasResourceDisplayName() bool {
|
|
if o != nil && o.ResourceDisplayName.IsSet() {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResourceDisplayName gets a reference to the given NullableString and assigns it to the ResourceDisplayName field.
|
|
func (o *AppRoleAssignment) SetResourceDisplayName(v string) {
|
|
o.ResourceDisplayName.Set(&v)
|
|
}
|
|
|
|
// SetResourceDisplayNameNil sets the value for ResourceDisplayName to be an explicit nil
|
|
func (o *AppRoleAssignment) SetResourceDisplayNameNil() {
|
|
o.ResourceDisplayName.Set(nil)
|
|
}
|
|
|
|
// UnsetResourceDisplayName ensures that no value is present for ResourceDisplayName, not even an explicit nil
|
|
func (o *AppRoleAssignment) UnsetResourceDisplayName() {
|
|
o.ResourceDisplayName.Unset()
|
|
}
|
|
|
|
// GetResourceId returns the ResourceId field value
|
|
// If the value is explicit nil, the zero value for string will be returned
|
|
func (o *AppRoleAssignment) GetResourceId() string {
|
|
if o == nil || o.ResourceId.Get() == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return *o.ResourceId.Get()
|
|
}
|
|
|
|
// GetResourceIdOk returns a tuple with the ResourceId field value
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AppRoleAssignment) GetResourceIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.ResourceId.Get(), o.ResourceId.IsSet()
|
|
}
|
|
|
|
// SetResourceId sets field value
|
|
func (o *AppRoleAssignment) SetResourceId(v string) {
|
|
o.ResourceId.Set(&v)
|
|
}
|
|
|
|
func (o AppRoleAssignment) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AppRoleAssignment) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.DeletedDateTime) {
|
|
toSerialize["deletedDateTime"] = o.DeletedDateTime
|
|
}
|
|
toSerialize["appRoleId"] = o.AppRoleId
|
|
if o.CreatedDateTime.IsSet() {
|
|
toSerialize["createdDateTime"] = o.CreatedDateTime.Get()
|
|
}
|
|
if o.PrincipalDisplayName.IsSet() {
|
|
toSerialize["principalDisplayName"] = o.PrincipalDisplayName.Get()
|
|
}
|
|
toSerialize["principalId"] = o.PrincipalId.Get()
|
|
if o.PrincipalType.IsSet() {
|
|
toSerialize["principalType"] = o.PrincipalType.Get()
|
|
}
|
|
if o.ResourceDisplayName.IsSet() {
|
|
toSerialize["resourceDisplayName"] = o.ResourceDisplayName.Get()
|
|
}
|
|
toSerialize["resourceId"] = o.ResourceId.Get()
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableAppRoleAssignment struct {
|
|
value *AppRoleAssignment
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAppRoleAssignment) Get() *AppRoleAssignment {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAppRoleAssignment) Set(val *AppRoleAssignment) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAppRoleAssignment) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAppRoleAssignment) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAppRoleAssignment(val *AppRoleAssignment) *NullableAppRoleAssignment {
|
|
return &NullableAppRoleAssignment{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAppRoleAssignment) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAppRoleAssignment) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|