=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::projects-project_id-groups-group_id-roles - Documentation for the /projects/{project_id}/groups/{group_id}/roles path.

=head1 OPERATIONS

=head2 GET /projects/{project_id}/groups/{group_id}/roles

=head3 list-project-group-role-assignments

  $client->list_project_group_role_assignments({
      body => { ... },
  });

Lists the project roles assigned to a group within a project.

=head4 Path/query parameters

=over

=item * C<project_id> (in path, required, string) - The ID of the project to inspect.

=item * C<group_id> (in path, required, string) - The ID of the group to inspect.

=item * C<limit> (in query, optional, integer) - A limit on the number of project role assignments to return.

=item * C<after> (in query, optional, string) - Cursor for pagination. Provide the value from the previous response's C<next>
field to continue listing project roles.

=item * C<order> (in query, optional, string) - Sort order for the returned project roles.

Allowed values: asc, desc

=back

=head4 Responses

B<200 - Project group role assignments listed successfully.>

Content-Type: application/json

Example:

    {
       "data" : [
          {
             "assignment_sources" : null,
             "created_at" : 1711471533,
             "created_by" : "user_abc123",
             "created_by_user_obj" : {
                "email" : "ada@example.com",
                "id" : "user_abc123",
                "name" : "Ada Lovelace"
             },
             "description" : "Allows managing organization groups",
             "id" : "role_01J1F8ROLE01",
             "metadata" : {},
             "name" : "API Group Manager",
             "permissions" : [
                "api.groups.read",
                "api.groups.write"
             ],
             "predefined_role" : false,
             "resource_type" : "api.organization",
             "updated_at" : 1711472599
          }
       ],
       "has_more" : false,
       "next" : null,
       "object" : "list"
    }

=head2 POST /projects/{project_id}/groups/{group_id}/roles

=head3 assign-project-group-role

  $client->assign_project_group_role({
      body => { ... },
  });

Assigns a project role to a group within a project.

=head4 Path/query parameters

=over

=item * C<project_id> (in path, required, string) - The ID of the project to update.

=item * C<group_id> (in path, required, string) - The ID of the group that should receive the project role.

=back

=head4 Responses

B<200 - Project role assigned to the group successfully.>

Content-Type: application/json

Example:

    {
       "group" : {
          "created_at" : 1711471533,
          "id" : "group_01J1F8ABCDXYZ",
          "name" : "Support Team",
          "object" : "group",
          "scim_managed" : false
       },
       "object" : "group.role",
       "role" : {
          "description" : "Allows managing organization groups",
          "id" : "role_01J1F8ROLE01",
          "name" : "API Group Manager",
          "object" : "role",
          "permissions" : [
             "api.groups.read",
             "api.groups.write"
          ],
          "predefined_role" : false,
          "resource_type" : "api.organization"
       }
    }

=head1 SCHEMAS

=head2 AssignedRoleDetails

Properties:

=over

=item * C<assignment_sources> (anyOf, required) - Principals from which the role assignment is inherited, when available.

=item * C<created_at> (anyOf, required) - When the role was created.

=item * C<created_by> (anyOf, required) - Identifier of the actor who created the role.

=item * C<created_by_user_obj> (anyOf, required) - User details for the actor that created the role, when available.

=item * C<description> (anyOf, required) - Description of the role.

=item * C<id> (string, required) - Identifier for the role.

=item * C<metadata> (anyOf, required) - Arbitrary metadata stored on the role.

=item * C<name> (string, required) - Name of the role.

=item * C<permissions> (array of string, required) - Permissions associated with the role.

=item * C<predefined_role> (boolean, required) - Whether the role is predefined by OpenAI.

=item * C<resource_type> (string, required) - Resource type the role applies to.

=item * C<updated_at> (anyOf, required) - When the role was last updated.

=back

=head2 Group

Properties:

=over

=item * C<created_at> (integer, required) - Unix timestamp (in seconds) when the group was created.

=item * C<id> (string, required) - Identifier for the group.

=item * C<name> (string, required) - Display name of the group.

=item * C<object> (string, required) - Always C<group> .

Allowed values: group

=item * C<scim_managed> (boolean, required) - Whether the group is managed through SCIM.

=back

=head2 GroupRoleAssignment

Properties:

=over

=item * C<group> (Group, required)

See L</Group> below for shape.

=item * C<object> (string, required) - Always C<group.role> .

Allowed values: group.role

=item * C<role> (Role, required)

See L</Role> below for shape.

=back

=head2 PublicAssignOrganizationGroupRoleBody

Properties:

=over

=item * C<role_id> (string, required) - Identifier of the role to assign.

=back

=head2 Role

Properties:

=over

=item * C<description> (anyOf, required) - Optional description of the role.

=item * C<id> (string, required) - Identifier for the role.

=item * C<name> (string, required) - Unique name for the role.

=item * C<object> (string, required) - Always C<role> .

Allowed values: role

=item * C<permissions> (array of string, required) - Permissions granted by the role.

=item * C<predefined_role> (boolean, required) - Whether the role is predefined and managed by OpenAI.

=item * C<resource_type> (string, required) - Resource type the role is bound to (for example C<api.organization> or
C<api.project> ).

=back

=head2 RoleListResource

Properties:

=over

=item * C<data> (array of AssignedRoleDetails, required) - Role assignments returned in the current page.

=item * C<has_more> (boolean, required) - Whether additional assignments are available when paginating.

=item * C<next> (anyOf, required) - Cursor to fetch the next page of results, or C<null> when there are no more
assignments.

=item * C<object> (string, required) - Always C<list> .

Allowed values: list

=back

=head1 SEE ALSO

L<OpenAPI::Client::OpenAI::Path>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.14.0 or,
at your option, any later version of Perl 5 you may have available.

=cut
