From a91cd02fe71692e235dbbf894b099f826545d6e4 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 11 Dec 2024 14:58:35 +0000 Subject: [PATCH] Generate authorization --- services/authorization/model_add_members_payload.go | 4 ++-- services/authorization/model_error_response.go | 10 +++++----- services/authorization/model_existing_permission.go | 4 ++-- services/authorization/model_list_members_response.go | 6 +++--- .../authorization/model_list_permissions_response.go | 2 +- .../model_list_user_memberships_response.go | 2 +- .../model_list_user_permissions_response.go | 2 +- services/authorization/model_member.go | 4 ++-- services/authorization/model_members_response.go | 8 ++++---- services/authorization/model_permission.go | 4 ++-- services/authorization/model_remove_members_payload.go | 6 +++--- services/authorization/model_role.go | 8 ++++---- services/authorization/model_roles_response.go | 6 +++--- services/authorization/model_user_membership.go | 8 ++++---- services/authorization/model_user_permission.go | 6 +++--- services/authorization/model_zookie.go | 2 +- 16 files changed, 41 insertions(+), 41 deletions(-) diff --git a/services/authorization/model_add_members_payload.go b/services/authorization/model_add_members_payload.go index c00640177..38fe3822c 100644 --- a/services/authorization/model_add_members_payload.go +++ b/services/authorization/model_add_members_payload.go @@ -48,7 +48,7 @@ func NewAddMembersPayloadWithDefaults() *AddMembersPayload { // GetMembers returns the Members field value func (o *AddMembersPayload) GetMembers() *[]Member { - if o == nil { + if o == nil || IsNil(o.Members) { var ret *[]Member return ret } @@ -72,7 +72,7 @@ func (o *AddMembersPayload) SetMembers(v *[]Member) { // GetResourceType returns the ResourceType field value func (o *AddMembersPayload) GetResourceType() *string { - if o == nil { + if o == nil || IsNil(o.ResourceType) { var ret *string return ret } diff --git a/services/authorization/model_error_response.go b/services/authorization/model_error_response.go index 9c365226d..fec8fb586 100644 --- a/services/authorization/model_error_response.go +++ b/services/authorization/model_error_response.go @@ -58,7 +58,7 @@ func NewErrorResponseWithDefaults() *ErrorResponse { // GetError returns the Error field value func (o *ErrorResponse) GetError() *string { - if o == nil { + if o == nil || IsNil(o.Error) { var ret *string return ret } @@ -82,7 +82,7 @@ func (o *ErrorResponse) SetError(v *string) { // GetMessage returns the Message field value func (o *ErrorResponse) GetMessage() *string { - if o == nil { + if o == nil || IsNil(o.Message) { var ret *string return ret } @@ -106,7 +106,7 @@ func (o *ErrorResponse) SetMessage(v *string) { // GetPath returns the Path field value func (o *ErrorResponse) GetPath() *string { - if o == nil { + if o == nil || IsNil(o.Path) { var ret *string return ret } @@ -130,7 +130,7 @@ func (o *ErrorResponse) SetPath(v *string) { // GetStatus returns the Status field value func (o *ErrorResponse) GetStatus() *int64 { - if o == nil { + if o == nil || IsNil(o.Status) { var ret *int64 return ret } @@ -154,7 +154,7 @@ func (o *ErrorResponse) SetStatus(v *int64) { // GetTimeStamp returns the TimeStamp field value func (o *ErrorResponse) GetTimeStamp() *time.Time { - if o == nil { + if o == nil || IsNil(o.TimeStamp) { var ret *time.Time return ret } diff --git a/services/authorization/model_existing_permission.go b/services/authorization/model_existing_permission.go index d3ca5d349..77d72d2ff 100644 --- a/services/authorization/model_existing_permission.go +++ b/services/authorization/model_existing_permission.go @@ -48,7 +48,7 @@ func NewExistingPermissionWithDefaults() *ExistingPermission { // GetDescription returns the Description field value func (o *ExistingPermission) GetDescription() *string { - if o == nil { + if o == nil || IsNil(o.Description) { var ret *string return ret } @@ -72,7 +72,7 @@ func (o *ExistingPermission) SetDescription(v *string) { // GetName returns the Name field value func (o *ExistingPermission) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } diff --git a/services/authorization/model_list_members_response.go b/services/authorization/model_list_members_response.go index c61ce4193..ae1cc5f0e 100644 --- a/services/authorization/model_list_members_response.go +++ b/services/authorization/model_list_members_response.go @@ -51,7 +51,7 @@ func NewListMembersResponseWithDefaults() *ListMembersResponse { // GetMembers returns the Members field value func (o *ListMembersResponse) GetMembers() *[]Member { - if o == nil { + if o == nil || IsNil(o.Members) { var ret *[]Member return ret } @@ -75,7 +75,7 @@ func (o *ListMembersResponse) SetMembers(v *[]Member) { // GetResourceId returns the ResourceId field value func (o *ListMembersResponse) GetResourceId() *string { - if o == nil { + if o == nil || IsNil(o.ResourceId) { var ret *string return ret } @@ -99,7 +99,7 @@ func (o *ListMembersResponse) SetResourceId(v *string) { // GetResourceType returns the ResourceType field value func (o *ListMembersResponse) GetResourceType() *string { - if o == nil { + if o == nil || IsNil(o.ResourceType) { var ret *string return ret } diff --git a/services/authorization/model_list_permissions_response.go b/services/authorization/model_list_permissions_response.go index 0f0ef31bf..5227848e3 100644 --- a/services/authorization/model_list_permissions_response.go +++ b/services/authorization/model_list_permissions_response.go @@ -45,7 +45,7 @@ func NewListPermissionsResponseWithDefaults() *ListPermissionsResponse { // GetPermissions returns the Permissions field value func (o *ListPermissionsResponse) GetPermissions() *[]Permission { - if o == nil { + if o == nil || IsNil(o.Permissions) { var ret *[]Permission return ret } diff --git a/services/authorization/model_list_user_memberships_response.go b/services/authorization/model_list_user_memberships_response.go index 25cb6fd65..0a8b18482 100644 --- a/services/authorization/model_list_user_memberships_response.go +++ b/services/authorization/model_list_user_memberships_response.go @@ -45,7 +45,7 @@ func NewListUserMembershipsResponseWithDefaults() *ListUserMembershipsResponse { // GetItems returns the Items field value func (o *ListUserMembershipsResponse) GetItems() *[]UserMembership { - if o == nil { + if o == nil || IsNil(o.Items) { var ret *[]UserMembership return ret } diff --git a/services/authorization/model_list_user_permissions_response.go b/services/authorization/model_list_user_permissions_response.go index c8981be6f..5b0a841a7 100644 --- a/services/authorization/model_list_user_permissions_response.go +++ b/services/authorization/model_list_user_permissions_response.go @@ -45,7 +45,7 @@ func NewListUserPermissionsResponseWithDefaults() *ListUserPermissionsResponse { // GetItems returns the Items field value func (o *ListUserPermissionsResponse) GetItems() *[]UserPermission { - if o == nil { + if o == nil || IsNil(o.Items) { var ret *[]UserPermission return ret } diff --git a/services/authorization/model_member.go b/services/authorization/model_member.go index f25660d73..3480d3064 100644 --- a/services/authorization/model_member.go +++ b/services/authorization/model_member.go @@ -48,7 +48,7 @@ func NewMemberWithDefaults() *Member { // GetRole returns the Role field value func (o *Member) GetRole() *string { - if o == nil { + if o == nil || IsNil(o.Role) { var ret *string return ret } @@ -72,7 +72,7 @@ func (o *Member) SetRole(v *string) { // GetSubject returns the Subject field value func (o *Member) GetSubject() *string { - if o == nil { + if o == nil || IsNil(o.Subject) { var ret *string return ret } diff --git a/services/authorization/model_members_response.go b/services/authorization/model_members_response.go index a60d0e4cf..acceaeb80 100644 --- a/services/authorization/model_members_response.go +++ b/services/authorization/model_members_response.go @@ -52,7 +52,7 @@ func NewMembersResponseWithDefaults() *MembersResponse { // GetMembers returns the Members field value func (o *MembersResponse) GetMembers() *[]Member { - if o == nil { + if o == nil || IsNil(o.Members) { var ret *[]Member return ret } @@ -76,7 +76,7 @@ func (o *MembersResponse) SetMembers(v *[]Member) { // GetResourceId returns the ResourceId field value func (o *MembersResponse) GetResourceId() *string { - if o == nil { + if o == nil || IsNil(o.ResourceId) { var ret *string return ret } @@ -100,7 +100,7 @@ func (o *MembersResponse) SetResourceId(v *string) { // GetResourceType returns the ResourceType field value func (o *MembersResponse) GetResourceType() *string { - if o == nil { + if o == nil || IsNil(o.ResourceType) { var ret *string return ret } @@ -142,7 +142,7 @@ func (o *MembersResponse) GetWrittenAtOk() (*Zookie, bool) { // HasWrittenAt returns a boolean if a field has been set. func (o *MembersResponse) HasWrittenAt() bool { - if o != nil && !IsNil(o.WrittenAt) { + if o != nil && !IsNil(o.WrittenAt) && !IsNil(o.WrittenAt) { return true } diff --git a/services/authorization/model_permission.go b/services/authorization/model_permission.go index ffc6788cc..e0bee0804 100644 --- a/services/authorization/model_permission.go +++ b/services/authorization/model_permission.go @@ -48,7 +48,7 @@ func NewPermissionWithDefaults() *Permission { // GetDescription returns the Description field value func (o *Permission) GetDescription() *string { - if o == nil { + if o == nil || IsNil(o.Description) { var ret *string return ret } @@ -72,7 +72,7 @@ func (o *Permission) SetDescription(v *string) { // GetName returns the Name field value func (o *Permission) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } diff --git a/services/authorization/model_remove_members_payload.go b/services/authorization/model_remove_members_payload.go index 8fd7ec5b1..1b66a0e1a 100644 --- a/services/authorization/model_remove_members_payload.go +++ b/services/authorization/model_remove_members_payload.go @@ -67,7 +67,7 @@ func (o *RemoveMembersPayload) GetForceRemoveOk() (*bool, bool) { // HasForceRemove returns a boolean if a field has been set. func (o *RemoveMembersPayload) HasForceRemove() bool { - if o != nil && !IsNil(o.ForceRemove) { + if o != nil && !IsNil(o.ForceRemove) && !IsNil(o.ForceRemove) { return true } @@ -81,7 +81,7 @@ func (o *RemoveMembersPayload) SetForceRemove(v *bool) { // GetMembers returns the Members field value func (o *RemoveMembersPayload) GetMembers() *[]Member { - if o == nil { + if o == nil || IsNil(o.Members) { var ret *[]Member return ret } @@ -105,7 +105,7 @@ func (o *RemoveMembersPayload) SetMembers(v *[]Member) { // GetResourceType returns the ResourceType field value func (o *RemoveMembersPayload) GetResourceType() *string { - if o == nil { + if o == nil || IsNil(o.ResourceType) { var ret *string return ret } diff --git a/services/authorization/model_role.go b/services/authorization/model_role.go index e9652760d..540933c5f 100644 --- a/services/authorization/model_role.go +++ b/services/authorization/model_role.go @@ -52,7 +52,7 @@ func NewRoleWithDefaults() *Role { // GetDescription returns the Description field value func (o *Role) GetDescription() *string { - if o == nil { + if o == nil || IsNil(o.Description) { var ret *string return ret } @@ -94,7 +94,7 @@ func (o *Role) GetIdOk() (*string, bool) { // HasId returns a boolean if a field has been set. func (o *Role) HasId() bool { - if o != nil && !IsNil(o.Id) { + if o != nil && !IsNil(o.Id) && !IsNil(o.Id) { return true } @@ -108,7 +108,7 @@ func (o *Role) SetId(v *string) { // GetName returns the Name field value func (o *Role) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } @@ -132,7 +132,7 @@ func (o *Role) SetName(v *string) { // GetPermissions returns the Permissions field value func (o *Role) GetPermissions() *[]Permission { - if o == nil { + if o == nil || IsNil(o.Permissions) { var ret *[]Permission return ret } diff --git a/services/authorization/model_roles_response.go b/services/authorization/model_roles_response.go index b6f9afe5f..ea395db43 100644 --- a/services/authorization/model_roles_response.go +++ b/services/authorization/model_roles_response.go @@ -51,7 +51,7 @@ func NewRolesResponseWithDefaults() *RolesResponse { // GetResourceId returns the ResourceId field value func (o *RolesResponse) GetResourceId() *string { - if o == nil { + if o == nil || IsNil(o.ResourceId) { var ret *string return ret } @@ -75,7 +75,7 @@ func (o *RolesResponse) SetResourceId(v *string) { // GetResourceType returns the ResourceType field value func (o *RolesResponse) GetResourceType() *string { - if o == nil { + if o == nil || IsNil(o.ResourceType) { var ret *string return ret } @@ -99,7 +99,7 @@ func (o *RolesResponse) SetResourceType(v *string) { // GetRoles returns the Roles field value func (o *RolesResponse) GetRoles() *[]Role { - if o == nil { + if o == nil || IsNil(o.Roles) { var ret *[]Role return ret } diff --git a/services/authorization/model_user_membership.go b/services/authorization/model_user_membership.go index b377a41c1..7e1154808 100644 --- a/services/authorization/model_user_membership.go +++ b/services/authorization/model_user_membership.go @@ -54,7 +54,7 @@ func NewUserMembershipWithDefaults() *UserMembership { // GetResourceId returns the ResourceId field value func (o *UserMembership) GetResourceId() *string { - if o == nil { + if o == nil || IsNil(o.ResourceId) { var ret *string return ret } @@ -78,7 +78,7 @@ func (o *UserMembership) SetResourceId(v *string) { // GetResourceType returns the ResourceType field value func (o *UserMembership) GetResourceType() *string { - if o == nil { + if o == nil || IsNil(o.ResourceType) { var ret *string return ret } @@ -102,7 +102,7 @@ func (o *UserMembership) SetResourceType(v *string) { // GetRole returns the Role field value func (o *UserMembership) GetRole() *string { - if o == nil { + if o == nil || IsNil(o.Role) { var ret *string return ret } @@ -126,7 +126,7 @@ func (o *UserMembership) SetRole(v *string) { // GetSubject returns the Subject field value func (o *UserMembership) GetSubject() *string { - if o == nil { + if o == nil || IsNil(o.Subject) { var ret *string return ret } diff --git a/services/authorization/model_user_permission.go b/services/authorization/model_user_permission.go index d734f16f2..6df3c174f 100644 --- a/services/authorization/model_user_permission.go +++ b/services/authorization/model_user_permission.go @@ -51,7 +51,7 @@ func NewUserPermissionWithDefaults() *UserPermission { // GetPermissions returns the Permissions field value func (o *UserPermission) GetPermissions() *[]ExistingPermission { - if o == nil { + if o == nil || IsNil(o.Permissions) { var ret *[]ExistingPermission return ret } @@ -75,7 +75,7 @@ func (o *UserPermission) SetPermissions(v *[]ExistingPermission) { // GetResourceId returns the ResourceId field value func (o *UserPermission) GetResourceId() *string { - if o == nil { + if o == nil || IsNil(o.ResourceId) { var ret *string return ret } @@ -99,7 +99,7 @@ func (o *UserPermission) SetResourceId(v *string) { // GetResourceType returns the ResourceType field value func (o *UserPermission) GetResourceType() *string { - if o == nil { + if o == nil || IsNil(o.ResourceType) { var ret *string return ret } diff --git a/services/authorization/model_zookie.go b/services/authorization/model_zookie.go index 50373ffcc..bac638fb0 100644 --- a/services/authorization/model_zookie.go +++ b/services/authorization/model_zookie.go @@ -59,7 +59,7 @@ func (o *Zookie) GetZookieOk() (*string, bool) { // HasZookie returns a boolean if a field has been set. func (o *Zookie) HasZookie() bool { - if o != nil && !IsNil(o.Zookie) { + if o != nil && !IsNil(o.Zookie) && !IsNil(o.Zookie) { return true }