diff --git a/services/authorization/model_add_members_payload.go b/services/authorization/model_add_members_payload.go index 37c789b1..c0064017 100644 --- a/services/authorization/model_add_members_payload.go +++ b/services/authorization/model_add_members_payload.go @@ -10,9 +10,129 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the AddMembersPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddMembersPayload{} + +// AddMembersPayload struct for AddMembersPayload type AddMembersPayload struct { // REQUIRED Members *[]Member `json:"members"` // REQUIRED ResourceType *string `json:"resourceType"` } + +type _AddMembersPayload AddMembersPayload + +// NewAddMembersPayload instantiates a new AddMembersPayload 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 NewAddMembersPayload(members *[]Member, resourceType *string) *AddMembersPayload { + this := AddMembersPayload{} + this.Members = members + this.ResourceType = resourceType + return &this +} + +// NewAddMembersPayloadWithDefaults instantiates a new AddMembersPayload 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 NewAddMembersPayloadWithDefaults() *AddMembersPayload { + this := AddMembersPayload{} + return &this +} + +// GetMembers returns the Members field value +func (o *AddMembersPayload) GetMembers() *[]Member { + if o == nil { + var ret *[]Member + return ret + } + + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value +// and a boolean to check if the value has been set. +func (o *AddMembersPayload) GetMembersOk() (*[]Member, bool) { + if o == nil { + return nil, false + } + return o.Members, true +} + +// SetMembers sets field value +func (o *AddMembersPayload) SetMembers(v *[]Member) { + o.Members = v +} + +// GetResourceType returns the ResourceType field value +func (o *AddMembersPayload) GetResourceType() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *AddMembersPayload) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType, true +} + +// SetResourceType sets field value +func (o *AddMembersPayload) SetResourceType(v *string) { + o.ResourceType = v +} + +func (o AddMembersPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["members"] = o.Members + toSerialize["resourceType"] = o.ResourceType + return toSerialize, nil +} + +type NullableAddMembersPayload struct { + value *AddMembersPayload + isSet bool +} + +func (v NullableAddMembersPayload) Get() *AddMembersPayload { + return v.value +} + +func (v *NullableAddMembersPayload) Set(val *AddMembersPayload) { + v.value = val + v.isSet = true +} + +func (v NullableAddMembersPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableAddMembersPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddMembersPayload(val *AddMembersPayload) *NullableAddMembersPayload { + return &NullableAddMembersPayload{value: val, isSet: true} +} + +func (v NullableAddMembersPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddMembersPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_error_response.go b/services/authorization/model_error_response.go index da45f487..9c365226 100644 --- a/services/authorization/model_error_response.go +++ b/services/authorization/model_error_response.go @@ -11,9 +11,14 @@ API version: 2.0 package authorization import ( + "encoding/json" "time" ) +// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorResponse{} + +// ErrorResponse struct for ErrorResponse type ErrorResponse struct { // REQUIRED Error *string `json:"error"` @@ -26,3 +31,193 @@ type ErrorResponse struct { // REQUIRED TimeStamp *time.Time `json:"timeStamp"` } + +type _ErrorResponse ErrorResponse + +// NewErrorResponse instantiates a new ErrorResponse 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 NewErrorResponse(error_ *string, message *string, path *string, status *int64, timeStamp *time.Time) *ErrorResponse { + this := ErrorResponse{} + this.Error = error_ + this.Message = message + this.Path = path + this.Status = status + this.TimeStamp = timeStamp + return &this +} + +// NewErrorResponseWithDefaults instantiates a new ErrorResponse 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 NewErrorResponseWithDefaults() *ErrorResponse { + this := ErrorResponse{} + return &this +} + +// GetError returns the Error field value +func (o *ErrorResponse) GetError() *string { + if o == nil { + var ret *string + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Error, true +} + +// SetError sets field value +func (o *ErrorResponse) SetError(v *string) { + o.Error = v +} + +// GetMessage returns the Message field value +func (o *ErrorResponse) GetMessage() *string { + if o == nil { + var ret *string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *ErrorResponse) SetMessage(v *string) { + o.Message = v +} + +// GetPath returns the Path field value +func (o *ErrorResponse) GetPath() *string { + if o == nil { + var ret *string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path, true +} + +// SetPath sets field value +func (o *ErrorResponse) SetPath(v *string) { + o.Path = v +} + +// GetStatus returns the Status field value +func (o *ErrorResponse) GetStatus() *int64 { + if o == nil { + var ret *int64 + 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 *ErrorResponse) GetStatusOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Status, true +} + +// SetStatus sets field value +func (o *ErrorResponse) SetStatus(v *int64) { + o.Status = v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *ErrorResponse) GetTimeStamp() *time.Time { + if o == nil { + var ret *time.Time + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetTimeStampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *ErrorResponse) SetTimeStamp(v *time.Time) { + o.TimeStamp = v +} + +func (o ErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error"] = o.Error + toSerialize["message"] = o.Message + toSerialize["path"] = o.Path + toSerialize["status"] = o.Status + toSerialize["timeStamp"] = o.TimeStamp + return toSerialize, nil +} + +type NullableErrorResponse struct { + value *ErrorResponse + isSet bool +} + +func (v NullableErrorResponse) Get() *ErrorResponse { + return v.value +} + +func (v *NullableErrorResponse) Set(val *ErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { + return &NullableErrorResponse{value: val, isSet: true} +} + +func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_existing_permission.go b/services/authorization/model_existing_permission.go index 9293de85..d3ca5d34 100644 --- a/services/authorization/model_existing_permission.go +++ b/services/authorization/model_existing_permission.go @@ -10,9 +10,129 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the ExistingPermission type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExistingPermission{} + +// ExistingPermission struct for ExistingPermission type ExistingPermission struct { // REQUIRED Description *string `json:"description"` // REQUIRED Name *string `json:"name"` } + +type _ExistingPermission ExistingPermission + +// NewExistingPermission instantiates a new ExistingPermission 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 NewExistingPermission(description *string, name *string) *ExistingPermission { + this := ExistingPermission{} + this.Description = description + this.Name = name + return &this +} + +// NewExistingPermissionWithDefaults instantiates a new ExistingPermission 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 NewExistingPermissionWithDefaults() *ExistingPermission { + this := ExistingPermission{} + return &this +} + +// GetDescription returns the Description field value +func (o *ExistingPermission) GetDescription() *string { + if o == nil { + var ret *string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *ExistingPermission) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description, true +} + +// SetDescription sets field value +func (o *ExistingPermission) SetDescription(v *string) { + o.Description = v +} + +// GetName returns the Name field value +func (o *ExistingPermission) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExistingPermission) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *ExistingPermission) SetName(v *string) { + o.Name = v +} + +func (o ExistingPermission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableExistingPermission struct { + value *ExistingPermission + isSet bool +} + +func (v NullableExistingPermission) Get() *ExistingPermission { + return v.value +} + +func (v *NullableExistingPermission) Set(val *ExistingPermission) { + v.value = val + v.isSet = true +} + +func (v NullableExistingPermission) IsSet() bool { + return v.isSet +} + +func (v *NullableExistingPermission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExistingPermission(val *ExistingPermission) *NullableExistingPermission { + return &NullableExistingPermission{value: val, isSet: true} +} + +func (v NullableExistingPermission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExistingPermission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_list_members_response.go b/services/authorization/model_list_members_response.go index f12e8583..c61ce419 100644 --- a/services/authorization/model_list_members_response.go +++ b/services/authorization/model_list_members_response.go @@ -10,6 +10,14 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the ListMembersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMembersResponse{} + +// ListMembersResponse struct for ListMembersResponse type ListMembersResponse struct { // REQUIRED Members *[]Member `json:"members"` @@ -18,3 +26,141 @@ type ListMembersResponse struct { // REQUIRED ResourceType *string `json:"resourceType"` } + +type _ListMembersResponse ListMembersResponse + +// NewListMembersResponse instantiates a new ListMembersResponse 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 NewListMembersResponse(members *[]Member, resourceId *string, resourceType *string) *ListMembersResponse { + this := ListMembersResponse{} + this.Members = members + this.ResourceId = resourceId + this.ResourceType = resourceType + return &this +} + +// NewListMembersResponseWithDefaults instantiates a new ListMembersResponse 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 NewListMembersResponseWithDefaults() *ListMembersResponse { + this := ListMembersResponse{} + return &this +} + +// GetMembers returns the Members field value +func (o *ListMembersResponse) GetMembers() *[]Member { + if o == nil { + var ret *[]Member + return ret + } + + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value +// and a boolean to check if the value has been set. +func (o *ListMembersResponse) GetMembersOk() (*[]Member, bool) { + if o == nil { + return nil, false + } + return o.Members, true +} + +// SetMembers sets field value +func (o *ListMembersResponse) SetMembers(v *[]Member) { + o.Members = v +} + +// GetResourceId returns the ResourceId field value +func (o *ListMembersResponse) GetResourceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *ListMembersResponse) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceId, true +} + +// SetResourceId sets field value +func (o *ListMembersResponse) SetResourceId(v *string) { + o.ResourceId = v +} + +// GetResourceType returns the ResourceType field value +func (o *ListMembersResponse) GetResourceType() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *ListMembersResponse) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType, true +} + +// SetResourceType sets field value +func (o *ListMembersResponse) SetResourceType(v *string) { + o.ResourceType = v +} + +func (o ListMembersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["members"] = o.Members + toSerialize["resourceId"] = o.ResourceId + toSerialize["resourceType"] = o.ResourceType + return toSerialize, nil +} + +type NullableListMembersResponse struct { + value *ListMembersResponse + isSet bool +} + +func (v NullableListMembersResponse) Get() *ListMembersResponse { + return v.value +} + +func (v *NullableListMembersResponse) Set(val *ListMembersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListMembersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListMembersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMembersResponse(val *ListMembersResponse) *NullableListMembersResponse { + return &NullableListMembersResponse{value: val, isSet: true} +} + +func (v NullableListMembersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMembersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_list_permissions_response.go b/services/authorization/model_list_permissions_response.go index 66f2bc5c..0f0ef31b 100644 --- a/services/authorization/model_list_permissions_response.go +++ b/services/authorization/model_list_permissions_response.go @@ -10,7 +10,101 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the ListPermissionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPermissionsResponse{} + +// ListPermissionsResponse struct for ListPermissionsResponse type ListPermissionsResponse struct { // REQUIRED Permissions *[]Permission `json:"permissions"` } + +type _ListPermissionsResponse ListPermissionsResponse + +// NewListPermissionsResponse instantiates a new ListPermissionsResponse 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 NewListPermissionsResponse(permissions *[]Permission) *ListPermissionsResponse { + this := ListPermissionsResponse{} + this.Permissions = permissions + return &this +} + +// NewListPermissionsResponseWithDefaults instantiates a new ListPermissionsResponse 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 NewListPermissionsResponseWithDefaults() *ListPermissionsResponse { + this := ListPermissionsResponse{} + return &this +} + +// GetPermissions returns the Permissions field value +func (o *ListPermissionsResponse) GetPermissions() *[]Permission { + if o == nil { + var ret *[]Permission + return ret + } + + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value +// and a boolean to check if the value has been set. +func (o *ListPermissionsResponse) GetPermissionsOk() (*[]Permission, bool) { + if o == nil { + return nil, false + } + return o.Permissions, true +} + +// SetPermissions sets field value +func (o *ListPermissionsResponse) SetPermissions(v *[]Permission) { + o.Permissions = v +} + +func (o ListPermissionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["permissions"] = o.Permissions + return toSerialize, nil +} + +type NullableListPermissionsResponse struct { + value *ListPermissionsResponse + isSet bool +} + +func (v NullableListPermissionsResponse) Get() *ListPermissionsResponse { + return v.value +} + +func (v *NullableListPermissionsResponse) Set(val *ListPermissionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListPermissionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListPermissionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListPermissionsResponse(val *ListPermissionsResponse) *NullableListPermissionsResponse { + return &NullableListPermissionsResponse{value: val, isSet: true} +} + +func (v NullableListPermissionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListPermissionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_list_user_memberships_response.go b/services/authorization/model_list_user_memberships_response.go index 1ccf15e1..25cb6fd6 100644 --- a/services/authorization/model_list_user_memberships_response.go +++ b/services/authorization/model_list_user_memberships_response.go @@ -10,7 +10,101 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the ListUserMembershipsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUserMembershipsResponse{} + +// ListUserMembershipsResponse struct for ListUserMembershipsResponse type ListUserMembershipsResponse struct { // REQUIRED Items *[]UserMembership `json:"items"` } + +type _ListUserMembershipsResponse ListUserMembershipsResponse + +// NewListUserMembershipsResponse instantiates a new ListUserMembershipsResponse 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 NewListUserMembershipsResponse(items *[]UserMembership) *ListUserMembershipsResponse { + this := ListUserMembershipsResponse{} + this.Items = items + return &this +} + +// NewListUserMembershipsResponseWithDefaults instantiates a new ListUserMembershipsResponse 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 NewListUserMembershipsResponseWithDefaults() *ListUserMembershipsResponse { + this := ListUserMembershipsResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ListUserMembershipsResponse) GetItems() *[]UserMembership { + if o == nil { + var ret *[]UserMembership + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ListUserMembershipsResponse) GetItemsOk() (*[]UserMembership, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ListUserMembershipsResponse) SetItems(v *[]UserMembership) { + o.Items = v +} + +func (o ListUserMembershipsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableListUserMembershipsResponse struct { + value *ListUserMembershipsResponse + isSet bool +} + +func (v NullableListUserMembershipsResponse) Get() *ListUserMembershipsResponse { + return v.value +} + +func (v *NullableListUserMembershipsResponse) Set(val *ListUserMembershipsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUserMembershipsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUserMembershipsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUserMembershipsResponse(val *ListUserMembershipsResponse) *NullableListUserMembershipsResponse { + return &NullableListUserMembershipsResponse{value: val, isSet: true} +} + +func (v NullableListUserMembershipsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUserMembershipsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_list_user_permissions_response.go b/services/authorization/model_list_user_permissions_response.go index 54bf747c..c8981be6 100644 --- a/services/authorization/model_list_user_permissions_response.go +++ b/services/authorization/model_list_user_permissions_response.go @@ -10,7 +10,101 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the ListUserPermissionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUserPermissionsResponse{} + +// ListUserPermissionsResponse struct for ListUserPermissionsResponse type ListUserPermissionsResponse struct { // REQUIRED Items *[]UserPermission `json:"items"` } + +type _ListUserPermissionsResponse ListUserPermissionsResponse + +// NewListUserPermissionsResponse instantiates a new ListUserPermissionsResponse 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 NewListUserPermissionsResponse(items *[]UserPermission) *ListUserPermissionsResponse { + this := ListUserPermissionsResponse{} + this.Items = items + return &this +} + +// NewListUserPermissionsResponseWithDefaults instantiates a new ListUserPermissionsResponse 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 NewListUserPermissionsResponseWithDefaults() *ListUserPermissionsResponse { + this := ListUserPermissionsResponse{} + return &this +} + +// GetItems returns the Items field value +func (o *ListUserPermissionsResponse) GetItems() *[]UserPermission { + if o == nil { + var ret *[]UserPermission + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ListUserPermissionsResponse) GetItemsOk() (*[]UserPermission, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ListUserPermissionsResponse) SetItems(v *[]UserPermission) { + o.Items = v +} + +func (o ListUserPermissionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + return toSerialize, nil +} + +type NullableListUserPermissionsResponse struct { + value *ListUserPermissionsResponse + isSet bool +} + +func (v NullableListUserPermissionsResponse) Get() *ListUserPermissionsResponse { + return v.value +} + +func (v *NullableListUserPermissionsResponse) Set(val *ListUserPermissionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUserPermissionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUserPermissionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUserPermissionsResponse(val *ListUserPermissionsResponse) *NullableListUserPermissionsResponse { + return &NullableListUserPermissionsResponse{value: val, isSet: true} +} + +func (v NullableListUserPermissionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUserPermissionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_member.go b/services/authorization/model_member.go index ca4ddbed..f25660d7 100644 --- a/services/authorization/model_member.go +++ b/services/authorization/model_member.go @@ -10,9 +10,129 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the Member type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Member{} + +// Member struct for Member type Member struct { // REQUIRED Role *string `json:"role"` // REQUIRED Subject *string `json:"subject"` } + +type _Member Member + +// NewMember instantiates a new Member 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 NewMember(role *string, subject *string) *Member { + this := Member{} + this.Role = role + this.Subject = subject + return &this +} + +// NewMemberWithDefaults instantiates a new Member 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 NewMemberWithDefaults() *Member { + this := Member{} + return &this +} + +// GetRole returns the Role field value +func (o *Member) GetRole() *string { + if o == nil { + var ret *string + 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 *Member) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Role, true +} + +// SetRole sets field value +func (o *Member) SetRole(v *string) { + o.Role = v +} + +// GetSubject returns the Subject field value +func (o *Member) GetSubject() *string { + if o == nil { + var ret *string + return ret + } + + return o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value +// and a boolean to check if the value has been set. +func (o *Member) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Subject, true +} + +// SetSubject sets field value +func (o *Member) SetSubject(v *string) { + o.Subject = v +} + +func (o Member) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + toSerialize["subject"] = o.Subject + return toSerialize, nil +} + +type NullableMember struct { + value *Member + isSet bool +} + +func (v NullableMember) Get() *Member { + return v.value +} + +func (v *NullableMember) Set(val *Member) { + v.value = val + v.isSet = true +} + +func (v NullableMember) IsSet() bool { + return v.isSet +} + +func (v *NullableMember) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMember(val *Member) *NullableMember { + return &NullableMember{value: val, isSet: true} +} + +func (v NullableMember) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMember) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_members_response.go b/services/authorization/model_members_response.go index 061f4dcc..a60d0e4c 100644 --- a/services/authorization/model_members_response.go +++ b/services/authorization/model_members_response.go @@ -10,6 +10,14 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the MembersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MembersResponse{} + +// MembersResponse struct for MembersResponse type MembersResponse struct { // REQUIRED Members *[]Member `json:"members"` @@ -19,3 +27,176 @@ type MembersResponse struct { ResourceType *string `json:"resourceType"` WrittenAt *Zookie `json:"writtenAt,omitempty"` } + +type _MembersResponse MembersResponse + +// NewMembersResponse instantiates a new MembersResponse 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 NewMembersResponse(members *[]Member, resourceId *string, resourceType *string) *MembersResponse { + this := MembersResponse{} + this.Members = members + this.ResourceId = resourceId + this.ResourceType = resourceType + return &this +} + +// NewMembersResponseWithDefaults instantiates a new MembersResponse 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 NewMembersResponseWithDefaults() *MembersResponse { + this := MembersResponse{} + return &this +} + +// GetMembers returns the Members field value +func (o *MembersResponse) GetMembers() *[]Member { + if o == nil { + var ret *[]Member + return ret + } + + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value +// and a boolean to check if the value has been set. +func (o *MembersResponse) GetMembersOk() (*[]Member, bool) { + if o == nil { + return nil, false + } + return o.Members, true +} + +// SetMembers sets field value +func (o *MembersResponse) SetMembers(v *[]Member) { + o.Members = v +} + +// GetResourceId returns the ResourceId field value +func (o *MembersResponse) GetResourceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *MembersResponse) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceId, true +} + +// SetResourceId sets field value +func (o *MembersResponse) SetResourceId(v *string) { + o.ResourceId = v +} + +// GetResourceType returns the ResourceType field value +func (o *MembersResponse) GetResourceType() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *MembersResponse) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType, true +} + +// SetResourceType sets field value +func (o *MembersResponse) SetResourceType(v *string) { + o.ResourceType = v +} + +// GetWrittenAt returns the WrittenAt field value if set, zero value otherwise. +func (o *MembersResponse) GetWrittenAt() *Zookie { + if o == nil || IsNil(o.WrittenAt) { + var ret *Zookie + return ret + } + return o.WrittenAt +} + +// GetWrittenAtOk returns a tuple with the WrittenAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MembersResponse) GetWrittenAtOk() (*Zookie, bool) { + if o == nil || IsNil(o.WrittenAt) { + return nil, false + } + return o.WrittenAt, true +} + +// HasWrittenAt returns a boolean if a field has been set. +func (o *MembersResponse) HasWrittenAt() bool { + if o != nil && !IsNil(o.WrittenAt) { + return true + } + + return false +} + +// SetWrittenAt gets a reference to the given Zookie and assigns it to the WrittenAt field. +func (o *MembersResponse) SetWrittenAt(v *Zookie) { + o.WrittenAt = v +} + +func (o MembersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["members"] = o.Members + toSerialize["resourceId"] = o.ResourceId + toSerialize["resourceType"] = o.ResourceType + if !IsNil(o.WrittenAt) { + toSerialize["writtenAt"] = o.WrittenAt + } + return toSerialize, nil +} + +type NullableMembersResponse struct { + value *MembersResponse + isSet bool +} + +func (v NullableMembersResponse) Get() *MembersResponse { + return v.value +} + +func (v *NullableMembersResponse) Set(val *MembersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMembersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMembersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMembersResponse(val *MembersResponse) *NullableMembersResponse { + return &NullableMembersResponse{value: val, isSet: true} +} + +func (v NullableMembersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMembersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_permission.go b/services/authorization/model_permission.go index 88f8f134..ffc6788c 100644 --- a/services/authorization/model_permission.go +++ b/services/authorization/model_permission.go @@ -10,9 +10,129 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the Permission type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Permission{} + +// Permission struct for Permission type Permission struct { // REQUIRED Description *string `json:"description"` // REQUIRED Name *string `json:"name"` } + +type _Permission Permission + +// NewPermission instantiates a new Permission 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 NewPermission(description *string, name *string) *Permission { + this := Permission{} + this.Description = description + this.Name = name + return &this +} + +// NewPermissionWithDefaults instantiates a new Permission 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 NewPermissionWithDefaults() *Permission { + this := Permission{} + return &this +} + +// GetDescription returns the Description field value +func (o *Permission) GetDescription() *string { + if o == nil { + var ret *string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Permission) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description, true +} + +// SetDescription sets field value +func (o *Permission) SetDescription(v *string) { + o.Description = v +} + +// GetName returns the Name field value +func (o *Permission) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Permission) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Permission) SetName(v *string) { + o.Name = v +} + +func (o Permission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullablePermission struct { + value *Permission + isSet bool +} + +func (v NullablePermission) Get() *Permission { + return v.value +} + +func (v *NullablePermission) Set(val *Permission) { + v.value = val + v.isSet = true +} + +func (v NullablePermission) IsSet() bool { + return v.isSet +} + +func (v *NullablePermission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePermission(val *Permission) *NullablePermission { + return &NullablePermission{value: val, isSet: true} +} + +func (v NullablePermission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePermission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_remove_members_payload.go b/services/authorization/model_remove_members_payload.go index 369aeed1..8fd7ec5b 100644 --- a/services/authorization/model_remove_members_payload.go +++ b/services/authorization/model_remove_members_payload.go @@ -10,6 +10,14 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the RemoveMembersPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoveMembersPayload{} + +// RemoveMembersPayload struct for RemoveMembersPayload type RemoveMembersPayload struct { ForceRemove *bool `json:"forceRemove,omitempty"` // REQUIRED @@ -17,3 +25,150 @@ type RemoveMembersPayload struct { // REQUIRED ResourceType *string `json:"resourceType"` } + +type _RemoveMembersPayload RemoveMembersPayload + +// NewRemoveMembersPayload instantiates a new RemoveMembersPayload 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 NewRemoveMembersPayload(members *[]Member, resourceType *string) *RemoveMembersPayload { + this := RemoveMembersPayload{} + this.Members = members + this.ResourceType = resourceType + return &this +} + +// NewRemoveMembersPayloadWithDefaults instantiates a new RemoveMembersPayload 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 NewRemoveMembersPayloadWithDefaults() *RemoveMembersPayload { + this := RemoveMembersPayload{} + return &this +} + +// GetForceRemove returns the ForceRemove field value if set, zero value otherwise. +func (o *RemoveMembersPayload) GetForceRemove() *bool { + if o == nil || IsNil(o.ForceRemove) { + var ret *bool + return ret + } + return o.ForceRemove +} + +// GetForceRemoveOk returns a tuple with the ForceRemove field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoveMembersPayload) GetForceRemoveOk() (*bool, bool) { + if o == nil || IsNil(o.ForceRemove) { + return nil, false + } + return o.ForceRemove, true +} + +// HasForceRemove returns a boolean if a field has been set. +func (o *RemoveMembersPayload) HasForceRemove() bool { + if o != nil && !IsNil(o.ForceRemove) { + return true + } + + return false +} + +// SetForceRemove gets a reference to the given bool and assigns it to the ForceRemove field. +func (o *RemoveMembersPayload) SetForceRemove(v *bool) { + o.ForceRemove = v +} + +// GetMembers returns the Members field value +func (o *RemoveMembersPayload) GetMembers() *[]Member { + if o == nil { + var ret *[]Member + return ret + } + + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value +// and a boolean to check if the value has been set. +func (o *RemoveMembersPayload) GetMembersOk() (*[]Member, bool) { + if o == nil { + return nil, false + } + return o.Members, true +} + +// SetMembers sets field value +func (o *RemoveMembersPayload) SetMembers(v *[]Member) { + o.Members = v +} + +// GetResourceType returns the ResourceType field value +func (o *RemoveMembersPayload) GetResourceType() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *RemoveMembersPayload) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType, true +} + +// SetResourceType sets field value +func (o *RemoveMembersPayload) SetResourceType(v *string) { + o.ResourceType = v +} + +func (o RemoveMembersPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ForceRemove) { + toSerialize["forceRemove"] = o.ForceRemove + } + toSerialize["members"] = o.Members + toSerialize["resourceType"] = o.ResourceType + return toSerialize, nil +} + +type NullableRemoveMembersPayload struct { + value *RemoveMembersPayload + isSet bool +} + +func (v NullableRemoveMembersPayload) Get() *RemoveMembersPayload { + return v.value +} + +func (v *NullableRemoveMembersPayload) Set(val *RemoveMembersPayload) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveMembersPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveMembersPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveMembersPayload(val *RemoveMembersPayload) *NullableRemoveMembersPayload { + return &NullableRemoveMembersPayload{value: val, isSet: true} +} + +func (v NullableRemoveMembersPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveMembersPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_role.go b/services/authorization/model_role.go index bbf953fa..e9652760 100644 --- a/services/authorization/model_role.go +++ b/services/authorization/model_role.go @@ -10,6 +10,14 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the Role type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Role{} + +// Role struct for Role type Role struct { // REQUIRED Description *string `json:"description"` @@ -19,3 +27,176 @@ type Role struct { // REQUIRED Permissions *[]Permission `json:"permissions"` } + +type _Role Role + +// NewRole instantiates a new Role 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 NewRole(description *string, name *string, permissions *[]Permission) *Role { + this := Role{} + this.Description = description + this.Name = name + this.Permissions = permissions + return &this +} + +// NewRoleWithDefaults instantiates a new Role 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 NewRoleWithDefaults() *Role { + this := Role{} + return &this +} + +// GetDescription returns the Description field value +func (o *Role) GetDescription() *string { + if o == nil { + var ret *string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Role) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description, true +} + +// SetDescription sets field value +func (o *Role) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Role) 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 *Role) 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 *Role) 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 *Role) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Role) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Role) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *Role) SetName(v *string) { + o.Name = v +} + +// GetPermissions returns the Permissions field value +func (o *Role) GetPermissions() *[]Permission { + if o == nil { + var ret *[]Permission + return ret + } + + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value +// and a boolean to check if the value has been set. +func (o *Role) GetPermissionsOk() (*[]Permission, bool) { + if o == nil { + return nil, false + } + return o.Permissions, true +} + +// SetPermissions sets field value +func (o *Role) SetPermissions(v *[]Permission) { + o.Permissions = v +} + +func (o Role) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + toSerialize["permissions"] = o.Permissions + return toSerialize, nil +} + +type NullableRole struct { + value *Role + isSet bool +} + +func (v NullableRole) Get() *Role { + return v.value +} + +func (v *NullableRole) Set(val *Role) { + v.value = val + v.isSet = true +} + +func (v NullableRole) IsSet() bool { + return v.isSet +} + +func (v *NullableRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRole(val *Role) *NullableRole { + return &NullableRole{value: val, isSet: true} +} + +func (v NullableRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_roles_response.go b/services/authorization/model_roles_response.go index 191ab1b6..b6f9afe5 100644 --- a/services/authorization/model_roles_response.go +++ b/services/authorization/model_roles_response.go @@ -10,6 +10,14 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the RolesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RolesResponse{} + +// RolesResponse struct for RolesResponse type RolesResponse struct { // REQUIRED ResourceId *string `json:"resourceId"` @@ -18,3 +26,141 @@ type RolesResponse struct { // REQUIRED Roles *[]Role `json:"roles"` } + +type _RolesResponse RolesResponse + +// NewRolesResponse instantiates a new RolesResponse 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 NewRolesResponse(resourceId *string, resourceType *string, roles *[]Role) *RolesResponse { + this := RolesResponse{} + this.ResourceId = resourceId + this.ResourceType = resourceType + this.Roles = roles + return &this +} + +// NewRolesResponseWithDefaults instantiates a new RolesResponse 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 NewRolesResponseWithDefaults() *RolesResponse { + this := RolesResponse{} + return &this +} + +// GetResourceId returns the ResourceId field value +func (o *RolesResponse) GetResourceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *RolesResponse) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceId, true +} + +// SetResourceId sets field value +func (o *RolesResponse) SetResourceId(v *string) { + o.ResourceId = v +} + +// GetResourceType returns the ResourceType field value +func (o *RolesResponse) GetResourceType() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *RolesResponse) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType, true +} + +// SetResourceType sets field value +func (o *RolesResponse) SetResourceType(v *string) { + o.ResourceType = v +} + +// GetRoles returns the Roles field value +func (o *RolesResponse) GetRoles() *[]Role { + if o == nil { + var ret *[]Role + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *RolesResponse) GetRolesOk() (*[]Role, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *RolesResponse) SetRoles(v *[]Role) { + o.Roles = v +} + +func (o RolesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["resourceId"] = o.ResourceId + toSerialize["resourceType"] = o.ResourceType + toSerialize["roles"] = o.Roles + return toSerialize, nil +} + +type NullableRolesResponse struct { + value *RolesResponse + isSet bool +} + +func (v NullableRolesResponse) Get() *RolesResponse { + return v.value +} + +func (v *NullableRolesResponse) Set(val *RolesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRolesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRolesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRolesResponse(val *RolesResponse) *NullableRolesResponse { + return &NullableRolesResponse{value: val, isSet: true} +} + +func (v NullableRolesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRolesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_user_membership.go b/services/authorization/model_user_membership.go index b8f2f20e..b377a41c 100644 --- a/services/authorization/model_user_membership.go +++ b/services/authorization/model_user_membership.go @@ -10,6 +10,14 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the UserMembership type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserMembership{} + +// UserMembership struct for UserMembership type UserMembership struct { // REQUIRED ResourceId *string `json:"resourceId"` @@ -20,3 +28,167 @@ type UserMembership struct { // REQUIRED Subject *string `json:"subject"` } + +type _UserMembership UserMembership + +// NewUserMembership instantiates a new UserMembership 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 NewUserMembership(resourceId *string, resourceType *string, role *string, subject *string) *UserMembership { + this := UserMembership{} + this.ResourceId = resourceId + this.ResourceType = resourceType + this.Role = role + this.Subject = subject + return &this +} + +// NewUserMembershipWithDefaults instantiates a new UserMembership 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 NewUserMembershipWithDefaults() *UserMembership { + this := UserMembership{} + return &this +} + +// GetResourceId returns the ResourceId field value +func (o *UserMembership) GetResourceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *UserMembership) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceId, true +} + +// SetResourceId sets field value +func (o *UserMembership) SetResourceId(v *string) { + o.ResourceId = v +} + +// GetResourceType returns the ResourceType field value +func (o *UserMembership) GetResourceType() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *UserMembership) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType, true +} + +// SetResourceType sets field value +func (o *UserMembership) SetResourceType(v *string) { + o.ResourceType = v +} + +// GetRole returns the Role field value +func (o *UserMembership) GetRole() *string { + if o == nil { + var ret *string + 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 *UserMembership) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Role, true +} + +// SetRole sets field value +func (o *UserMembership) SetRole(v *string) { + o.Role = v +} + +// GetSubject returns the Subject field value +func (o *UserMembership) GetSubject() *string { + if o == nil { + var ret *string + return ret + } + + return o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value +// and a boolean to check if the value has been set. +func (o *UserMembership) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Subject, true +} + +// SetSubject sets field value +func (o *UserMembership) SetSubject(v *string) { + o.Subject = v +} + +func (o UserMembership) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["resourceId"] = o.ResourceId + toSerialize["resourceType"] = o.ResourceType + toSerialize["role"] = o.Role + toSerialize["subject"] = o.Subject + return toSerialize, nil +} + +type NullableUserMembership struct { + value *UserMembership + isSet bool +} + +func (v NullableUserMembership) Get() *UserMembership { + return v.value +} + +func (v *NullableUserMembership) Set(val *UserMembership) { + v.value = val + v.isSet = true +} + +func (v NullableUserMembership) IsSet() bool { + return v.isSet +} + +func (v *NullableUserMembership) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserMembership(val *UserMembership) *NullableUserMembership { + return &NullableUserMembership{value: val, isSet: true} +} + +func (v NullableUserMembership) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserMembership) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_user_permission.go b/services/authorization/model_user_permission.go index c29c3514..d734f16f 100644 --- a/services/authorization/model_user_permission.go +++ b/services/authorization/model_user_permission.go @@ -10,6 +10,14 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the UserPermission type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserPermission{} + +// UserPermission struct for UserPermission type UserPermission struct { // REQUIRED Permissions *[]ExistingPermission `json:"permissions"` @@ -18,3 +26,141 @@ type UserPermission struct { // REQUIRED ResourceType *string `json:"resourceType"` } + +type _UserPermission UserPermission + +// NewUserPermission instantiates a new UserPermission 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 NewUserPermission(permissions *[]ExistingPermission, resourceId *string, resourceType *string) *UserPermission { + this := UserPermission{} + this.Permissions = permissions + this.ResourceId = resourceId + this.ResourceType = resourceType + return &this +} + +// NewUserPermissionWithDefaults instantiates a new UserPermission 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 NewUserPermissionWithDefaults() *UserPermission { + this := UserPermission{} + return &this +} + +// GetPermissions returns the Permissions field value +func (o *UserPermission) GetPermissions() *[]ExistingPermission { + if o == nil { + var ret *[]ExistingPermission + return ret + } + + return o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value +// and a boolean to check if the value has been set. +func (o *UserPermission) GetPermissionsOk() (*[]ExistingPermission, bool) { + if o == nil { + return nil, false + } + return o.Permissions, true +} + +// SetPermissions sets field value +func (o *UserPermission) SetPermissions(v *[]ExistingPermission) { + o.Permissions = v +} + +// GetResourceId returns the ResourceId field value +func (o *UserPermission) GetResourceId() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *UserPermission) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceId, true +} + +// SetResourceId sets field value +func (o *UserPermission) SetResourceId(v *string) { + o.ResourceId = v +} + +// GetResourceType returns the ResourceType field value +func (o *UserPermission) GetResourceType() *string { + if o == nil { + var ret *string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *UserPermission) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ResourceType, true +} + +// SetResourceType sets field value +func (o *UserPermission) SetResourceType(v *string) { + o.ResourceType = v +} + +func (o UserPermission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["permissions"] = o.Permissions + toSerialize["resourceId"] = o.ResourceId + toSerialize["resourceType"] = o.ResourceType + return toSerialize, nil +} + +type NullableUserPermission struct { + value *UserPermission + isSet bool +} + +func (v NullableUserPermission) Get() *UserPermission { + return v.value +} + +func (v *NullableUserPermission) Set(val *UserPermission) { + v.value = val + v.isSet = true +} + +func (v NullableUserPermission) IsSet() bool { + return v.isSet +} + +func (v *NullableUserPermission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserPermission(val *UserPermission) *NullableUserPermission { + return &NullableUserPermission{value: val, isSet: true} +} + +func (v NullableUserPermission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserPermission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/authorization/model_zookie.go b/services/authorization/model_zookie.go index c01d3255..50373ffc 100644 --- a/services/authorization/model_zookie.go +++ b/services/authorization/model_zookie.go @@ -10,6 +10,107 @@ API version: 2.0 package authorization +import ( + "encoding/json" +) + +// checks if the Zookie type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Zookie{} + +// Zookie struct for Zookie type Zookie struct { Zookie *string `json:"zookie,omitempty"` } + +// NewZookie instantiates a new Zookie 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 NewZookie() *Zookie { + this := Zookie{} + return &this +} + +// NewZookieWithDefaults instantiates a new Zookie 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 NewZookieWithDefaults() *Zookie { + this := Zookie{} + return &this +} + +// GetZookie returns the Zookie field value if set, zero value otherwise. +func (o *Zookie) GetZookie() *string { + if o == nil || IsNil(o.Zookie) { + var ret *string + return ret + } + return o.Zookie +} + +// GetZookieOk returns a tuple with the Zookie field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Zookie) GetZookieOk() (*string, bool) { + if o == nil || IsNil(o.Zookie) { + return nil, false + } + return o.Zookie, true +} + +// HasZookie returns a boolean if a field has been set. +func (o *Zookie) HasZookie() bool { + if o != nil && !IsNil(o.Zookie) { + return true + } + + return false +} + +// SetZookie gets a reference to the given string and assigns it to the Zookie field. +func (o *Zookie) SetZookie(v *string) { + o.Zookie = v +} + +func (o Zookie) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Zookie) { + toSerialize["zookie"] = o.Zookie + } + return toSerialize, nil +} + +type NullableZookie struct { + value *Zookie + isSet bool +} + +func (v NullableZookie) Get() *Zookie { + return v.value +} + +func (v *NullableZookie) Set(val *Zookie) { + v.value = val + v.isSet = true +} + +func (v NullableZookie) IsSet() bool { + return v.isSet +} + +func (v *NullableZookie) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZookie(val *Zookie) *NullableZookie { + return &NullableZookie{value: val, isSet: true} +} + +func (v NullableZookie) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZookie) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}