diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f3d480..44d8015 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,3 +29,6 @@ pytest-3.10: pytest-3.11: extends: .pytest image: python:3.11-alpine +pytest-3.12: + extends: .pytest + image: python:3.12-alpine diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 2136f61..1d883f0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,8 +3,11 @@ .gitlab-ci.yml .travis.yml README.md +docs/Access.md +docs/AccessList.md docs/AddGroupResourceRequest.md docs/AddGroupUserRequest.md +docs/AddResourceNhiRequest.md docs/AddResourceUserRequest.md docs/App.md docs/AppTypeEnum.md @@ -22,7 +25,13 @@ docs/CreateGroupInfo.md docs/CreateMessageChannelInfo.md docs/CreateOnCallScheduleInfo.md docs/CreateOwnerInfo.md +docs/CreateRequest200Response.md docs/CreateRequestConfigurationInfoList.md +docs/CreateRequestInfo.md +docs/CreateRequestInfoCustomMetadataInner.md +docs/CreateRequestInfoGroupsInner.md +docs/CreateRequestInfoResourcesInner.md +docs/CreateRequestInfoSupportTicket.md docs/CreateResourceInfo.md docs/CreateTagInfo.md docs/CreateUARInfo.md @@ -50,11 +59,15 @@ docs/GroupTypeEnum.md docs/GroupUser.md docs/GroupUserList.md docs/GroupsApi.md +docs/IdpGroupMapping.md +docs/IdpGroupMappingList.md +docs/IdpGroupMappingsApi.md docs/MessageChannel.md docs/MessageChannelIDList.md docs/MessageChannelList.md docs/MessageChannelProviderEnum.md docs/MessageChannelsApi.md +docs/NonHumanIdentitiesApi.md docs/OnCallSchedule.md docs/OnCallScheduleIDList.md docs/OnCallScheduleList.md @@ -84,6 +97,7 @@ docs/Resource.md docs/ResourceAccessLevel.md docs/ResourceAccessUser.md docs/ResourceAccessUserList.md +docs/ResourceNHI.md docs/ResourceRemoteInfo.md docs/ResourceRemoteInfoAwsAccount.md docs/ResourceRemoteInfoAwsEc2Instance.md @@ -99,6 +113,7 @@ docs/ResourceRemoteInfoGcpFolder.md docs/ResourceRemoteInfoGcpGkeCluster.md docs/ResourceRemoteInfoGcpOrganization.md docs/ResourceRemoteInfoGcpProject.md +docs/ResourceRemoteInfoGcpServiceAccount.md docs/ResourceRemoteInfoGcpSqlInstance.md docs/ResourceRemoteInfoGithubRepo.md docs/ResourceRemoteInfoGitlabProject.md @@ -119,6 +134,7 @@ docs/ResourcesApi.md docs/ReviewerIDList.md docs/ReviewerStage.md docs/ReviewerStageList.md +docs/RiskSensitivityEnum.md docs/Session.md docs/SessionsApi.md docs/SessionsList.md @@ -127,6 +143,8 @@ docs/Tag.md docs/TagFilter.md docs/TagsApi.md docs/TagsList.md +docs/TicketPropagationConfiguration.md +docs/TicketingProviderEnum.md docs/UAR.md docs/UARReviewerAssignmentPolicyEnum.md docs/UARScope.md @@ -137,6 +155,8 @@ docs/UpdateGroupBindingInfoList.md docs/UpdateGroupInfo.md docs/UpdateGroupInfoList.md docs/UpdateGroupResourcesInfo.md +docs/UpdateIdpGroupMappingsRequest.md +docs/UpdateIdpGroupMappingsRequestMappingsInner.md docs/UpdateOwnerInfo.md docs/UpdateOwnerInfoList.md docs/UpdateResourceInfo.md @@ -156,7 +176,9 @@ opal/api/configuration_templates_api.py opal/api/events_api.py opal/api/group_bindings_api.py opal/api/groups_api.py +opal/api/idp_group_mappings_api.py opal/api/message_channels_api.py +opal/api/non_human_identities_api.py opal/api/on_call_schedules_api.py opal/api/owners_api.py opal/api/requests_api.py @@ -170,8 +192,11 @@ opal/api_response.py opal/configuration.py opal/exceptions.py opal/models/__init__.py +opal/models/access.py +opal/models/access_list.py opal/models/add_group_resource_request.py opal/models/add_group_user_request.py +opal/models/add_resource_nhi_request.py opal/models/add_resource_user_request.py opal/models/app.py opal/models/app_type_enum.py @@ -187,7 +212,13 @@ opal/models/create_group_info.py opal/models/create_message_channel_info.py opal/models/create_on_call_schedule_info.py opal/models/create_owner_info.py +opal/models/create_request200_response.py opal/models/create_request_configuration_info_list.py +opal/models/create_request_info.py +opal/models/create_request_info_custom_metadata_inner.py +opal/models/create_request_info_groups_inner.py +opal/models/create_request_info_resources_inner.py +opal/models/create_request_info_support_ticket.py opal/models/create_resource_info.py opal/models/create_tag_info.py opal/models/create_uar_info.py @@ -212,6 +243,8 @@ opal/models/group_resource_list.py opal/models/group_type_enum.py opal/models/group_user.py opal/models/group_user_list.py +opal/models/idp_group_mapping.py +opal/models/idp_group_mapping_list.py opal/models/message_channel.py opal/models/message_channel_id_list.py opal/models/message_channel_list.py @@ -242,6 +275,7 @@ opal/models/resource.py opal/models/resource_access_level.py opal/models/resource_access_user.py opal/models/resource_access_user_list.py +opal/models/resource_nhi.py opal/models/resource_remote_info.py opal/models/resource_remote_info_aws_account.py opal/models/resource_remote_info_aws_ec2_instance.py @@ -257,6 +291,7 @@ opal/models/resource_remote_info_gcp_folder.py opal/models/resource_remote_info_gcp_gke_cluster.py opal/models/resource_remote_info_gcp_organization.py opal/models/resource_remote_info_gcp_project.py +opal/models/resource_remote_info_gcp_service_account.py opal/models/resource_remote_info_gcp_sql_instance.py opal/models/resource_remote_info_github_repo.py opal/models/resource_remote_info_gitlab_project.py @@ -276,12 +311,15 @@ opal/models/resource_with_access_level.py opal/models/reviewer_id_list.py opal/models/reviewer_stage.py opal/models/reviewer_stage_list.py +opal/models/risk_sensitivity_enum.py opal/models/session.py opal/models/sessions_list.py opal/models/sub_event.py opal/models/tag.py opal/models/tag_filter.py opal/models/tags_list.py +opal/models/ticket_propagation_configuration.py +opal/models/ticketing_provider_enum.py opal/models/uar.py opal/models/uar_reviewer_assignment_policy_enum.py opal/models/uar_scope.py @@ -291,6 +329,8 @@ opal/models/update_group_binding_info_list.py opal/models/update_group_info.py opal/models/update_group_info_list.py opal/models/update_group_resources_info.py +opal/models/update_idp_group_mappings_request.py +opal/models/update_idp_group_mappings_request_mappings_inner.py opal/models/update_owner_info.py opal/models/update_owner_info_list.py opal/models/update_resource_info.py diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index ba7f754..4bc5d61 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0 +7.9.0 diff --git a/.travis.yml b/.travis.yml index 406fe06..f448501 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,9 @@ python: - "3.9" - "3.10" - "3.11" + - "3.12" # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch + #- "3.12-dev" # 3.12 development branch #- "nightly" # nightly build # command to install dependencies install: diff --git a/README.md b/README.md index 26f8835..1edcb2d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - API version: 1.0 - Package version: 1.0.0 -- Generator version: 7.4.0 +- Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.opal.dev/](https://www.opal.dev/) @@ -139,6 +139,7 @@ Class | Method | HTTP request | Description *AppsApi* | [**get_app**](docs/AppsApi.md#get_app) | **GET** /apps/{app_id} | *AppsApi* | [**get_apps**](docs/AppsApi.md#get_apps) | **GET** /apps | *ConfigurationTemplatesApi* | [**create_configuration_template**](docs/ConfigurationTemplatesApi.md#create_configuration_template) | **POST** /configuration-templates | +*ConfigurationTemplatesApi* | [**delete_configuration_template**](docs/ConfigurationTemplatesApi.md#delete_configuration_template) | **DELETE** /configuration-templates/{configuration_template_id} | *ConfigurationTemplatesApi* | [**get_configuration_templates**](docs/ConfigurationTemplatesApi.md#get_configuration_templates) | **GET** /configuration-templates | *ConfigurationTemplatesApi* | [**update_configuration_template**](docs/ConfigurationTemplatesApi.md#update_configuration_template) | **PUT** /configuration-templates | *EventsApi* | [**events**](docs/EventsApi.md#events) | **GET** /events | @@ -169,9 +170,13 @@ Class | Method | HTTP request | Description *GroupsApi* | [**set_group_reviewers**](docs/GroupsApi.md#set_group_reviewers) | **PUT** /groups/{group_id}/reviewers | *GroupsApi* | [**set_group_visibility**](docs/GroupsApi.md#set_group_visibility) | **PUT** /groups/{group_id}/visibility | *GroupsApi* | [**update_groups**](docs/GroupsApi.md#update_groups) | **PUT** /groups | +*IdpGroupMappingsApi* | [**delete_idp_group_mappings_by_app_resource_id_group_id**](docs/IdpGroupMappingsApi.md#delete_idp_group_mappings_by_app_resource_id_group_id) | **DELETE** /idp-group-mappings/{app_resource_id}/{group_id}/ | +*IdpGroupMappingsApi* | [**get_idp_group_mappings**](docs/IdpGroupMappingsApi.md#get_idp_group_mappings) | **GET** /idp-group-mappings/{app_resource_id} | +*IdpGroupMappingsApi* | [**update_idp_group_mappings**](docs/IdpGroupMappingsApi.md#update_idp_group_mappings) | **PUT** /idp-group-mappings/{app_resource_id} | *MessageChannelsApi* | [**create_message_channel**](docs/MessageChannelsApi.md#create_message_channel) | **POST** /message-channels | *MessageChannelsApi* | [**get_message_channel**](docs/MessageChannelsApi.md#get_message_channel) | **GET** /message-channels/{message_channel_id} | *MessageChannelsApi* | [**get_message_channels**](docs/MessageChannelsApi.md#get_message_channels) | **GET** /message-channels | +*NonHumanIdentitiesApi* | [**get_nhis**](docs/NonHumanIdentitiesApi.md#get_nhis) | **GET** /non-human-identities | *OnCallSchedulesApi* | [**create_on_call_schedule**](docs/OnCallSchedulesApi.md#create_on_call_schedule) | **POST** /on-call-schedules | *OnCallSchedulesApi* | [**get_on_call_schedule**](docs/OnCallSchedulesApi.md#get_on_call_schedule) | **GET** /on-call-schedules/{on_call_schedule_id} | *OnCallSchedulesApi* | [**get_on_call_schedules**](docs/OnCallSchedulesApi.md#get_on_call_schedules) | **GET** /on-call-schedules | @@ -183,13 +188,17 @@ Class | Method | HTTP request | Description *OwnersApi* | [**get_owners**](docs/OwnersApi.md#get_owners) | **GET** /owners | *OwnersApi* | [**set_owner_users**](docs/OwnersApi.md#set_owner_users) | **PUT** /owners/{owner_id}/users | *OwnersApi* | [**update_owners**](docs/OwnersApi.md#update_owners) | **PUT** /owners | +*RequestsApi* | [**create_request**](docs/RequestsApi.md#create_request) | **POST** /requests | *RequestsApi* | [**get_requests**](docs/RequestsApi.md#get_requests) | **GET** /requests | +*ResourcesApi* | [**add_resource_nhi**](docs/ResourcesApi.md#add_resource_nhi) | **POST** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | *ResourcesApi* | [**add_resource_user**](docs/ResourcesApi.md#add_resource_user) | **POST** /resources/{resource_id}/users/{user_id} | *ResourcesApi* | [**create_resource**](docs/ResourcesApi.md#create_resource) | **POST** /resources | *ResourcesApi* | [**delete_resource**](docs/ResourcesApi.md#delete_resource) | **DELETE** /resources/{resource_id} | +*ResourcesApi* | [**delete_resource_nhi**](docs/ResourcesApi.md#delete_resource_nhi) | **DELETE** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | *ResourcesApi* | [**delete_resource_user**](docs/ResourcesApi.md#delete_resource_user) | **DELETE** /resources/{resource_id}/users/{user_id} | *ResourcesApi* | [**get_resource**](docs/ResourcesApi.md#get_resource) | **GET** /resources/{resource_id} | *ResourcesApi* | [**get_resource_message_channels**](docs/ResourcesApi.md#get_resource_message_channels) | **GET** /resources/{resource_id}/message-channels | +*ResourcesApi* | [**get_resource_nhis**](docs/ResourcesApi.md#get_resource_nhis) | **GET** /resources/{resource_id}/non-human-identities | *ResourcesApi* | [**get_resource_reviewer_stages**](docs/ResourcesApi.md#get_resource_reviewer_stages) | **GET** /resources/{resource_id}/reviewer-stages | *ResourcesApi* | [**get_resource_reviewers**](docs/ResourcesApi.md#get_resource_reviewers) | **GET** /resources/{resource_id}/reviewers | *ResourcesApi* | [**get_resource_tags**](docs/ResourcesApi.md#get_resource_tags) | **GET** /resources/{resource_id}/tags | @@ -207,7 +216,9 @@ Class | Method | HTTP request | Description *TagsApi* | [**add_resource_tag**](docs/TagsApi.md#add_resource_tag) | **POST** /tags/{tag_id}/resources/{resource_id} | *TagsApi* | [**add_user_tag**](docs/TagsApi.md#add_user_tag) | **POST** /tags/{tag_id}/users/{user_id} | *TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /tag | +*TagsApi* | [**delete_tag_by_id**](docs/TagsApi.md#delete_tag_by_id) | **DELETE** /tag/{tag_id} | *TagsApi* | [**get_tag**](docs/TagsApi.md#get_tag) | **GET** /tag | +*TagsApi* | [**get_tag_by_id**](docs/TagsApi.md#get_tag_by_id) | **GET** /tag/{tag_id} | *TagsApi* | [**get_tags**](docs/TagsApi.md#get_tags) | **GET** /tags | *TagsApi* | [**remove_group_tag**](docs/TagsApi.md#remove_group_tag) | **DELETE** /tags/{tag_id}/groups/{group_id} | *TagsApi* | [**remove_resource_tag**](docs/TagsApi.md#remove_resource_tag) | **DELETE** /tags/{tag_id}/resources/{resource_id} | @@ -222,8 +233,11 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [Access](docs/Access.md) + - [AccessList](docs/AccessList.md) - [AddGroupResourceRequest](docs/AddGroupResourceRequest.md) - [AddGroupUserRequest](docs/AddGroupUserRequest.md) + - [AddResourceNhiRequest](docs/AddResourceNhiRequest.md) - [AddResourceUserRequest](docs/AddResourceUserRequest.md) - [App](docs/App.md) - [AppTypeEnum](docs/AppTypeEnum.md) @@ -239,7 +253,13 @@ Class | Method | HTTP request | Description - [CreateMessageChannelInfo](docs/CreateMessageChannelInfo.md) - [CreateOnCallScheduleInfo](docs/CreateOnCallScheduleInfo.md) - [CreateOwnerInfo](docs/CreateOwnerInfo.md) + - [CreateRequest200Response](docs/CreateRequest200Response.md) - [CreateRequestConfigurationInfoList](docs/CreateRequestConfigurationInfoList.md) + - [CreateRequestInfo](docs/CreateRequestInfo.md) + - [CreateRequestInfoCustomMetadataInner](docs/CreateRequestInfoCustomMetadataInner.md) + - [CreateRequestInfoGroupsInner](docs/CreateRequestInfoGroupsInner.md) + - [CreateRequestInfoResourcesInner](docs/CreateRequestInfoResourcesInner.md) + - [CreateRequestInfoSupportTicket](docs/CreateRequestInfoSupportTicket.md) - [CreateResourceInfo](docs/CreateResourceInfo.md) - [CreateTagInfo](docs/CreateTagInfo.md) - [CreateUARInfo](docs/CreateUARInfo.md) @@ -264,6 +284,8 @@ Class | Method | HTTP request | Description - [GroupTypeEnum](docs/GroupTypeEnum.md) - [GroupUser](docs/GroupUser.md) - [GroupUserList](docs/GroupUserList.md) + - [IdpGroupMapping](docs/IdpGroupMapping.md) + - [IdpGroupMappingList](docs/IdpGroupMappingList.md) - [MessageChannel](docs/MessageChannel.md) - [MessageChannelIDList](docs/MessageChannelIDList.md) - [MessageChannelList](docs/MessageChannelList.md) @@ -294,6 +316,7 @@ Class | Method | HTTP request | Description - [ResourceAccessLevel](docs/ResourceAccessLevel.md) - [ResourceAccessUser](docs/ResourceAccessUser.md) - [ResourceAccessUserList](docs/ResourceAccessUserList.md) + - [ResourceNHI](docs/ResourceNHI.md) - [ResourceRemoteInfo](docs/ResourceRemoteInfo.md) - [ResourceRemoteInfoAwsAccount](docs/ResourceRemoteInfoAwsAccount.md) - [ResourceRemoteInfoAwsEc2Instance](docs/ResourceRemoteInfoAwsEc2Instance.md) @@ -309,6 +332,7 @@ Class | Method | HTTP request | Description - [ResourceRemoteInfoGcpGkeCluster](docs/ResourceRemoteInfoGcpGkeCluster.md) - [ResourceRemoteInfoGcpOrganization](docs/ResourceRemoteInfoGcpOrganization.md) - [ResourceRemoteInfoGcpProject](docs/ResourceRemoteInfoGcpProject.md) + - [ResourceRemoteInfoGcpServiceAccount](docs/ResourceRemoteInfoGcpServiceAccount.md) - [ResourceRemoteInfoGcpSqlInstance](docs/ResourceRemoteInfoGcpSqlInstance.md) - [ResourceRemoteInfoGithubRepo](docs/ResourceRemoteInfoGithubRepo.md) - [ResourceRemoteInfoGitlabProject](docs/ResourceRemoteInfoGitlabProject.md) @@ -328,12 +352,15 @@ Class | Method | HTTP request | Description - [ReviewerIDList](docs/ReviewerIDList.md) - [ReviewerStage](docs/ReviewerStage.md) - [ReviewerStageList](docs/ReviewerStageList.md) + - [RiskSensitivityEnum](docs/RiskSensitivityEnum.md) - [Session](docs/Session.md) - [SessionsList](docs/SessionsList.md) - [SubEvent](docs/SubEvent.md) - [Tag](docs/Tag.md) - [TagFilter](docs/TagFilter.md) - [TagsList](docs/TagsList.md) + - [TicketPropagationConfiguration](docs/TicketPropagationConfiguration.md) + - [TicketingProviderEnum](docs/TicketingProviderEnum.md) - [UAR](docs/UAR.md) - [UARReviewerAssignmentPolicyEnum](docs/UARReviewerAssignmentPolicyEnum.md) - [UARScope](docs/UARScope.md) @@ -343,6 +370,8 @@ Class | Method | HTTP request | Description - [UpdateGroupInfo](docs/UpdateGroupInfo.md) - [UpdateGroupInfoList](docs/UpdateGroupInfoList.md) - [UpdateGroupResourcesInfo](docs/UpdateGroupResourcesInfo.md) + - [UpdateIdpGroupMappingsRequest](docs/UpdateIdpGroupMappingsRequest.md) + - [UpdateIdpGroupMappingsRequestMappingsInner](docs/UpdateIdpGroupMappingsRequestMappingsInner.md) - [UpdateOwnerInfo](docs/UpdateOwnerInfo.md) - [UpdateOwnerInfoList](docs/UpdateOwnerInfoList.md) - [UpdateResourceInfo](docs/UpdateResourceInfo.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 1a8b83b..6ecd237 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.3 +openapi: 3.1.0 info: contact: email: hello@opal.dev @@ -132,6 +132,28 @@ paths: - BearerAuth: [] tags: - configuration-templates + /configuration-templates/{configuration_template_id}: + delete: + description: Deletes a configuration template. + operationId: deleteConfigurationTemplate + parameters: + - description: The ID of the configuration template. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: configuration_template_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The configuration template was successfully deleted. + security: + - BearerAuth: [] + tags: + - configuration-templates /events: get: description: Returns a list of `Event` objects. @@ -534,7 +556,7 @@ paths: application/json: schema: $ref: "#/components/schemas/GroupResourceList" - description: The resources that the group gives access to to. + description: The resources that the group gives access to. security: - BearerAuth: [] tags: @@ -608,11 +630,18 @@ paths: schema: example: access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + duration_minutes: 60 properties: access_level_remote_id: description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. example: arn:aws:iam::590304332660:role/AdministratorAccess type: string + duration_minutes: + description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 525960 # One year + minimum: 0 type: object responses: "200": @@ -1090,6 +1119,104 @@ paths: - BearerAuth: [] tags: - group-bindings + /idp-group-mappings/{app_resource_id}: + get: + description: Returns the configured set of available `IdpGroupMapping` objects for an Okta app. + operationId: getIdpGroupMappings + parameters: + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: app_resource_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/IdpGroupMappingList" + description: The configured set of available `IdpGroupMapping` objects for an Okta app. + security: + - BearerAuth: [] + tags: + - idp-group-mappings + put: + description: Updates the list of available `IdpGroupMapping` objects for an Okta app. + operationId: updateIdpGroupMappings + parameters: + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: app_resource_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + properties: + mappings: + type: array + items: + properties: + group_id: + type: string + format: uuid + alias: + type: string + type: object + required: + - mappings + type: object + responses: + "200": + description: The updated set of available `IdpGroupMapping` objects for an Okta app. + security: + - BearerAuth: [] + tags: + - idp-group-mappings + /idp-group-mappings/{app_resource_id}/{group_id}/: + delete: + description: Deletes an `IdpGroupMapping` object. + operationId: delete_idp_group_mappings_by_app_resource_ID_group_ID + parameters: + - description: The ID of the Okta app. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: app_resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The IDP group mapping was successfully deleted. + security: + - BearerAuth: [] + tags: + - idp-group-mappings /owners: get: description: Returns a list of `Owner` objects. @@ -1347,6 +1474,32 @@ paths: - BearerAuth: [] tags: - requests + post: + description: "Create an access request" + operationId: "createRequest" # TODO amruth confirm naming + requestBody: + description: Resources to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateRequestInfo" + responses: + "200": + content: + application/json: + schema: + properties: + id: + format: uuid + type: string + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + description: The resulting request. + security: + - BearerAuth: [] + tags: + - requests + /resources: get: description: Returns a list of resources for your organization. @@ -1760,6 +1913,76 @@ paths: - BearerAuth: [] tags: - resources + /non-human-identities: + get: + description: Returns a list of non-human identities for your organization. + operationId: get_nhis + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedResourcesList" + description: One page worth non-human identities in your organization. + security: + - BearerAuth: [] + tags: + - non-human-identities + /resources/{resource_id}/non-human-identities: + get: + description: Gets the list of non-human identities with access to this resource. + operationId: get_resource_nhis + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: Limit the number of results returned. + example: 200 + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessList" + description: List of non-human identities with access to this resource. + security: + - BearerAuth: [] + tags: + - resources /resources/{resource_id}/users: get: description: Gets the list of users for this resource. @@ -1795,6 +2018,103 @@ paths: - BearerAuth: [] tags: - resources + /resources/{resource_id}/non-human-identities/{non_human_identity_id}: + post: + description: Gives a non-human identity access to this resource. + operationId: add_resource_nhi + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The resource ID of the non-human identity to add. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: non_human_identity_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: false + content: + application/json: + schema: + example: + duration_minutes: 60 + access_level_remote_id: roles/cloudsql.instanceUser + properties: + duration_minutes: + description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 525960 # One year + access_level_remote_id: + description: The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used. + example: roles/cloudsql.instanceUser + type: string + required: + - duration_minutes + type: object + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceNHI" + description: Details about the access that the non-human identity was granted to the resource. + security: + - BearerAuth: [] + tags: + - resources + delete: + description: Removes a non-human identity's direct access from this resource. + operationId: delete_resource_nhi + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The resource ID of the non-human identity to remove from this resource. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: non_human_identity_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + example: roles/cloudsql.instanceUser + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + responses: + "200": + description: This non-human identity's access was successfully removed from this resource. + security: + - BearerAuth: [] + tags: + - resources /resources/{resource_id}/users/{user_id}: post: description: Adds a user to this resource. @@ -2107,33 +2427,80 @@ paths: security: - BearerAuth: [] tags: - - users - /users/{user_id}/tags: - get: - description: Returns all tags applied to the user. - operationId: get_user_tags + - users + /users/{user_id}/tags: + get: + description: Returns all tags applied to the user. + operationId: get_user_tags + parameters: + - description: The ID of the user whose tags to return. + name: user_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TagsList" + description: The tags applied to the user. + security: + - BearerAuth: [] + tags: + - users + /tag/{tag_id}: + get: + description: UNSTABLE. May be removed at any time. Gets a tag with the given id. + operationId: get_tag_by_ID + parameters: + - description: The tag ID + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: tag_id + required: true + schema: + type: string + format: uuid + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Tag" + description: The tag requested. + security: + - BearerAuth: [] + tags: + - tags + delete: + description: UNSTABLE. May be removed at any time. Deletes a tag with the given id. + operationId: delete_tag_by_ID parameters: - - description: The ID of the user whose tags to return. - name: user_id + - description: The tag ID example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 explode: false in: path + name: tag_id required: true schema: - format: uuid type: string + format: uuid style: simple responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/TagsList" - description: The tags applied to the user. + description: Tag was deleted. security: - BearerAuth: [] tags: - - users + - tags /tag: get: description: Gets a tag with the given key and value. @@ -2655,6 +3022,10 @@ components: UARScope: description: If set, the access review will only contain resources and groups that match at least one of the filters in scope. example: + filter_operator: ANY + users: + - userd283-ca87-4a8a-bdbb-df212eca5353 + include_group_bindings: True tags: - key: uar_scope value: high_priority @@ -2664,17 +3035,45 @@ components: admins: - f454d283-ca87-4a8a-bdbb-df212eca5353 - 8763d283-ca87-4a8a-bdbb-df212ecab139 + resource_types: + - GCP_CLOUD_SQL_POSTGRES_INSTANCE + group_types: + - AWS_SSO_GROUP + apps: + - pas2d283-ca87-4a8a-bdbb-df212eca5353 + - apss2d283-ca87-4a8a-bdbb-df212eca5353 + entities: + - f454d283-as87-4a8a-bdbb-df212eca5353 + - f454d283-as87-4a8a-bdbb-df212eca5329 properties: - tags: - description: This access review will include resources and groups who are tagged with one of the given tags. + group_visibility: + description: Specifies what users can see during an Access Review + type: string + enum: [STRICT, VIEW_VISIBLE_AND_ASSIGNED, VIEW_ALL] + users: + description: The access review will only include the following users. If any users are selected, any entity filters will be applied to only the entities that the selected users have access to. items: - $ref: "#/components/schemas/TagFilter" + example: userd283-ca87-4a8a-bdbb-df212eca5353 + type: string + format: uuid type: array - names: - description: This access review will include resources and groups whose name contains one of the given strings. + filter_operator: + description: Specifies whether entities must match all (AND) or any (OR) of the filters. + type: string + enum: [ANY, ALL] + entities: + description: This access review will include resources and groups with ids in the given strings. items: - example: demo + example: f454d283-as87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + apps: + description: This access review will include items in the specified applications + items: + example: pas2d283-ca87-4a8a-bdbb-df212eca5353 type: string + format: uuid type: array admins: description: This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs. @@ -2683,6 +3082,30 @@ components: type: string format: uuid type: array + group_types: + description: This access review will include items of the specified group types + type: array + items: + $ref: "#/components/schemas/GroupTypeEnum" + resource_types: + description: This access review will include items of the specified resource types + type: array + items: + $ref: "#/components/schemas/ResourceTypeEnum" + include_group_bindings: + type: boolean + example: False + tags: + description: This access review will include resources and groups who are tagged with one of the given tags. + items: + $ref: "#/components/schemas/TagFilter" + type: array + names: + description: This access review will include resources and groups whose name contains one of the given strings. + items: + example: demo + type: string + type: array type: object PaginatedUARsList: description: A list of UARs. @@ -2693,7 +3116,7 @@ components: - uar_id: f454d283-ca87-4a8a-bdbb-df212eca5353 name: Monthly UAR (July) send_reviewer_assignment_notification: False - deadline: 2022-07-14 06:59:59 + deadline: 2022-07-14T06:59:59Z time_zone: America/Los_Angeles self_review_allowed: False uar_scope: @@ -2709,7 +3132,7 @@ components: - uar_id: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb name: Monthly UAR (August) send_reviewer_assignment_notification: True - deadline: 2022-08-14 06:59:59 + deadline: 2022-08-14T06:59:59Z time_zone: America/Los_Angeles self_review_allowed: False uar_scope: @@ -2748,7 +3171,7 @@ components: uar_id: f454d283-ca87-4a8a-bdbb-df212eca5353 name: Monthly UAR (July) send_reviewer_assignment_notification: False - deadline: 2022-07-14 06:59:59 + deadline: 2022-07-14T06:59:59Z time_zone: America/Los_Angeles self_review_allowed: False uar_scope: @@ -2779,7 +3202,7 @@ components: type: boolean deadline: description: The last day for reviewers to complete their access reviews. - example: 2022-07-14 06:59:59 + example: 2022-07-14T06:59:59Z type: string format: date-time time_zone: @@ -2806,10 +3229,13 @@ components: example: name: Monthly UAR (July) send_reviewer_assignment_notification: False - deadline: 2022-07-14 06:59:59 + deadline: 2022-07-14T06:59:59Z time_zone: America/Los_Angeles self_review_allowed: False + reminder_schedule: [7, 3, 1, 0] + reminder_include_manager: True uar_scope: + group_visibility: STRICT tags: - key: uar_scope value: high_priority @@ -2832,7 +3258,7 @@ components: type: boolean deadline: description: The last day for reviewers to complete their access reviews. - example: 2022-07-14 06:59:59 + example: 2022-07-14T06:59:59Z type: string format: date-time time_zone: @@ -2843,6 +3269,13 @@ components: description: A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. example: False type: boolean + reminder_schedule: + items: + type: integer + type: array + reminder_include_manager: + type: boolean + example: False uar_scope: $ref: "#/components/schemas/UARScope" required: @@ -3122,11 +3555,11 @@ components: description: |- # Access Level Object ### Description - The `ResourceAccessLevel` object is used to represent the level of access that a user has to a resource or a resource has to a group. The "default" access - level is a `ResourceAccessLevel` object whose fields are all empty strings. + The `AccessLevel` object is used to represent the level of access that a principal has. The "default" access + level is a `AccessLevel` object whose fields are all empty strings. ### Usage Example - View the `ResourceAccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. + View the `AccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. example: access_level_name: AdminRole access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess @@ -3297,6 +3730,119 @@ components: - has_direct_access - num_access_paths type: object + AccessList: + example: + results: + - principal_id: 74908af0-9383-4feb-b7ea-8b305d737338 + principal_type: RESOURCE + entity_id: db04925a-635d-4764-870e-500b9b035c8e + entity_type: RESOURCE + expiration_date: 2022-01-23T04:56:07Z + has_direct_access: true + num_access_paths: 3 + - principal_id: d940df34-726a-4403-864e-16cb2a0d6793 + principal_type: RESOURCE + entity_id: c26cd16c-a3fa-4b82-96b1-32177f8b8f59 + entity_type: RESOURCE + expiration_date: 2022-01-23T04:56:07Z + has_direct_access: true + num_access_paths: 3 + properties: + results: + items: + $ref: "#/components/schemas/Access" + type: array + type: object + Access: + description: |- + # Access Object + ### Description + The `Access` object is used to represent a principal's access to an entity, either directly or inherited. + + ### Usage Example + Fetch from the `LIST ResourceNonHumanIdentities` endpoint. + example: + principal_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + principal_type: RESOURCE + entity_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + entity_type: RESOURCE + expiration_date: 2022-01-23T04:56:07Z + has_direct_access: true + num_access_paths: 3 + properties: + principal_id: + description: The ID of the principal with access. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + principal_type: + $ref: "#/components/schemas/EntityTypeEnum" + entity_id: + description: The ID of the entity being accessed. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + entity_type: + $ref: "#/components/schemas/EntityTypeEnum" + access_level: + $ref: "#/components/schemas/ResourceAccessLevel" + expiration_date: + description: The day and time the principal's access will expire. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string + has_direct_access: + description: The principal has direct access to this entity (vs. inherited access). + example: true + type: boolean + num_access_paths: + description: The number of ways in which the principal has access to this entity (directly and inherited). + example: 3 + format: int32 + type: integer + required: + - principal_id + - principal_type + - entity_id + - entity_type + - expiration_date + - has_direct_access + - num_access_paths + type: object + ResourceNHI: + description: |- + # Resource Non-Human Identity Direct Access Object + ### Description + This object is used to represent a non-human identity with direct access to a resource. + example: + non_human_identity_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + expiration_date: 2022-01-23T04:56:07Z + properties: + resource_id: + description: The ID of the resource. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + non_human_identity_id: + description: The resource ID of the non-human identity. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + format: uuid + type: string + access_level: + $ref: "#/components/schemas/ResourceAccessLevel" + expiration_date: + description: The day and time the non-human identity's access will expire. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string + required: + - resource_id + - non_human_identity_id + - expiration_date + type: object SessionsList: example: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -3598,6 +4144,12 @@ components: example: 7c86c85d-0651-43e2-a748-d69d658418e8 format: uuid type: string + group_leader_user_ids: + description: A list of User IDs for the group leaders of the group + items: + type: string + format: uuid + type: array remote_id: description: The ID of the remote. example: google-group-group:037m2jsg218b2wb @@ -3677,6 +4229,20 @@ components: type: string remote_info: $ref: "#/components/schemas/GroupRemoteInfo" + custom_request_notification: + description: Custom request notification sent to the requester when the request is approved. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." + risk_sensitivity: + description: The risk sensitivity level for the group. When an override is set, this field will match that. + readOnly: true + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" + risk_sensitivity_override: + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" required: - group_id type: object @@ -3887,6 +4453,12 @@ components: example: False type: boolean deprecated: true + group_leader_user_ids: + description: A list of User IDs for the group leaders of the group + items: + type: string + format: uuid + type: array request_configurations: type: array items: @@ -3931,6 +4503,15 @@ components: - 37cb7e41-12ba-46da-92ff-030abe0450b2 stage: 1 priority: 1 + custom_request_notification: + description: Custom request notification sent to the requester when the request is approved. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." + risk_sensitivity_override: + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" required: - group_id type: object @@ -3943,11 +4524,16 @@ components: - GIT_HUB_TEAM - GIT_LAB_GROUP - GOOGLE_GROUPS_GROUP + - GOOGLE_GROUPS_GKE_GROUP - LDAP_GROUP - OKTA_GROUP + - TAILSCALE_GROUP - OPAL_GROUP - AZURE_AD_SECURITY_GROUP - AZURE_AD_MICROSOFT_365_GROUP + - CONNECTOR_GROUP + - SNOWFLAKE_ROLE + - WORKDAY_USER_SECURITY_GROUP example: OPAL_GROUP type: string ResourceTypeEnum: @@ -3956,11 +4542,27 @@ components: - AWS_IAM_ROLE - AWS_EC2_INSTANCE - AWS_EKS_CLUSTER + - AWS_RDS_POSTGRES_CLUSTER - AWS_RDS_POSTGRES_INSTANCE + - AWS_RDS_MYSQL_CLUSTER - AWS_RDS_MYSQL_INSTANCE - AWS_ACCOUNT - AWS_SSO_PERMISSION_SET + - AZURE_MANAGEMENT_GROUP + - AZURE_RESOURCE_GROUP + - AZURE_SUBSCRIPTION + - AZURE_VIRTUAL_MACHINE + - AZURE_STORAGE_ACCOUNT + - AZURE_STORAGE_CONTAINER + - AZURE_SQL_SERVER + - AZURE_SQL_MANAGED_INSTANCE + - AZURE_SQL_DATABASE + - AZURE_SQL_MANAGED_DATABASE + - AZURE_USER_ASSIGNED_MANAGED_Identity + - AZURE_ENTRA_ID_ROLE - CUSTOM + - CUSTOM_CONNECTOR + - GCP_ORGANIZATION - GCP_BUCKET - GCP_COMPUTE_INSTANCE - GCP_FOLDER @@ -3968,6 +4570,9 @@ components: - GCP_PROJECT - GCP_CLOUD_SQL_POSTGRES_INSTANCE - GCP_CLOUD_SQL_MYSQL_INSTANCE + - GCP_BIG_QUERY_DATASET + - GCP_BIG_QUERY_TABLE + - GCP_SERVICE_ACCOUNT - GIT_HUB_REPO - GIT_LAB_PROJECT - GOOGLE_WORKSPACE_ROLE @@ -3976,14 +4581,19 @@ components: - OKTA_APP - OKTA_ROLE - OPAL_ROLE + - OPAL_SCOPED_ROLE - PAGERDUTY_ROLE - TAILSCALE_SSH - SALESFORCE_PERMISSION_SET - SALESFORCE_PROFILE - SALESFORCE_ROLE + - SNOWFLAKE_DATABASE + - SNOWFLAKE_SCHEMA + - SNOWFLAKE_TABLE - WORKDAY_ROLE - MYSQL_INSTANCE - MARIADB_INSTANCE + - POSTGRES_INSTANCE - TELEPORT_ROLE example: AWS_IAM_ROLE type: string @@ -4009,6 +4619,74 @@ components: type: object required: - resources + IdpGroupMapping: + description: Information about a group mapping. + example: + id: 7870617d-e72a-47f5-a84c-693817ab4567 + organization_id: 1520617d-e72a-47f5-a84c-693817ab48ad2 + app_resource_id: 6f99639b-7928-4043-8184-47cbc6766145 + group_id: 6f99639b-7928-4043-8184-47cbc6766145 + alias: "finance-team" + hidden_from_end_user: False + properties: + id: + description: The ID of the idp group mapping. + example: 7870617d-e72a-47f5-a84c-693817ab4567 + format: uuid + type: string + organization_id: + description: The ID of the organization. + example: 1520617d-e72a-47f5-a84c-693817ab48ad2 + format: uuid + type: string + app_resource_id: + description: The ID of the idp app resource. + example: 6f99639b-7928-4043-8184-47cbc6766145 + format: uuid + type: string + group_id: + description: The ID of the group. + example: 6f99639b-7928-4043-8184-47cbc6766145 + format: uuid + type: string + alias: + description: The alias of the group. + example: finance-team + type: string + hidden_from_end_user: + description: A bool representing whether or not the group is hidden from the end user. + example: False + type: boolean + required: + - id + - organization_id + - app_resource_id + - group_id + - hidden_from_end_user + type: object + IdpGroupMappingList: + example: + idp_group_mappings: + - id: 7870617d-e72a-47f5-a84c-693817ab4567 + organization_id: 1520617d-e72a-47f5-a84c-693817ab48ad2 + app_resource_id: 6f99639b-7928-4043-8184-47cbc6766145 + group_id: 6f99639b-7928-4043-8184-47cbc6766145 + alias: "finance-team" + hidden_from_end_user: False + - id: 1520617d-e72a-47f5-a84c-693817ab48ad2 + organization_id: 6f99639b-7928-4043-8184-47cbc6766145 + app_resource_id: 7870617d-e72a-47f5-a84c-693817ab4567 + group_id: 7870617d-e72a-47f5-a84c-693817ab4567 + alias: "engineering-team" + hidden_from_end_user: False + properties: + idp_group_mappings: + items: + $ref: "#/components/schemas/IdpGroupMapping" + type: array + type: object + required: + - idp_group_mappings ResourceWithAccessLevel: description: Information about a resource and corresponding access level example: @@ -4168,8 +4846,12 @@ components: description: Whether this reviewer stage should require manager approval. example: False type: boolean + require_admin_approval: + description: Whether this reviewer stage should require admin approval. + example: False + type: boolean operator: - description: The operator of the reviewer stage. + description: The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. enum: - AND - OR @@ -4306,6 +4988,14 @@ components: - PAGER_DUTY example: PAGER_DUTY type: string + TicketingProviderEnum: + description: The third party ticketing platform provider. + enum: + - JIRA + - LINEAR + - SERVICE_NOW + example: LINEAR + type: string GroupRemoteInfo: description: Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. properties: @@ -4385,20 +5075,20 @@ components: required: - group_id azure_ad_security_group: - description: Remote info for Azure AD Security group. + description: Remote info for Microsoft Entra ID Security group. properties: group_id: - description: The id of the Azure AD Security group. + description: The id of the Microsoft Entra ID Security group. example: 01fa7402-01d8-103b-8deb-5f3a0ab7884 type: string type: object required: - group_id azure_ad_microsoft_365_group: - description: Remote info for Azure AD Microsoft 365 group. + description: Remote info for Microsoft Entra ID Microsoft 365 group. properties: group_id: - description: The id of the Azure AD Microsoft 365 group. + description: The id of the Microsoft Entra ID Microsoft 365 group. example: 01fa7402-01d8-103b-8deb-5f3a0ab7884 type: string type: object @@ -4624,6 +5314,26 @@ components: required: - instance_id - project_id + gcp_service_account: + description: Remote info for a GCP service account. + properties: + email: + description: The email of the service account. + example: production@project.iam.gserviceaccount.com + type: string + service_account_id: + description: The id of the service account. + example: 103561576023829463298 + type: string + project_id: + description: The id of the project the service account is in. + example: example-project-898931321 + type: string + type: object + required: + - email + - service_account_id + - project_id github_repo: description: Remote info for GitHub repository. properties: @@ -4735,6 +5445,10 @@ components: required: - role_name type: object + RiskSensitivityEnum: + type: string + description: "Indicates the level of potential impact misuse or unauthorized access may incur." + enum: [UNKNOWN, CRITICAL, HIGH, MEDIUM, LOW, NONE] CreateResourceInfo: description: |- # CreateResourceInfo Object @@ -5013,6 +5727,15 @@ components: }, } type: string + custom_request_notification: + description: Custom request notification sent upon request approval. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." + risk_sensitivity_override: + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" required: - name - resource_type @@ -5151,6 +5874,15 @@ components: example: |- { "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } } type: string + custom_request_notification: + description: Custom request notification sent upon request approval. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." + risk_sensitivity_override: + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" required: - name - group_type @@ -5226,6 +5958,7 @@ components: updated_at: 2021-01-06T20:00:00Z requester_id: c86c85d-0651-43e2-a748-d69d658418e8 target_user_id: r86c85d-0651-43e2-a748-d69d658418e8 + target_group_id: r86c85d-0651-43e2-a748-d69d658418e8 status: pending reason: I need this resource. duration_minutes: 1440 @@ -5262,6 +5995,11 @@ components: example: 7c86c85d-0651-43e2-a748-d69d658418e8 format: uuid type: string + target_group_id: + description: The unique identifier of the group who is the target of the request. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string status: description: The status of the request. example: pending @@ -5289,7 +6027,6 @@ components: - created_at - updated_at - requester_id - - target_user_id - status - reason RequestedItem: @@ -5353,6 +6090,7 @@ components: - LONG_TEXT - BOOLEAN - MULTI_CHOICE + type: string RequestList: description: |- # Request List @@ -5369,6 +6107,7 @@ components: updated_at: 2021-01-06T20:00:00Z requester_id: c86c85d-0651-43e2-a748-d69d658418e8 target_user_id: r86c85d-0651-43e2-a748-d69d658418e8 + target_group_id: g86c85d-0651-43e2-a748-d69d658418e8 status: pending reason: I need this resource. duration_minutes: 1440 @@ -5506,6 +6245,21 @@ components: items: $ref: "#/components/schemas/RequestConfiguration" type: array + ticket_propagation: + $ref: "#/components/schemas/TicketPropagationConfiguration" + custom_request_notification: + description: Custom request notification sent upon request approval. + type: string + maxLength: 800 + nullable: true + risk_sensitivity: + description: The risk sensitivity level for the resource. When an override is set, this field will match that. + readOnly: true + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" + risk_sensitivity_override: + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" metadata: description: JSON metadata about the remote resource. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details. deprecated: true @@ -5645,6 +6399,17 @@ components: example: False type: boolean deprecated: true + ticket_propagation: + $ref: "#/components/schemas/TicketPropagationConfiguration" + custom_request_notification: + description: Custom request notification sent upon request approval. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." + risk_sensitivity_override: + allOf: + - $ref: "#/components/schemas/RiskSensitivityEnum" configuration_template_id: description: The ID of the associated configuration template. example: 06851574-e50d-40ca-8c78-f72ae6ab4304 @@ -6161,7 +6926,6 @@ components: reviewer_message_channel_id: description: The message channel id for the reviewer channel. example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - format: uuid type: string source_group_id: description: Sync this owner's user list with a source group. @@ -6223,7 +6987,6 @@ components: reviewer_message_channel_id: description: The message channel id for the reviewer channel. Use "" to remove an existing message channel. example: 37cb7e41-12ba-46da-92ff-030abe0450b1 - format: uuid type: string source_group_id: description: Sync this owner's user list with a source group. Use "" to remove an existing source group. @@ -6527,6 +7290,14 @@ components: - 37cb7e41-12ba-46da-92ff-030abe0450b2 stage: 1 priority: 1 + ticket_propagation: + $ref: "#/components/schemas/TicketPropagationConfiguration" + custom_request_notification: + description: Custom request notification sent upon request approval for this configuration template. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." ConfigurationTemplate: description: |- # Configuration Template Object @@ -6611,6 +7382,29 @@ components: description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template. example: False type: boolean + ticket_propagation: + $ref: "#/components/schemas/TicketPropagationConfiguration" + custom_request_notification: + description: Custom request notification sent upon request approval for this configuration template. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." + TicketPropagationConfiguration: + description: Configuration for ticket propagation, when enabled, a ticket will be created for access changes related to the users in this resource. + type: object + properties: + enabled_on_grant: + type: boolean + enabled_on_revocation: + type: boolean + ticket_provider: + $ref: "#/components/schemas/TicketingProviderEnum" + ticket_project_id: + type: string + required: + - enabled_on_grant + - enabled_on_revocation UpdateConfigurationTemplateInfo: description: |- # UpdateConfigurationTemplateInfo Object @@ -6736,6 +7530,14 @@ components: description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template. example: False type: boolean + ticket_propagation: + $ref: "#/components/schemas/TicketPropagationConfiguration" + custom_request_notification: + description: Custom request notification sent upon request approval for this configuration template. + type: string + maxLength: 800 + nullable: true + example: "Check your email to register your account." PaginatedConfigurationTemplateList: description: |- # PaginatedConfigurationTemplateList Object @@ -6766,6 +7568,100 @@ components: items: $ref: "#/components/schemas/ConfigurationTemplate" type: array + CreateRequestInfo: + description: All the information needed for creating a request + properties: + resources: + type: array + items: + type: object + properties: + id: + description: The ID of the resource requested. Should not be specified if group_id is specified. + example: group283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + access_level_remote_id: + description: The ID of the access level requested on the remote system. + example: arn:aws:iam::490306337630:role/SupportUser + type: string + access_level_name: + description: The ID of the access level requested on the remote system. + example: arn:aws:iam::490306337630:role/SupportUser + type: string + groups: + type: array + items: + type: object + properties: + id: + description: The ID of the group requested. Should not be specified if resource_id is specified. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + access_level_remote_id: + description: The ID of the access level requested on the remote system. + example: arn:aws:iam::490306337630:role/SupportUser + type: string + access_level_name: + description: The ID of the access level requested on the remote system. + example: arn:aws:iam::490306337630:role/SupportUser + type: string + required: + - id + target_user_id: + description: The ID of the user to be granted access. Should not be specified if target_group_id is specified. + example: userd283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + target_group_id: + description: The ID of the group the request is for. Should not be specified if target_user_id is specified. + example: userd283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + reason: + type: string + support_ticket: + type: object + properties: + ticketing_provider: + $ref: "#/components/schemas/TicketingProviderEnum" + remote_id: + type: string + identifier: + type: string + url: + type: string # TODO amruth Does url format exist? + required: + - ticketing_provider + - remote_id + - identifier + - url + duration_minutes: + description: The duration of the request in minutes. -1 represents an indefinite duration + type: integer + minimum: -1 + custom_metadata: + type: array + items: + type: object + properties: + name: + type: string + type: + $ref: "#/components/schemas/RequestTemplateCustomFieldTypeEnum" + value: + type: string + required: + - name + - type + - value + + required: + - reason + - duration_minutes + - resources + - groups securitySchemes: BearerAuth: scheme: bearer diff --git a/docs/Access.md b/docs/Access.md new file mode 100644 index 0000000..796a9f3 --- /dev/null +++ b/docs/Access.md @@ -0,0 +1,37 @@ +# Access + +# Access Object ### Description The `Access` object is used to represent a principal's access to an entity, either directly or inherited. ### Usage Example Fetch from the `LIST ResourceNonHumanIdentities` endpoint. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**principal_id** | **str** | The ID of the principal with access. | +**principal_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**entity_id** | **str** | The ID of the entity being accessed. | +**entity_type** | [**EntityTypeEnum**](EntityTypeEnum.md) | | +**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | [optional] +**expiration_date** | **datetime** | The day and time the principal's access will expire. | +**has_direct_access** | **bool** | The principal has direct access to this entity (vs. inherited access). | +**num_access_paths** | **int** | The number of ways in which the principal has access to this entity (directly and inherited). | + +## Example + +```python +from opal.models.access import Access + +# TODO update the JSON string below +json = "{}" +# create an instance of Access from a JSON string +access_instance = Access.from_json(json) +# print the JSON string representation of the object +print(Access.to_json()) + +# convert the object into a dict +access_dict = access_instance.to_dict() +# create an instance of Access from a dict +access_from_dict = Access.from_dict(access_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccessList.md b/docs/AccessList.md new file mode 100644 index 0000000..7fdf5fc --- /dev/null +++ b/docs/AccessList.md @@ -0,0 +1,29 @@ +# AccessList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[Access]**](Access.md) | | [optional] + +## Example + +```python +from opal.models.access_list import AccessList + +# TODO update the JSON string below +json = "{}" +# create an instance of AccessList from a JSON string +access_list_instance = AccessList.from_json(json) +# print the JSON string representation of the object +print(AccessList.to_json()) + +# convert the object into a dict +access_list_dict = access_list_instance.to_dict() +# create an instance of AccessList from a dict +access_list_from_dict = AccessList.from_dict(access_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddGroupResourceRequest.md b/docs/AddGroupResourceRequest.md index 4125cd9..7e7483d 100644 --- a/docs/AddGroupResourceRequest.md +++ b/docs/AddGroupResourceRequest.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **access_level_remote_id** | **str** | The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. | [optional] +**duration_minutes** | **int** | The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. | [optional] ## Example @@ -22,7 +23,7 @@ print(AddGroupResourceRequest.to_json()) # convert the object into a dict add_group_resource_request_dict = add_group_resource_request_instance.to_dict() # create an instance of AddGroupResourceRequest from a dict -add_group_resource_request_form_dict = add_group_resource_request.from_dict(add_group_resource_request_dict) +add_group_resource_request_from_dict = AddGroupResourceRequest.from_dict(add_group_resource_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AddGroupUserRequest.md b/docs/AddGroupUserRequest.md index 9bb5ebc..97c8365 100644 --- a/docs/AddGroupUserRequest.md +++ b/docs/AddGroupUserRequest.md @@ -23,7 +23,7 @@ print(AddGroupUserRequest.to_json()) # convert the object into a dict add_group_user_request_dict = add_group_user_request_instance.to_dict() # create an instance of AddGroupUserRequest from a dict -add_group_user_request_form_dict = add_group_user_request.from_dict(add_group_user_request_dict) +add_group_user_request_from_dict = AddGroupUserRequest.from_dict(add_group_user_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AddResourceNhiRequest.md b/docs/AddResourceNhiRequest.md new file mode 100644 index 0000000..5f45552 --- /dev/null +++ b/docs/AddResourceNhiRequest.md @@ -0,0 +1,30 @@ +# AddResourceNhiRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**duration_minutes** | **int** | The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. | +**access_level_remote_id** | **str** | The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used. | [optional] + +## Example + +```python +from opal.models.add_resource_nhi_request import AddResourceNhiRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddResourceNhiRequest from a JSON string +add_resource_nhi_request_instance = AddResourceNhiRequest.from_json(json) +# print the JSON string representation of the object +print(AddResourceNhiRequest.to_json()) + +# convert the object into a dict +add_resource_nhi_request_dict = add_resource_nhi_request_instance.to_dict() +# create an instance of AddResourceNhiRequest from a dict +add_resource_nhi_request_from_dict = AddResourceNhiRequest.from_dict(add_resource_nhi_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddResourceUserRequest.md b/docs/AddResourceUserRequest.md index caa8852..824def4 100644 --- a/docs/AddResourceUserRequest.md +++ b/docs/AddResourceUserRequest.md @@ -23,7 +23,7 @@ print(AddResourceUserRequest.to_json()) # convert the object into a dict add_resource_user_request_dict = add_resource_user_request_instance.to_dict() # create an instance of AddResourceUserRequest from a dict -add_resource_user_request_form_dict = add_resource_user_request.from_dict(add_resource_user_request_dict) +add_resource_user_request_from_dict = AddResourceUserRequest.from_dict(add_resource_user_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/App.md b/docs/App.md index 26b823c..a284039 100644 --- a/docs/App.md +++ b/docs/App.md @@ -27,7 +27,7 @@ print(App.to_json()) # convert the object into a dict app_dict = app_instance.to_dict() # create an instance of App from a dict -app_form_dict = app.from_dict(app_dict) +app_from_dict = App.from_dict(app_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AppTypeEnum.md b/docs/AppTypeEnum.md index 57541fe..dd94e93 100644 --- a/docs/AppTypeEnum.md +++ b/docs/AppTypeEnum.md @@ -2,10 +2,53 @@ The type of an app. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ACTIVE_DIRECTORY` (value: `'ACTIVE_DIRECTORY'`) + +* `AZURE_AD` (value: `'AZURE_AD'`) + +* `AWS` (value: `'AWS'`) + +* `AWS_SSO` (value: `'AWS_SSO'`) + +* `CUSTOM` (value: `'CUSTOM'`) + +* `DUO` (value: `'DUO'`) + +* `GCP` (value: `'GCP'`) + +* `GIT_HUB` (value: `'GIT_HUB'`) + +* `GIT_LAB` (value: `'GIT_LAB'`) + +* `GOOGLE_GROUPS` (value: `'GOOGLE_GROUPS'`) + +* `GOOGLE_WORKSPACE` (value: `'GOOGLE_WORKSPACE'`) + +* `LDAP` (value: `'LDAP'`) + +* `MARIADB` (value: `'MARIADB'`) + +* `MONGO` (value: `'MONGO'`) + +* `MONGO_ATLAS` (value: `'MONGO_ATLAS'`) + +* `MYSQL` (value: `'MYSQL'`) + +* `OKTA_DIRECTORY` (value: `'OKTA_DIRECTORY'`) + +* `OPAL` (value: `'OPAL'`) + +* `PAGERDUTY` (value: `'PAGERDUTY'`) + +* `SALESFORCE` (value: `'SALESFORCE'`) + +* `TAILSCALE` (value: `'TAILSCALE'`) + +* `TELEPORT` (value: `'TELEPORT'`) + +* `WORKDAY` (value: `'WORKDAY'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AppsList.md b/docs/AppsList.md index 1de7b85..2b37bad 100644 --- a/docs/AppsList.md +++ b/docs/AppsList.md @@ -23,7 +23,7 @@ print(AppsList.to_json()) # convert the object into a dict apps_list_dict = apps_list_instance.to_dict() # create an instance of AppsList from a dict -apps_list_form_dict = apps_list.from_dict(apps_list_dict) +apps_list_from_dict = AppsList.from_dict(apps_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AwsPermissionSetMetadata.md b/docs/AwsPermissionSetMetadata.md index 1ed5fa1..c9e5d6a 100644 --- a/docs/AwsPermissionSetMetadata.md +++ b/docs/AwsPermissionSetMetadata.md @@ -23,7 +23,7 @@ print(AwsPermissionSetMetadata.to_json()) # convert the object into a dict aws_permission_set_metadata_dict = aws_permission_set_metadata_instance.to_dict() # create an instance of AwsPermissionSetMetadata from a dict -aws_permission_set_metadata_form_dict = aws_permission_set_metadata.from_dict(aws_permission_set_metadata_dict) +aws_permission_set_metadata_from_dict = AwsPermissionSetMetadata.from_dict(aws_permission_set_metadata_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AwsPermissionSetMetadataAwsPermissionSet.md b/docs/AwsPermissionSetMetadataAwsPermissionSet.md index c393d4a..8732133 100644 --- a/docs/AwsPermissionSetMetadataAwsPermissionSet.md +++ b/docs/AwsPermissionSetMetadataAwsPermissionSet.md @@ -23,7 +23,7 @@ print(AwsPermissionSetMetadataAwsPermissionSet.to_json()) # convert the object into a dict aws_permission_set_metadata_aws_permission_set_dict = aws_permission_set_metadata_aws_permission_set_instance.to_dict() # create an instance of AwsPermissionSetMetadataAwsPermissionSet from a dict -aws_permission_set_metadata_aws_permission_set_form_dict = aws_permission_set_metadata_aws_permission_set.from_dict(aws_permission_set_metadata_aws_permission_set_dict) +aws_permission_set_metadata_aws_permission_set_from_dict = AwsPermissionSetMetadataAwsPermissionSet.from_dict(aws_permission_set_metadata_aws_permission_set_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Condition.md b/docs/Condition.md index c955800..05ab82b 100644 --- a/docs/Condition.md +++ b/docs/Condition.md @@ -24,7 +24,7 @@ print(Condition.to_json()) # convert the object into a dict condition_dict = condition_instance.to_dict() # create an instance of Condition from a dict -condition_form_dict = condition.from_dict(condition_dict) +condition_from_dict = Condition.from_dict(condition_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConfigurationTemplate.md b/docs/ConfigurationTemplate.md index 7e15659..0ecd24f 100644 --- a/docs/ConfigurationTemplate.md +++ b/docs/ConfigurationTemplate.md @@ -9,13 +9,15 @@ Name | Type | Description | Notes **configuration_template_id** | **str** | The ID of the configuration template. | [optional] **name** | **str** | The name of the configuration template. | [optional] **admin_owner_id** | **str** | The ID of the owner of the configuration template. | [optional] -**visibility** | [**VisibilityInfo**](VisibilityInfo.md) | | [optional] +**visibility** | [**VisibilityInfo**](VisibilityInfo.md) | The visibility info of the configuration template. | [optional] **linked_audit_message_channel_ids** | **List[str]** | The IDs of the audit message channels linked to the configuration template. | [optional] **request_configuration_id** | **str** | The ID of the request configuration linked to the configuration template. | [optional] **member_oncall_schedule_ids** | **List[str]** | The IDs of the on-call schedules linked to the configuration template. | [optional] **break_glass_user_ids** | **List[str]** | The IDs of the break glass users linked to the configuration template. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. | [optional] **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to resources associated with this configuration template. | [optional] +**ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] +**custom_request_notification** | **str** | Custom request notification sent upon request approval for this configuration template. | [optional] ## Example @@ -32,7 +34,7 @@ print(ConfigurationTemplate.to_json()) # convert the object into a dict configuration_template_dict = configuration_template_instance.to_dict() # create an instance of ConfigurationTemplate from a dict -configuration_template_form_dict = configuration_template.from_dict(configuration_template_dict) +configuration_template_from_dict = ConfigurationTemplate.from_dict(configuration_template_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConfigurationTemplatesApi.md b/docs/ConfigurationTemplatesApi.md index d996919..fb93185 100644 --- a/docs/ConfigurationTemplatesApi.md +++ b/docs/ConfigurationTemplatesApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.opal.dev/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_configuration_template**](ConfigurationTemplatesApi.md#create_configuration_template) | **POST** /configuration-templates | +[**delete_configuration_template**](ConfigurationTemplatesApi.md#delete_configuration_template) | **DELETE** /configuration-templates/{configuration_template_id} | [**get_configuration_templates**](ConfigurationTemplatesApi.md#get_configuration_templates) | **GET** /configuration-templates | [**update_configuration_template**](ConfigurationTemplatesApi.md#update_configuration_template) | **PUT** /configuration-templates | @@ -87,6 +88,80 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_configuration_template** +> delete_configuration_template(configuration_template_id) + + + +Deletes a configuration template. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.ConfigurationTemplatesApi(api_client) + configuration_template_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the configuration template. + + try: + api_instance.delete_configuration_template(configuration_template_id) + except Exception as e: + print("Exception when calling ConfigurationTemplatesApi->delete_configuration_template: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **configuration_template_id** | **str**| The ID of the configuration template. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The configuration template was successfully deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_configuration_templates** > PaginatedConfigurationTemplateList get_configuration_templates() diff --git a/docs/CreateConfigurationTemplateInfo.md b/docs/CreateConfigurationTemplateInfo.md index aa7d6aa..d48c031 100644 --- a/docs/CreateConfigurationTemplateInfo.md +++ b/docs/CreateConfigurationTemplateInfo.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **admin_owner_id** | **str** | The ID of the owner of the configuration template. | -**visibility** | [**VisibilityInfo**](VisibilityInfo.md) | | +**visibility** | [**VisibilityInfo**](VisibilityInfo.md) | The visibility info of the configuration template. | **linked_audit_message_channel_ids** | **List[str]** | The IDs of the audit message channels linked to the configuration template. | [optional] **member_oncall_schedule_ids** | **List[str]** | The IDs of the on-call schedules linked to the configuration template. | [optional] **break_glass_user_ids** | **List[str]** | The IDs of the break glass users linked to the configuration template. | [optional] @@ -15,7 +15,9 @@ Name | Type | Description | Notes **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to resources associated with this configuration template. | **name** | **str** | The name of the configuration template. | **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. | [optional] -**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | | [optional] +**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. | [optional] +**ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] +**custom_request_notification** | **str** | Custom request notification sent upon request approval for this configuration template. | [optional] ## Example @@ -32,7 +34,7 @@ print(CreateConfigurationTemplateInfo.to_json()) # convert the object into a dict create_configuration_template_info_dict = create_configuration_template_info_instance.to_dict() # create an instance of CreateConfigurationTemplateInfo from a dict -create_configuration_template_info_form_dict = create_configuration_template_info.from_dict(create_configuration_template_info_dict) +create_configuration_template_info_from_dict = CreateConfigurationTemplateInfo.from_dict(create_configuration_template_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateGroupBindingInfo.md b/docs/CreateGroupBindingInfo.md index 82fd0d9..d82d8d6 100644 --- a/docs/CreateGroupBindingInfo.md +++ b/docs/CreateGroupBindingInfo.md @@ -24,7 +24,7 @@ print(CreateGroupBindingInfo.to_json()) # convert the object into a dict create_group_binding_info_dict = create_group_binding_info_instance.to_dict() # create an instance of CreateGroupBindingInfo from a dict -create_group_binding_info_form_dict = create_group_binding_info.from_dict(create_group_binding_info_dict) +create_group_binding_info_from_dict = CreateGroupBindingInfo.from_dict(create_group_binding_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateGroupBindingInfoGroupsInner.md b/docs/CreateGroupBindingInfoGroupsInner.md index 5203465..8d98146 100644 --- a/docs/CreateGroupBindingInfoGroupsInner.md +++ b/docs/CreateGroupBindingInfoGroupsInner.md @@ -22,7 +22,7 @@ print(CreateGroupBindingInfoGroupsInner.to_json()) # convert the object into a dict create_group_binding_info_groups_inner_dict = create_group_binding_info_groups_inner_instance.to_dict() # create an instance of CreateGroupBindingInfoGroupsInner from a dict -create_group_binding_info_groups_inner_form_dict = create_group_binding_info_groups_inner.from_dict(create_group_binding_info_groups_inner_dict) +create_group_binding_info_groups_inner_from_dict = CreateGroupBindingInfoGroupsInner.from_dict(create_group_binding_info_groups_inner_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateGroupInfo.md b/docs/CreateGroupInfo.md index f982dbe..5cea922 100644 --- a/docs/CreateGroupInfo.md +++ b/docs/CreateGroupInfo.md @@ -13,6 +13,8 @@ Name | Type | Description | Notes **remote_info** | [**GroupRemoteInfo**](GroupRemoteInfo.md) | | [optional] **remote_group_id** | **str** | Deprecated - use remote_info instead. The ID of the group on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. | [optional] **metadata** | **str** | Deprecated - use remote_info instead. JSON metadata about the remote group. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on group_type and should have the following schema: <style type=\"text/css\"> code {max-height:300px !important} </style> ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Group Metadata\", \"properties\": { \"ad_group\": { \"properties\": { \"object_guid\": { \"type\": \"string\" } }, \"required\": [\"object_guid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Active Directory Group\" }, \"duo_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Duo Group\" }, \"git_hub_team\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"team_slug\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"team_slug\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Team\" }, \"google_groups_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Google Groups Group\" }, \"ldap_group\": { \"properties\": { \"group_uid\": { \"type\": \"string\" } }, \"required\": [\"group_uid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"LDAP Group\" }, \"okta_directory_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Group\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ``` | [optional] +**custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] ## Example @@ -29,7 +31,7 @@ print(CreateGroupInfo.to_json()) # convert the object into a dict create_group_info_dict = create_group_info_instance.to_dict() # create an instance of CreateGroupInfo from a dict -create_group_info_form_dict = create_group_info.from_dict(create_group_info_dict) +create_group_info_from_dict = CreateGroupInfo.from_dict(create_group_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateMessageChannelInfo.md b/docs/CreateMessageChannelInfo.md index cec9b4d..7e116d2 100644 --- a/docs/CreateMessageChannelInfo.md +++ b/docs/CreateMessageChannelInfo.md @@ -24,7 +24,7 @@ print(CreateMessageChannelInfo.to_json()) # convert the object into a dict create_message_channel_info_dict = create_message_channel_info_instance.to_dict() # create an instance of CreateMessageChannelInfo from a dict -create_message_channel_info_form_dict = create_message_channel_info.from_dict(create_message_channel_info_dict) +create_message_channel_info_from_dict = CreateMessageChannelInfo.from_dict(create_message_channel_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOnCallScheduleInfo.md b/docs/CreateOnCallScheduleInfo.md index 896dcbc..1c7579c 100644 --- a/docs/CreateOnCallScheduleInfo.md +++ b/docs/CreateOnCallScheduleInfo.md @@ -24,7 +24,7 @@ print(CreateOnCallScheduleInfo.to_json()) # convert the object into a dict create_on_call_schedule_info_dict = create_on_call_schedule_info_instance.to_dict() # create an instance of CreateOnCallScheduleInfo from a dict -create_on_call_schedule_info_form_dict = create_on_call_schedule_info.from_dict(create_on_call_schedule_info_dict) +create_on_call_schedule_info_from_dict = CreateOnCallScheduleInfo.from_dict(create_on_call_schedule_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOwnerInfo.md b/docs/CreateOwnerInfo.md index cc2388b..17df6bf 100644 --- a/docs/CreateOwnerInfo.md +++ b/docs/CreateOwnerInfo.md @@ -28,7 +28,7 @@ print(CreateOwnerInfo.to_json()) # convert the object into a dict create_owner_info_dict = create_owner_info_instance.to_dict() # create an instance of CreateOwnerInfo from a dict -create_owner_info_form_dict = create_owner_info.from_dict(create_owner_info_dict) +create_owner_info_from_dict = CreateOwnerInfo.from_dict(create_owner_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateRequest200Response.md b/docs/CreateRequest200Response.md new file mode 100644 index 0000000..2253f17 --- /dev/null +++ b/docs/CreateRequest200Response.md @@ -0,0 +1,29 @@ +# CreateRequest200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] + +## Example + +```python +from opal.models.create_request200_response import CreateRequest200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequest200Response from a JSON string +create_request200_response_instance = CreateRequest200Response.from_json(json) +# print the JSON string representation of the object +print(CreateRequest200Response.to_json()) + +# convert the object into a dict +create_request200_response_dict = create_request200_response_instance.to_dict() +# create an instance of CreateRequest200Response from a dict +create_request200_response_from_dict = CreateRequest200Response.from_dict(create_request200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRequestConfigurationInfoList.md b/docs/CreateRequestConfigurationInfoList.md index c4d21cd..5127e62 100644 --- a/docs/CreateRequestConfigurationInfoList.md +++ b/docs/CreateRequestConfigurationInfoList.md @@ -23,7 +23,7 @@ print(CreateRequestConfigurationInfoList.to_json()) # convert the object into a dict create_request_configuration_info_list_dict = create_request_configuration_info_list_instance.to_dict() # create an instance of CreateRequestConfigurationInfoList from a dict -create_request_configuration_info_list_form_dict = create_request_configuration_info_list.from_dict(create_request_configuration_info_list_dict) +create_request_configuration_info_list_from_dict = CreateRequestConfigurationInfoList.from_dict(create_request_configuration_info_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateRequestInfo.md b/docs/CreateRequestInfo.md new file mode 100644 index 0000000..e582cbe --- /dev/null +++ b/docs/CreateRequestInfo.md @@ -0,0 +1,37 @@ +# CreateRequestInfo + +All the information needed for creating a request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**List[CreateRequestInfoResourcesInner]**](CreateRequestInfoResourcesInner.md) | | +**groups** | [**List[CreateRequestInfoGroupsInner]**](CreateRequestInfoGroupsInner.md) | | +**target_user_id** | **str** | The ID of the user to be granted access. Should not be specified if target_group_id is specified. | [optional] +**target_group_id** | **str** | The ID of the group the request is for. Should not be specified if target_user_id is specified. | [optional] +**reason** | **str** | | +**support_ticket** | [**CreateRequestInfoSupportTicket**](CreateRequestInfoSupportTicket.md) | | [optional] +**duration_minutes** | **int** | The duration of the request in minutes. -1 represents an indefinite duration | +**custom_metadata** | [**List[CreateRequestInfoCustomMetadataInner]**](CreateRequestInfoCustomMetadataInner.md) | | [optional] + +## Example + +```python +from opal.models.create_request_info import CreateRequestInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequestInfo from a JSON string +create_request_info_instance = CreateRequestInfo.from_json(json) +# print the JSON string representation of the object +print(CreateRequestInfo.to_json()) + +# convert the object into a dict +create_request_info_dict = create_request_info_instance.to_dict() +# create an instance of CreateRequestInfo from a dict +create_request_info_from_dict = CreateRequestInfo.from_dict(create_request_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRequestInfoCustomMetadataInner.md b/docs/CreateRequestInfoCustomMetadataInner.md new file mode 100644 index 0000000..bec5c10 --- /dev/null +++ b/docs/CreateRequestInfoCustomMetadataInner.md @@ -0,0 +1,31 @@ +# CreateRequestInfoCustomMetadataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**type** | [**RequestTemplateCustomFieldTypeEnum**](RequestTemplateCustomFieldTypeEnum.md) | | +**value** | **str** | | + +## Example + +```python +from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequestInfoCustomMetadataInner from a JSON string +create_request_info_custom_metadata_inner_instance = CreateRequestInfoCustomMetadataInner.from_json(json) +# print the JSON string representation of the object +print(CreateRequestInfoCustomMetadataInner.to_json()) + +# convert the object into a dict +create_request_info_custom_metadata_inner_dict = create_request_info_custom_metadata_inner_instance.to_dict() +# create an instance of CreateRequestInfoCustomMetadataInner from a dict +create_request_info_custom_metadata_inner_from_dict = CreateRequestInfoCustomMetadataInner.from_dict(create_request_info_custom_metadata_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRequestInfoGroupsInner.md b/docs/CreateRequestInfoGroupsInner.md new file mode 100644 index 0000000..452d4eb --- /dev/null +++ b/docs/CreateRequestInfoGroupsInner.md @@ -0,0 +1,31 @@ +# CreateRequestInfoGroupsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of the group requested. Should not be specified if resource_id is specified. | +**access_level_remote_id** | **str** | The ID of the access level requested on the remote system. | [optional] +**access_level_name** | **str** | The ID of the access level requested on the remote system. | [optional] + +## Example + +```python +from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequestInfoGroupsInner from a JSON string +create_request_info_groups_inner_instance = CreateRequestInfoGroupsInner.from_json(json) +# print the JSON string representation of the object +print(CreateRequestInfoGroupsInner.to_json()) + +# convert the object into a dict +create_request_info_groups_inner_dict = create_request_info_groups_inner_instance.to_dict() +# create an instance of CreateRequestInfoGroupsInner from a dict +create_request_info_groups_inner_from_dict = CreateRequestInfoGroupsInner.from_dict(create_request_info_groups_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRequestInfoResourcesInner.md b/docs/CreateRequestInfoResourcesInner.md new file mode 100644 index 0000000..dde41b2 --- /dev/null +++ b/docs/CreateRequestInfoResourcesInner.md @@ -0,0 +1,31 @@ +# CreateRequestInfoResourcesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of the resource requested. Should not be specified if group_id is specified. | [optional] +**access_level_remote_id** | **str** | The ID of the access level requested on the remote system. | [optional] +**access_level_name** | **str** | The ID of the access level requested on the remote system. | [optional] + +## Example + +```python +from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequestInfoResourcesInner from a JSON string +create_request_info_resources_inner_instance = CreateRequestInfoResourcesInner.from_json(json) +# print the JSON string representation of the object +print(CreateRequestInfoResourcesInner.to_json()) + +# convert the object into a dict +create_request_info_resources_inner_dict = create_request_info_resources_inner_instance.to_dict() +# create an instance of CreateRequestInfoResourcesInner from a dict +create_request_info_resources_inner_from_dict = CreateRequestInfoResourcesInner.from_dict(create_request_info_resources_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateRequestInfoSupportTicket.md b/docs/CreateRequestInfoSupportTicket.md new file mode 100644 index 0000000..cea68d8 --- /dev/null +++ b/docs/CreateRequestInfoSupportTicket.md @@ -0,0 +1,32 @@ +# CreateRequestInfoSupportTicket + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ticketing_provider** | [**TicketingProviderEnum**](TicketingProviderEnum.md) | | +**remote_id** | **str** | | +**identifier** | **str** | | +**url** | **str** | | + +## Example + +```python +from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRequestInfoSupportTicket from a JSON string +create_request_info_support_ticket_instance = CreateRequestInfoSupportTicket.from_json(json) +# print the JSON string representation of the object +print(CreateRequestInfoSupportTicket.to_json()) + +# convert the object into a dict +create_request_info_support_ticket_dict = create_request_info_support_ticket_instance.to_dict() +# create an instance of CreateRequestInfoSupportTicket from a dict +create_request_info_support_ticket_from_dict = CreateRequestInfoSupportTicket.from_dict(create_request_info_support_ticket_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateResourceInfo.md b/docs/CreateResourceInfo.md index 1309210..fad1f7c 100644 --- a/docs/CreateResourceInfo.md +++ b/docs/CreateResourceInfo.md @@ -13,6 +13,8 @@ Name | Type | Description | Notes **remote_info** | [**ResourceRemoteInfo**](ResourceRemoteInfo.md) | | [optional] **remote_resource_id** | **str** | Deprecated - use remote_info instead. The ID of the resource on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. | [optional] **metadata** | **str** | Deprecated - use remote_info instead. JSON metadata about the remote resource. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on resource_type and should have the following schema: <style type=\"text/css\"> code {max-height:300px !important} </style> ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Resource Metadata\", \"properties\": { \"aws_ec2_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"region\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EC2 Instance\" }, \"aws_eks_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" }, \"cluster_region\": { \"type\": \"string\" }, \"cluster_arn\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\", \"cluster_region\", \"cluster_arn\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EKS Cluster\" }, \"aws_rds_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"engine\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" }, \"resource_id\": { \"type\": \"string\" }, \"database_name\": { \"type\": \"string\" } }, \"required\": [ \"instance_id\", \"engine\", \"region\", \"resource_id\", \"database_name\" ], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS RDS Instance\" }, \"aws_role\": { \"properties\": { \"arn\": { \"type\": \"string\" }, \"name\": { \"type\": \"string\" } }, \"required\": [\"arn\", \"name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS Role\" }, \"gcp_bucket\": { \"properties\": { \"bucket_id\": { \"type\": \"string\" } }, \"required\": [\"bucket_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Bucket\" }, \"gcp_compute_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" }, \"zone\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\", \"zone\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Compute Instance\" }, \"gcp_folder\": { \"properties\": { \"folder_id\": { \"type\": \"string\" } }, \"required\": [\"folder_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Folder\" }, \"gcp_gke_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP GKE Cluster\" }, \"gcp_project\": { \"properties\": { \"project_id\": { \"type\": \"string\" } }, \"required\": [\"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Project\" }, \"gcp_sql_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP SQL Instance\" }, \"git_hub_repo\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"repo_name\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"repo_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Repo\" }, \"okta_directory_app\": { \"properties\": { \"app_id\": { \"type\": \"string\" }, \"logo_url\": { \"type\": \"string\" } }, \"required\": [\"app_id\", \"logo_url\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory App\" }, \"okta_directory_role\": { \"properties\": { \"role_type\": { \"type\": \"string\" }, \"role_id\": { \"type\": \"string\" } }, \"required\": [\"role_type\", \"role_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Role\" }, \"salesforce_profile\": { \"properties\": { \"user_license\": { \"type\": \"string\" } }, \"required\": [\"user_license\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Salesforce Profile\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ``` | [optional] +**custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] ## Example @@ -29,7 +31,7 @@ print(CreateResourceInfo.to_json()) # convert the object into a dict create_resource_info_dict = create_resource_info_instance.to_dict() # create an instance of CreateResourceInfo from a dict -create_resource_info_form_dict = create_resource_info.from_dict(create_resource_info_dict) +create_resource_info_from_dict = CreateResourceInfo.from_dict(create_resource_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateTagInfo.md b/docs/CreateTagInfo.md index c90232a..39d87b7 100644 --- a/docs/CreateTagInfo.md +++ b/docs/CreateTagInfo.md @@ -24,7 +24,7 @@ print(CreateTagInfo.to_json()) # convert the object into a dict create_tag_info_dict = create_tag_info_instance.to_dict() # create an instance of CreateTagInfo from a dict -create_tag_info_form_dict = create_tag_info.from_dict(create_tag_info_dict) +create_tag_info_from_dict = CreateTagInfo.from_dict(create_tag_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUARInfo.md b/docs/CreateUARInfo.md index 664c2a5..ed2abef 100644 --- a/docs/CreateUARInfo.md +++ b/docs/CreateUARInfo.md @@ -12,6 +12,8 @@ Name | Type | Description | Notes **deadline** | **datetime** | The last day for reviewers to complete their access reviews. | **time_zone** | **str** | The time zone name (as defined by the IANA Time Zone database) used in the access review deadline and exported audit report. Default is America/Los_Angeles. | **self_review_allowed** | **bool** | A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. | +**reminder_schedule** | **List[int]** | | [optional] +**reminder_include_manager** | **bool** | | [optional] **uar_scope** | [**UARScope**](UARScope.md) | | [optional] ## Example @@ -29,7 +31,7 @@ print(CreateUARInfo.to_json()) # convert the object into a dict create_uar_info_dict = create_uar_info_instance.to_dict() # create an instance of CreateUARInfo from a dict -create_uar_info_form_dict = create_uar_info.from_dict(create_uar_info_dict) +create_uar_info_from_dict = CreateUARInfo.from_dict(create_uar_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EntityTypeEnum.md b/docs/EntityTypeEnum.md index 836be4b..5428e54 100644 --- a/docs/EntityTypeEnum.md +++ b/docs/EntityTypeEnum.md @@ -2,10 +2,13 @@ The type of an entity. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `GROUP` (value: `'GROUP'`) + +* `RESOURCE` (value: `'RESOURCE'`) + +* `USER` (value: `'USER'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Event.md b/docs/Event.md index 3ceea73..0202e42 100644 --- a/docs/Event.md +++ b/docs/Event.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **event_id** | **str** | The ID of the event. | **actor_user_id** | **str** | The ID of the actor user. | -**actor_name** | **object** | The name of the actor user. | +**actor_name** | **object** | | **actor_email** | **str** | The email of the actor user. | [optional] **event_type** | **str** | The event type. | **created_at** | **datetime** | The day and time the event was created. | @@ -32,7 +32,7 @@ print(Event.to_json()) # convert the object into a dict event_dict = event_instance.to_dict() # create an instance of Event from a dict -event_form_dict = event.from_dict(event_dict) +event_from_dict = Event.from_dict(event_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Group.md b/docs/Group.md index ec842e4..2100e72 100644 --- a/docs/Group.md +++ b/docs/Group.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **name** | **str** | The name of the group. | [optional] **description** | **str** | A description of the group. | [optional] **admin_owner_id** | **str** | The ID of the owner of the group. | [optional] +**group_leader_user_ids** | **List[str]** | A list of User IDs for the group leaders of the group | [optional] **remote_id** | **str** | The ID of the remote. | [optional] **remote_name** | **str** | The name of the remote. | [optional] **group_type** | [**GroupTypeEnum**](GroupTypeEnum.md) | | [optional] @@ -29,6 +30,9 @@ Name | Type | Description | Notes **request_configuration_list** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of request configurations for this group. Deprecated in favor of `request_configurations`. | [optional] **metadata** | **str** | JSON metadata about the remote group. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details. | [optional] **remote_info** | [**GroupRemoteInfo**](GroupRemoteInfo.md) | | [optional] +**custom_request_notification** | **str** | Custom request notification sent to the requester when the request is approved. | [optional] +**risk_sensitivity** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | The risk sensitivity level for the group. When an override is set, this field will match that. | [optional] [readonly] +**risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] ## Example @@ -45,7 +49,7 @@ print(Group.to_json()) # convert the object into a dict group_dict = group_instance.to_dict() # create an instance of Group from a dict -group_form_dict = group.from_dict(group_dict) +group_from_dict = Group.from_dict(group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupAccessLevel.md b/docs/GroupAccessLevel.md index b39379d..39cea63 100644 --- a/docs/GroupAccessLevel.md +++ b/docs/GroupAccessLevel.md @@ -24,7 +24,7 @@ print(GroupAccessLevel.to_json()) # convert the object into a dict group_access_level_dict = group_access_level_instance.to_dict() # create an instance of GroupAccessLevel from a dict -group_access_level_form_dict = group_access_level.from_dict(group_access_level_dict) +group_access_level_from_dict = GroupAccessLevel.from_dict(group_access_level_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupBinding.md b/docs/GroupBinding.md index 0fccfba..e055eb4 100644 --- a/docs/GroupBinding.md +++ b/docs/GroupBinding.md @@ -27,7 +27,7 @@ print(GroupBinding.to_json()) # convert the object into a dict group_binding_dict = group_binding_instance.to_dict() # create an instance of GroupBinding from a dict -group_binding_form_dict = group_binding.from_dict(group_binding_dict) +group_binding_from_dict = GroupBinding.from_dict(group_binding_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupBindingGroup.md b/docs/GroupBindingGroup.md index 64b4caf..36d0516 100644 --- a/docs/GroupBindingGroup.md +++ b/docs/GroupBindingGroup.md @@ -24,7 +24,7 @@ print(GroupBindingGroup.to_json()) # convert the object into a dict group_binding_group_dict = group_binding_group_instance.to_dict() # create an instance of GroupBindingGroup from a dict -group_binding_group_form_dict = group_binding_group.from_dict(group_binding_group_dict) +group_binding_group_from_dict = GroupBindingGroup.from_dict(group_binding_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfo.md b/docs/GroupRemoteInfo.md index f09611a..96aa564 100644 --- a/docs/GroupRemoteInfo.md +++ b/docs/GroupRemoteInfo.md @@ -31,7 +31,7 @@ print(GroupRemoteInfo.to_json()) # convert the object into a dict group_remote_info_dict = group_remote_info_instance.to_dict() # create an instance of GroupRemoteInfo from a dict -group_remote_info_form_dict = group_remote_info.from_dict(group_remote_info_dict) +group_remote_info_from_dict = GroupRemoteInfo.from_dict(group_remote_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoActiveDirectoryGroup.md b/docs/GroupRemoteInfoActiveDirectoryGroup.md index 842fc2d..99afbb6 100644 --- a/docs/GroupRemoteInfoActiveDirectoryGroup.md +++ b/docs/GroupRemoteInfoActiveDirectoryGroup.md @@ -23,7 +23,7 @@ print(GroupRemoteInfoActiveDirectoryGroup.to_json()) # convert the object into a dict group_remote_info_active_directory_group_dict = group_remote_info_active_directory_group_instance.to_dict() # create an instance of GroupRemoteInfoActiveDirectoryGroup from a dict -group_remote_info_active_directory_group_form_dict = group_remote_info_active_directory_group.from_dict(group_remote_info_active_directory_group_dict) +group_remote_info_active_directory_group_from_dict = GroupRemoteInfoActiveDirectoryGroup.from_dict(group_remote_info_active_directory_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md b/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md index 06c566f..0668c1d 100644 --- a/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md +++ b/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md @@ -1,12 +1,12 @@ # GroupRemoteInfoAzureAdMicrosoft365Group -Remote info for Azure AD Microsoft 365 group. +Remote info for Microsoft Entra ID Microsoft 365 group. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**group_id** | **str** | The id of the Azure AD Microsoft 365 group. | +**group_id** | **str** | The id of the Microsoft Entra ID Microsoft 365 group. | ## Example @@ -23,7 +23,7 @@ print(GroupRemoteInfoAzureAdMicrosoft365Group.to_json()) # convert the object into a dict group_remote_info_azure_ad_microsoft365_group_dict = group_remote_info_azure_ad_microsoft365_group_instance.to_dict() # create an instance of GroupRemoteInfoAzureAdMicrosoft365Group from a dict -group_remote_info_azure_ad_microsoft365_group_form_dict = group_remote_info_azure_ad_microsoft365_group.from_dict(group_remote_info_azure_ad_microsoft365_group_dict) +group_remote_info_azure_ad_microsoft365_group_from_dict = GroupRemoteInfoAzureAdMicrosoft365Group.from_dict(group_remote_info_azure_ad_microsoft365_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoAzureAdSecurityGroup.md b/docs/GroupRemoteInfoAzureAdSecurityGroup.md index 5f729c0..c71ca22 100644 --- a/docs/GroupRemoteInfoAzureAdSecurityGroup.md +++ b/docs/GroupRemoteInfoAzureAdSecurityGroup.md @@ -1,12 +1,12 @@ # GroupRemoteInfoAzureAdSecurityGroup -Remote info for Azure AD Security group. +Remote info for Microsoft Entra ID Security group. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**group_id** | **str** | The id of the Azure AD Security group. | +**group_id** | **str** | The id of the Microsoft Entra ID Security group. | ## Example @@ -23,7 +23,7 @@ print(GroupRemoteInfoAzureAdSecurityGroup.to_json()) # convert the object into a dict group_remote_info_azure_ad_security_group_dict = group_remote_info_azure_ad_security_group_instance.to_dict() # create an instance of GroupRemoteInfoAzureAdSecurityGroup from a dict -group_remote_info_azure_ad_security_group_form_dict = group_remote_info_azure_ad_security_group.from_dict(group_remote_info_azure_ad_security_group_dict) +group_remote_info_azure_ad_security_group_from_dict = GroupRemoteInfoAzureAdSecurityGroup.from_dict(group_remote_info_azure_ad_security_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoDuoGroup.md b/docs/GroupRemoteInfoDuoGroup.md index 9147931..f5a6e72 100644 --- a/docs/GroupRemoteInfoDuoGroup.md +++ b/docs/GroupRemoteInfoDuoGroup.md @@ -23,7 +23,7 @@ print(GroupRemoteInfoDuoGroup.to_json()) # convert the object into a dict group_remote_info_duo_group_dict = group_remote_info_duo_group_instance.to_dict() # create an instance of GroupRemoteInfoDuoGroup from a dict -group_remote_info_duo_group_form_dict = group_remote_info_duo_group.from_dict(group_remote_info_duo_group_dict) +group_remote_info_duo_group_from_dict = GroupRemoteInfoDuoGroup.from_dict(group_remote_info_duo_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoGithubTeam.md b/docs/GroupRemoteInfoGithubTeam.md index 828cfb2..7bc2441 100644 --- a/docs/GroupRemoteInfoGithubTeam.md +++ b/docs/GroupRemoteInfoGithubTeam.md @@ -24,7 +24,7 @@ print(GroupRemoteInfoGithubTeam.to_json()) # convert the object into a dict group_remote_info_github_team_dict = group_remote_info_github_team_instance.to_dict() # create an instance of GroupRemoteInfoGithubTeam from a dict -group_remote_info_github_team_form_dict = group_remote_info_github_team.from_dict(group_remote_info_github_team_dict) +group_remote_info_github_team_from_dict = GroupRemoteInfoGithubTeam.from_dict(group_remote_info_github_team_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoGitlabGroup.md b/docs/GroupRemoteInfoGitlabGroup.md index 271ab7c..b0ba352 100644 --- a/docs/GroupRemoteInfoGitlabGroup.md +++ b/docs/GroupRemoteInfoGitlabGroup.md @@ -23,7 +23,7 @@ print(GroupRemoteInfoGitlabGroup.to_json()) # convert the object into a dict group_remote_info_gitlab_group_dict = group_remote_info_gitlab_group_instance.to_dict() # create an instance of GroupRemoteInfoGitlabGroup from a dict -group_remote_info_gitlab_group_form_dict = group_remote_info_gitlab_group.from_dict(group_remote_info_gitlab_group_dict) +group_remote_info_gitlab_group_from_dict = GroupRemoteInfoGitlabGroup.from_dict(group_remote_info_gitlab_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoGoogleGroup.md b/docs/GroupRemoteInfoGoogleGroup.md index ce61103..a60b69b 100644 --- a/docs/GroupRemoteInfoGoogleGroup.md +++ b/docs/GroupRemoteInfoGoogleGroup.md @@ -23,7 +23,7 @@ print(GroupRemoteInfoGoogleGroup.to_json()) # convert the object into a dict group_remote_info_google_group_dict = group_remote_info_google_group_instance.to_dict() # create an instance of GroupRemoteInfoGoogleGroup from a dict -group_remote_info_google_group_form_dict = group_remote_info_google_group.from_dict(group_remote_info_google_group_dict) +group_remote_info_google_group_from_dict = GroupRemoteInfoGoogleGroup.from_dict(group_remote_info_google_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoLdapGroup.md b/docs/GroupRemoteInfoLdapGroup.md index ae689a8..fa14612 100644 --- a/docs/GroupRemoteInfoLdapGroup.md +++ b/docs/GroupRemoteInfoLdapGroup.md @@ -23,7 +23,7 @@ print(GroupRemoteInfoLdapGroup.to_json()) # convert the object into a dict group_remote_info_ldap_group_dict = group_remote_info_ldap_group_instance.to_dict() # create an instance of GroupRemoteInfoLdapGroup from a dict -group_remote_info_ldap_group_form_dict = group_remote_info_ldap_group.from_dict(group_remote_info_ldap_group_dict) +group_remote_info_ldap_group_from_dict = GroupRemoteInfoLdapGroup.from_dict(group_remote_info_ldap_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupRemoteInfoOktaGroup.md b/docs/GroupRemoteInfoOktaGroup.md index d9b29fd..df55e1d 100644 --- a/docs/GroupRemoteInfoOktaGroup.md +++ b/docs/GroupRemoteInfoOktaGroup.md @@ -23,7 +23,7 @@ print(GroupRemoteInfoOktaGroup.to_json()) # convert the object into a dict group_remote_info_okta_group_dict = group_remote_info_okta_group_instance.to_dict() # create an instance of GroupRemoteInfoOktaGroup from a dict -group_remote_info_okta_group_form_dict = group_remote_info_okta_group.from_dict(group_remote_info_okta_group_dict) +group_remote_info_okta_group_from_dict = GroupRemoteInfoOktaGroup.from_dict(group_remote_info_okta_group_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupResource.md b/docs/GroupResource.md index 428fabe..a449099 100644 --- a/docs/GroupResource.md +++ b/docs/GroupResource.md @@ -25,7 +25,7 @@ print(GroupResource.to_json()) # convert the object into a dict group_resource_dict = group_resource_instance.to_dict() # create an instance of GroupResource from a dict -group_resource_form_dict = group_resource.from_dict(group_resource_dict) +group_resource_from_dict = GroupResource.from_dict(group_resource_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupResourceList.md b/docs/GroupResourceList.md index 8f7acde..facaa32 100644 --- a/docs/GroupResourceList.md +++ b/docs/GroupResourceList.md @@ -22,7 +22,7 @@ print(GroupResourceList.to_json()) # convert the object into a dict group_resource_list_dict = group_resource_list_instance.to_dict() # create an instance of GroupResourceList from a dict -group_resource_list_form_dict = group_resource_list.from_dict(group_resource_list_dict) +group_resource_list_from_dict = GroupResourceList.from_dict(group_resource_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupTypeEnum.md b/docs/GroupTypeEnum.md index 8b477bd..86a4f1f 100644 --- a/docs/GroupTypeEnum.md +++ b/docs/GroupTypeEnum.md @@ -2,10 +2,39 @@ The type of the group. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ACTIVE_DIRECTORY_GROUP` (value: `'ACTIVE_DIRECTORY_GROUP'`) + +* `AWS_SSO_GROUP` (value: `'AWS_SSO_GROUP'`) + +* `DUO_GROUP` (value: `'DUO_GROUP'`) + +* `GIT_HUB_TEAM` (value: `'GIT_HUB_TEAM'`) + +* `GIT_LAB_GROUP` (value: `'GIT_LAB_GROUP'`) + +* `GOOGLE_GROUPS_GROUP` (value: `'GOOGLE_GROUPS_GROUP'`) + +* `GOOGLE_GROUPS_GKE_GROUP` (value: `'GOOGLE_GROUPS_GKE_GROUP'`) + +* `LDAP_GROUP` (value: `'LDAP_GROUP'`) + +* `OKTA_GROUP` (value: `'OKTA_GROUP'`) + +* `TAILSCALE_GROUP` (value: `'TAILSCALE_GROUP'`) + +* `OPAL_GROUP` (value: `'OPAL_GROUP'`) + +* `AZURE_AD_SECURITY_GROUP` (value: `'AZURE_AD_SECURITY_GROUP'`) + +* `AZURE_AD_MICROSOFT_365_GROUP` (value: `'AZURE_AD_MICROSOFT_365_GROUP'`) + +* `CONNECTOR_GROUP` (value: `'CONNECTOR_GROUP'`) + +* `SNOWFLAKE_ROLE` (value: `'SNOWFLAKE_ROLE'`) + +* `WORKDAY_USER_SECURITY_GROUP` (value: `'WORKDAY_USER_SECURITY_GROUP'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupUser.md b/docs/GroupUser.md index 9c49972..9411608 100644 --- a/docs/GroupUser.md +++ b/docs/GroupUser.md @@ -28,7 +28,7 @@ print(GroupUser.to_json()) # convert the object into a dict group_user_dict = group_user_instance.to_dict() # create an instance of GroupUser from a dict -group_user_form_dict = group_user.from_dict(group_user_dict) +group_user_from_dict = GroupUser.from_dict(group_user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupUserList.md b/docs/GroupUserList.md index e8ded6a..b43696f 100644 --- a/docs/GroupUserList.md +++ b/docs/GroupUserList.md @@ -22,7 +22,7 @@ print(GroupUserList.to_json()) # convert the object into a dict group_user_list_dict = group_user_list_instance.to_dict() # create an instance of GroupUserList from a dict -group_user_list_form_dict = group_user_list.from_dict(group_user_list_dict) +group_user_list_from_dict = GroupUserList.from_dict(group_user_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index a2c380e..30d4670 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -730,7 +730,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The resources that the group gives access to to. | - | +**200** | The resources that the group gives access to. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/IdpGroupMapping.md b/docs/IdpGroupMapping.md new file mode 100644 index 0000000..672237d --- /dev/null +++ b/docs/IdpGroupMapping.md @@ -0,0 +1,35 @@ +# IdpGroupMapping + +Information about a group mapping. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of the idp group mapping. | +**organization_id** | **str** | The ID of the organization. | +**app_resource_id** | **str** | The ID of the idp app resource. | +**group_id** | **str** | The ID of the group. | +**alias** | **str** | The alias of the group. | [optional] +**hidden_from_end_user** | **bool** | A bool representing whether or not the group is hidden from the end user. | + +## Example + +```python +from opal.models.idp_group_mapping import IdpGroupMapping + +# TODO update the JSON string below +json = "{}" +# create an instance of IdpGroupMapping from a JSON string +idp_group_mapping_instance = IdpGroupMapping.from_json(json) +# print the JSON string representation of the object +print(IdpGroupMapping.to_json()) + +# convert the object into a dict +idp_group_mapping_dict = idp_group_mapping_instance.to_dict() +# create an instance of IdpGroupMapping from a dict +idp_group_mapping_from_dict = IdpGroupMapping.from_dict(idp_group_mapping_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IdpGroupMappingList.md b/docs/IdpGroupMappingList.md new file mode 100644 index 0000000..91c6213 --- /dev/null +++ b/docs/IdpGroupMappingList.md @@ -0,0 +1,29 @@ +# IdpGroupMappingList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**idp_group_mappings** | [**List[IdpGroupMapping]**](IdpGroupMapping.md) | | + +## Example + +```python +from opal.models.idp_group_mapping_list import IdpGroupMappingList + +# TODO update the JSON string below +json = "{}" +# create an instance of IdpGroupMappingList from a JSON string +idp_group_mapping_list_instance = IdpGroupMappingList.from_json(json) +# print the JSON string representation of the object +print(IdpGroupMappingList.to_json()) + +# convert the object into a dict +idp_group_mapping_list_dict = idp_group_mapping_list_instance.to_dict() +# create an instance of IdpGroupMappingList from a dict +idp_group_mapping_list_from_dict = IdpGroupMappingList.from_dict(idp_group_mapping_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IdpGroupMappingsApi.md b/docs/IdpGroupMappingsApi.md new file mode 100644 index 0000000..7837932 --- /dev/null +++ b/docs/IdpGroupMappingsApi.md @@ -0,0 +1,241 @@ +# opal.IdpGroupMappingsApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_idp_group_mappings_by_app_resource_id_group_id**](IdpGroupMappingsApi.md#delete_idp_group_mappings_by_app_resource_id_group_id) | **DELETE** /idp-group-mappings/{app_resource_id}/{group_id}/ | +[**get_idp_group_mappings**](IdpGroupMappingsApi.md#get_idp_group_mappings) | **GET** /idp-group-mappings/{app_resource_id} | +[**update_idp_group_mappings**](IdpGroupMappingsApi.md#update_idp_group_mappings) | **PUT** /idp-group-mappings/{app_resource_id} | + + +# **delete_idp_group_mappings_by_app_resource_id_group_id** +> delete_idp_group_mappings_by_app_resource_id_group_id(app_resource_id, group_id) + + + +Deletes an `IdpGroupMapping` object. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.IdpGroupMappingsApi(api_client) + app_resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the Okta app. + group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. + + try: + api_instance.delete_idp_group_mappings_by_app_resource_id_group_id(app_resource_id, group_id) + except Exception as e: + print("Exception when calling IdpGroupMappingsApi->delete_idp_group_mappings_by_app_resource_id_group_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_resource_id** | **str**| The ID of the Okta app. | + **group_id** | **str**| The ID of the group. | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The IDP group mapping was successfully deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_idp_group_mappings** +> IdpGroupMappingList get_idp_group_mappings(app_resource_id) + + + +Returns the configured set of available `IdpGroupMapping` objects for an Okta app. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.models.idp_group_mapping_list import IdpGroupMappingList +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.IdpGroupMappingsApi(api_client) + app_resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the Okta app. + + try: + api_response = api_instance.get_idp_group_mappings(app_resource_id) + print("The response of IdpGroupMappingsApi->get_idp_group_mappings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IdpGroupMappingsApi->get_idp_group_mappings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_resource_id** | **str**| The ID of the Okta app. | + +### Return type + +[**IdpGroupMappingList**](IdpGroupMappingList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The configured set of available `IdpGroupMapping` objects for an Okta app. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_idp_group_mappings** +> update_idp_group_mappings(app_resource_id, update_idp_group_mappings_request) + + + +Updates the list of available `IdpGroupMapping` objects for an Okta app. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.IdpGroupMappingsApi(api_client) + app_resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the Okta app. + update_idp_group_mappings_request = opal.UpdateIdpGroupMappingsRequest() # UpdateIdpGroupMappingsRequest | + + try: + api_instance.update_idp_group_mappings(app_resource_id, update_idp_group_mappings_request) + except Exception as e: + print("Exception when calling IdpGroupMappingsApi->update_idp_group_mappings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app_resource_id** | **str**| The ID of the Okta app. | + **update_idp_group_mappings_request** | [**UpdateIdpGroupMappingsRequest**](UpdateIdpGroupMappingsRequest.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated set of available `IdpGroupMapping` objects for an Okta app. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MessageChannel.md b/docs/MessageChannel.md index 92f4dca..112db60 100644 --- a/docs/MessageChannel.md +++ b/docs/MessageChannel.md @@ -27,7 +27,7 @@ print(MessageChannel.to_json()) # convert the object into a dict message_channel_dict = message_channel_instance.to_dict() # create an instance of MessageChannel from a dict -message_channel_form_dict = message_channel.from_dict(message_channel_dict) +message_channel_from_dict = MessageChannel.from_dict(message_channel_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MessageChannelIDList.md b/docs/MessageChannelIDList.md index d9c68f5..4c88b02 100644 --- a/docs/MessageChannelIDList.md +++ b/docs/MessageChannelIDList.md @@ -23,7 +23,7 @@ print(MessageChannelIDList.to_json()) # convert the object into a dict message_channel_id_list_dict = message_channel_id_list_instance.to_dict() # create an instance of MessageChannelIDList from a dict -message_channel_id_list_form_dict = message_channel_id_list.from_dict(message_channel_id_list_dict) +message_channel_id_list_from_dict = MessageChannelIDList.from_dict(message_channel_id_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MessageChannelList.md b/docs/MessageChannelList.md index 3f9a5c4..83ee735 100644 --- a/docs/MessageChannelList.md +++ b/docs/MessageChannelList.md @@ -22,7 +22,7 @@ print(MessageChannelList.to_json()) # convert the object into a dict message_channel_list_dict = message_channel_list_instance.to_dict() # create an instance of MessageChannelList from a dict -message_channel_list_form_dict = message_channel_list.from_dict(message_channel_list_dict) +message_channel_list_from_dict = MessageChannelList.from_dict(message_channel_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MessageChannelProviderEnum.md b/docs/MessageChannelProviderEnum.md index d47e075..baaad0b 100644 --- a/docs/MessageChannelProviderEnum.md +++ b/docs/MessageChannelProviderEnum.md @@ -2,10 +2,9 @@ The third party provider of the message channel. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `SLACK` (value: `'SLACK'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NonHumanIdentitiesApi.md b/docs/NonHumanIdentitiesApi.md new file mode 100644 index 0000000..b5b246d --- /dev/null +++ b/docs/NonHumanIdentitiesApi.md @@ -0,0 +1,88 @@ +# opal.NonHumanIdentitiesApi + +All URIs are relative to *https://api.opal.dev/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_nhis**](NonHumanIdentitiesApi.md#get_nhis) | **GET** /non-human-identities | + + +# **get_nhis** +> PaginatedResourcesList get_nhis(cursor=cursor, page_size=page_size) + + + +Returns a list of non-human identities for your organization. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.models.paginated_resources_list import PaginatedResourcesList +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.NonHumanIdentitiesApi(api_client) + cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) + page_size = 200 # int | Number of results to return per page. Default is 200. (optional) + + try: + api_response = api_instance.get_nhis(cursor=cursor, page_size=page_size) + print("The response of NonHumanIdentitiesApi->get_nhis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NonHumanIdentitiesApi->get_nhis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cursor** | **str**| The pagination cursor value. | [optional] + **page_size** | **int**| Number of results to return per page. Default is 200. | [optional] + +### Return type + +[**PaginatedResourcesList**](PaginatedResourcesList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | One page worth non-human identities in your organization. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/OnCallSchedule.md b/docs/OnCallSchedule.md index 40cc5f2..5767c7f 100644 --- a/docs/OnCallSchedule.md +++ b/docs/OnCallSchedule.md @@ -26,7 +26,7 @@ print(OnCallSchedule.to_json()) # convert the object into a dict on_call_schedule_dict = on_call_schedule_instance.to_dict() # create an instance of OnCallSchedule from a dict -on_call_schedule_form_dict = on_call_schedule.from_dict(on_call_schedule_dict) +on_call_schedule_from_dict = OnCallSchedule.from_dict(on_call_schedule_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OnCallScheduleIDList.md b/docs/OnCallScheduleIDList.md index 4620b35..9e1740f 100644 --- a/docs/OnCallScheduleIDList.md +++ b/docs/OnCallScheduleIDList.md @@ -23,7 +23,7 @@ print(OnCallScheduleIDList.to_json()) # convert the object into a dict on_call_schedule_id_list_dict = on_call_schedule_id_list_instance.to_dict() # create an instance of OnCallScheduleIDList from a dict -on_call_schedule_id_list_form_dict = on_call_schedule_id_list.from_dict(on_call_schedule_id_list_dict) +on_call_schedule_id_list_from_dict = OnCallScheduleIDList.from_dict(on_call_schedule_id_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OnCallScheduleList.md b/docs/OnCallScheduleList.md index d48c51b..65df297 100644 --- a/docs/OnCallScheduleList.md +++ b/docs/OnCallScheduleList.md @@ -22,7 +22,7 @@ print(OnCallScheduleList.to_json()) # convert the object into a dict on_call_schedule_list_dict = on_call_schedule_list_instance.to_dict() # create an instance of OnCallScheduleList from a dict -on_call_schedule_list_form_dict = on_call_schedule_list.from_dict(on_call_schedule_list_dict) +on_call_schedule_list_from_dict = OnCallScheduleList.from_dict(on_call_schedule_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OnCallScheduleProviderEnum.md b/docs/OnCallScheduleProviderEnum.md index 672d3ba..0e56cbf 100644 --- a/docs/OnCallScheduleProviderEnum.md +++ b/docs/OnCallScheduleProviderEnum.md @@ -2,10 +2,11 @@ The third party provider of the on call schedule. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `OPSGENIE` (value: `'OPSGENIE'`) + +* `PAGER_DUTY` (value: `'PAGER_DUTY'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Owner.md b/docs/Owner.md index b231766..0547754 100644 --- a/docs/Owner.md +++ b/docs/Owner.md @@ -28,7 +28,7 @@ print(Owner.to_json()) # convert the object into a dict owner_dict = owner_instance.to_dict() # create an instance of Owner from a dict -owner_form_dict = owner.from_dict(owner_dict) +owner_from_dict = Owner.from_dict(owner_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedConfigurationTemplateList.md b/docs/PaginatedConfigurationTemplateList.md index 35dd643..64852db 100644 --- a/docs/PaginatedConfigurationTemplateList.md +++ b/docs/PaginatedConfigurationTemplateList.md @@ -23,7 +23,7 @@ print(PaginatedConfigurationTemplateList.to_json()) # convert the object into a dict paginated_configuration_template_list_dict = paginated_configuration_template_list_instance.to_dict() # create an instance of PaginatedConfigurationTemplateList from a dict -paginated_configuration_template_list_form_dict = paginated_configuration_template_list.from_dict(paginated_configuration_template_list_dict) +paginated_configuration_template_list_from_dict = PaginatedConfigurationTemplateList.from_dict(paginated_configuration_template_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedEventList.md b/docs/PaginatedEventList.md index bb7cce4..eaf4e32 100644 --- a/docs/PaginatedEventList.md +++ b/docs/PaginatedEventList.md @@ -24,7 +24,7 @@ print(PaginatedEventList.to_json()) # convert the object into a dict paginated_event_list_dict = paginated_event_list_instance.to_dict() # create an instance of PaginatedEventList from a dict -paginated_event_list_form_dict = paginated_event_list.from_dict(paginated_event_list_dict) +paginated_event_list_from_dict = PaginatedEventList.from_dict(paginated_event_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedGroupBindingsList.md b/docs/PaginatedGroupBindingsList.md index c8b0a13..6814c58 100644 --- a/docs/PaginatedGroupBindingsList.md +++ b/docs/PaginatedGroupBindingsList.md @@ -24,7 +24,7 @@ print(PaginatedGroupBindingsList.to_json()) # convert the object into a dict paginated_group_bindings_list_dict = paginated_group_bindings_list_instance.to_dict() # create an instance of PaginatedGroupBindingsList from a dict -paginated_group_bindings_list_form_dict = paginated_group_bindings_list.from_dict(paginated_group_bindings_list_dict) +paginated_group_bindings_list_from_dict = PaginatedGroupBindingsList.from_dict(paginated_group_bindings_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedGroupsList.md b/docs/PaginatedGroupsList.md index 8baaa15..fc300f8 100644 --- a/docs/PaginatedGroupsList.md +++ b/docs/PaginatedGroupsList.md @@ -24,7 +24,7 @@ print(PaginatedGroupsList.to_json()) # convert the object into a dict paginated_groups_list_dict = paginated_groups_list_instance.to_dict() # create an instance of PaginatedGroupsList from a dict -paginated_groups_list_form_dict = paginated_groups_list.from_dict(paginated_groups_list_dict) +paginated_groups_list_from_dict = PaginatedGroupsList.from_dict(paginated_groups_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedOwnersList.md b/docs/PaginatedOwnersList.md index b27d849..877553e 100644 --- a/docs/PaginatedOwnersList.md +++ b/docs/PaginatedOwnersList.md @@ -24,7 +24,7 @@ print(PaginatedOwnersList.to_json()) # convert the object into a dict paginated_owners_list_dict = paginated_owners_list_instance.to_dict() # create an instance of PaginatedOwnersList from a dict -paginated_owners_list_form_dict = paginated_owners_list.from_dict(paginated_owners_list_dict) +paginated_owners_list_from_dict = PaginatedOwnersList.from_dict(paginated_owners_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedResourcesList.md b/docs/PaginatedResourcesList.md index 64f3439..5dadfa7 100644 --- a/docs/PaginatedResourcesList.md +++ b/docs/PaginatedResourcesList.md @@ -24,7 +24,7 @@ print(PaginatedResourcesList.to_json()) # convert the object into a dict paginated_resources_list_dict = paginated_resources_list_instance.to_dict() # create an instance of PaginatedResourcesList from a dict -paginated_resources_list_form_dict = paginated_resources_list.from_dict(paginated_resources_list_dict) +paginated_resources_list_from_dict = PaginatedResourcesList.from_dict(paginated_resources_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedTagsList.md b/docs/PaginatedTagsList.md index 0066edc..8829185 100644 --- a/docs/PaginatedTagsList.md +++ b/docs/PaginatedTagsList.md @@ -24,7 +24,7 @@ print(PaginatedTagsList.to_json()) # convert the object into a dict paginated_tags_list_dict = paginated_tags_list_instance.to_dict() # create an instance of PaginatedTagsList from a dict -paginated_tags_list_form_dict = paginated_tags_list.from_dict(paginated_tags_list_dict) +paginated_tags_list_from_dict = PaginatedTagsList.from_dict(paginated_tags_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedUARsList.md b/docs/PaginatedUARsList.md index 58813da..0699faf 100644 --- a/docs/PaginatedUARsList.md +++ b/docs/PaginatedUARsList.md @@ -25,7 +25,7 @@ print(PaginatedUARsList.to_json()) # convert the object into a dict paginated_uars_list_dict = paginated_uars_list_instance.to_dict() # create an instance of PaginatedUARsList from a dict -paginated_uars_list_form_dict = paginated_uars_list.from_dict(paginated_uars_list_dict) +paginated_uars_list_from_dict = PaginatedUARsList.from_dict(paginated_uars_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaginatedUsersList.md b/docs/PaginatedUsersList.md index a601424..cd14391 100644 --- a/docs/PaginatedUsersList.md +++ b/docs/PaginatedUsersList.md @@ -24,7 +24,7 @@ print(PaginatedUsersList.to_json()) # convert the object into a dict paginated_users_list_dict = paginated_users_list_instance.to_dict() # create an instance of PaginatedUsersList from a dict -paginated_users_list_form_dict = paginated_users_list.from_dict(paginated_users_list_dict) +paginated_users_list_from_dict = PaginatedUsersList.from_dict(paginated_users_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Request.md b/docs/Request.md index b926f03..0da5953 100644 --- a/docs/Request.md +++ b/docs/Request.md @@ -10,8 +10,9 @@ Name | Type | Description | Notes **created_at** | **datetime** | The date and time the request was created. | **updated_at** | **datetime** | The date and time the request was last updated. | **requester_id** | **str** | The unique identifier of the user who created the request. | -**target_user_id** | **str** | The unique identifier of the user who is the target of the request. | -**status** | [**RequestStatusEnum**](RequestStatusEnum.md) | | +**target_user_id** | **str** | The unique identifier of the user who is the target of the request. | [optional] +**target_group_id** | **str** | The unique identifier of the group who is the target of the request. | [optional] +**status** | [**RequestStatusEnum**](RequestStatusEnum.md) | The status of the request. | **reason** | **str** | The reason for the request. | **duration_minutes** | **int** | The duration of the request in minutes. | [optional] **requested_items_list** | [**List[RequestedItem]**](RequestedItem.md) | The list of targets for the request. | [optional] @@ -32,7 +33,7 @@ print(Request.to_json()) # convert the object into a dict request_dict = request_instance.to_dict() # create an instance of Request from a dict -request_form_dict = request.from_dict(request_dict) +request_from_dict = Request.from_dict(request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestConfiguration.md b/docs/RequestConfiguration.md index e88db47..5ec5a04 100644 --- a/docs/RequestConfiguration.md +++ b/docs/RequestConfiguration.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**condition** | [**Condition**](Condition.md) | | [optional] +**condition** | [**Condition**](Condition.md) | The condition for the request configuration. | [optional] **allow_requests** | **bool** | A bool representing whether or not to allow requests for this resource. | **auto_approval** | **bool** | A bool representing whether or not to automatically approve requests for this resource. | **require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this resource. | @@ -32,7 +32,7 @@ print(RequestConfiguration.to_json()) # convert the object into a dict request_configuration_dict = request_configuration_instance.to_dict() # create an instance of RequestConfiguration from a dict -request_configuration_form_dict = request_configuration.from_dict(request_configuration_dict) +request_configuration_from_dict = RequestConfiguration.from_dict(request_configuration_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestCustomFieldResponse.md b/docs/RequestCustomFieldResponse.md index 8f4d78f..dbc343d 100644 --- a/docs/RequestCustomFieldResponse.md +++ b/docs/RequestCustomFieldResponse.md @@ -24,7 +24,7 @@ print(RequestCustomFieldResponse.to_json()) # convert the object into a dict request_custom_field_response_dict = request_custom_field_response_instance.to_dict() # create an instance of RequestCustomFieldResponse from a dict -request_custom_field_response_form_dict = request_custom_field_response.from_dict(request_custom_field_response_dict) +request_custom_field_response_from_dict = RequestCustomFieldResponse.from_dict(request_custom_field_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestCustomFieldResponseFieldValue.md b/docs/RequestCustomFieldResponseFieldValue.md index a3377c3..2ed9ec9 100644 --- a/docs/RequestCustomFieldResponseFieldValue.md +++ b/docs/RequestCustomFieldResponseFieldValue.md @@ -21,7 +21,7 @@ print(RequestCustomFieldResponseFieldValue.to_json()) # convert the object into a dict request_custom_field_response_field_value_dict = request_custom_field_response_field_value_instance.to_dict() # create an instance of RequestCustomFieldResponseFieldValue from a dict -request_custom_field_response_field_value_form_dict = request_custom_field_response_field_value.from_dict(request_custom_field_response_field_value_dict) +request_custom_field_response_field_value_from_dict = RequestCustomFieldResponseFieldValue.from_dict(request_custom_field_response_field_value_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestList.md b/docs/RequestList.md index d6ab8d8..060a37f 100644 --- a/docs/RequestList.md +++ b/docs/RequestList.md @@ -24,7 +24,7 @@ print(RequestList.to_json()) # convert the object into a dict request_list_dict = request_list_instance.to_dict() # create an instance of RequestList from a dict -request_list_form_dict = request_list.from_dict(request_list_dict) +request_list_from_dict = RequestList.from_dict(request_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestStatusEnum.md b/docs/RequestStatusEnum.md index b60d5de..d1fa9ff 100644 --- a/docs/RequestStatusEnum.md +++ b/docs/RequestStatusEnum.md @@ -2,10 +2,15 @@ # Request Status ### Description The `RequestStatus` enum is used to represent the status of a request. ### Usage Example Returned from the `GET Requests` endpoint. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `PENDING` (value: `'pending'`) + +* `APPROVED` (value: `'approved'`) + +* `DENIED` (value: `'denied'`) + +* `CANCELED` (value: `'canceled'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestTemplateCustomFieldTypeEnum.md b/docs/RequestTemplateCustomFieldTypeEnum.md index e786fd4..9a6bebc 100644 --- a/docs/RequestTemplateCustomFieldTypeEnum.md +++ b/docs/RequestTemplateCustomFieldTypeEnum.md @@ -2,10 +2,15 @@ The type of the custom request field. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `SHORT_TEXT` (value: `'SHORT_TEXT'`) + +* `LONG_TEXT` (value: `'LONG_TEXT'`) + +* `BOOLEAN` (value: `'BOOLEAN'`) + +* `MULTI_CHOICE` (value: `'MULTI_CHOICE'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestedItem.md b/docs/RequestedItem.md index 25a147c..ccd1b2f 100644 --- a/docs/RequestedItem.md +++ b/docs/RequestedItem.md @@ -27,7 +27,7 @@ print(RequestedItem.to_json()) # convert the object into a dict requested_item_dict = requested_item_instance.to_dict() # create an instance of RequestedItem from a dict -requested_item_form_dict = requested_item.from_dict(requested_item_dict) +requested_item_from_dict = RequestedItem.from_dict(requested_item_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RequestsApi.md b/docs/RequestsApi.md index 400536e..b5467ff 100644 --- a/docs/RequestsApi.md +++ b/docs/RequestsApi.md @@ -4,9 +4,88 @@ All URIs are relative to *https://api.opal.dev/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**create_request**](RequestsApi.md#create_request) | **POST** /requests | [**get_requests**](RequestsApi.md#get_requests) | **GET** /requests | +# **create_request** +> CreateRequest200Response create_request(create_request_info) + + + +Create an access request + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.models.create_request200_response import CreateRequest200Response +from opal.models.create_request_info import CreateRequestInfo +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.RequestsApi(api_client) + create_request_info = opal.CreateRequestInfo() # CreateRequestInfo | Resources to be updated + + try: + api_response = api_instance.create_request(create_request_info) + print("The response of RequestsApi->create_request:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RequestsApi->create_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_request_info** | [**CreateRequestInfo**](CreateRequestInfo.md)| Resources to be updated | + +### Return type + +[**CreateRequest200Response**](CreateRequest200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The resulting request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_requests** > RequestList get_requests(cursor=cursor, page_size=page_size, show_pending_only=show_pending_only) diff --git a/docs/Resource.md b/docs/Resource.md index e75bd6c..ad9b232 100644 --- a/docs/Resource.md +++ b/docs/Resource.md @@ -28,6 +28,10 @@ Name | Type | Description | Notes **configuration_template_id** | **str** | The ID of the associated configuration template. | [optional] **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of configurations for requests to this resource. | [optional] **request_configuration_list** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of configurations for requests to this resource. Deprecated in favor of `request_configurations`. | [optional] +**ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] +**custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**risk_sensitivity** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | The risk sensitivity level for the resource. When an override is set, this field will match that. | [optional] [readonly] +**risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] **metadata** | **str** | JSON metadata about the remote resource. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details. | [optional] **remote_info** | [**ResourceRemoteInfo**](ResourceRemoteInfo.md) | | [optional] @@ -46,7 +50,7 @@ print(Resource.to_json()) # convert the object into a dict resource_dict = resource_instance.to_dict() # create an instance of Resource from a dict -resource_form_dict = resource.from_dict(resource_dict) +resource_from_dict = Resource.from_dict(resource_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceAccessLevel.md b/docs/ResourceAccessLevel.md index d28211b..b022637 100644 --- a/docs/ResourceAccessLevel.md +++ b/docs/ResourceAccessLevel.md @@ -1,6 +1,6 @@ # ResourceAccessLevel -# Access Level Object ### Description The `ResourceAccessLevel` object is used to represent the level of access that a user has to a resource or a resource has to a group. The \"default\" access level is a `ResourceAccessLevel` object whose fields are all empty strings. ### Usage Example View the `ResourceAccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. +# Access Level Object ### Description The `AccessLevel` object is used to represent the level of access that a principal has. The \"default\" access level is a `AccessLevel` object whose fields are all empty strings. ### Usage Example View the `AccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. ## Properties @@ -24,7 +24,7 @@ print(ResourceAccessLevel.to_json()) # convert the object into a dict resource_access_level_dict = resource_access_level_instance.to_dict() # create an instance of ResourceAccessLevel from a dict -resource_access_level_form_dict = resource_access_level.from_dict(resource_access_level_dict) +resource_access_level_from_dict = ResourceAccessLevel.from_dict(resource_access_level_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceAccessUser.md b/docs/ResourceAccessUser.md index a4856bc..d1f6c0b 100644 --- a/docs/ResourceAccessUser.md +++ b/docs/ResourceAccessUser.md @@ -30,7 +30,7 @@ print(ResourceAccessUser.to_json()) # convert the object into a dict resource_access_user_dict = resource_access_user_instance.to_dict() # create an instance of ResourceAccessUser from a dict -resource_access_user_form_dict = resource_access_user.from_dict(resource_access_user_dict) +resource_access_user_from_dict = ResourceAccessUser.from_dict(resource_access_user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceAccessUserList.md b/docs/ResourceAccessUserList.md index ac50d30..64bbcc8 100644 --- a/docs/ResourceAccessUserList.md +++ b/docs/ResourceAccessUserList.md @@ -22,7 +22,7 @@ print(ResourceAccessUserList.to_json()) # convert the object into a dict resource_access_user_list_dict = resource_access_user_list_instance.to_dict() # create an instance of ResourceAccessUserList from a dict -resource_access_user_list_form_dict = resource_access_user_list.from_dict(resource_access_user_list_dict) +resource_access_user_list_from_dict = ResourceAccessUserList.from_dict(resource_access_user_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceNHI.md b/docs/ResourceNHI.md new file mode 100644 index 0000000..602ae48 --- /dev/null +++ b/docs/ResourceNHI.md @@ -0,0 +1,33 @@ +# ResourceNHI + +# Resource Non-Human Identity Direct Access Object ### Description This object is used to represent a non-human identity with direct access to a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **str** | The ID of the resource. | +**non_human_identity_id** | **str** | The resource ID of the non-human identity. | +**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | [optional] +**expiration_date** | **datetime** | The day and time the non-human identity's access will expire. | + +## Example + +```python +from opal.models.resource_nhi import ResourceNHI + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceNHI from a JSON string +resource_nhi_instance = ResourceNHI.from_json(json) +# print the JSON string representation of the object +print(ResourceNHI.to_json()) + +# convert the object into a dict +resource_nhi_dict = resource_nhi_instance.to_dict() +# create an instance of ResourceNHI from a dict +resource_nhi_from_dict = ResourceNHI.from_dict(resource_nhi_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfo.md b/docs/ResourceRemoteInfo.md index 196bdb4..d537e2b 100644 --- a/docs/ResourceRemoteInfo.md +++ b/docs/ResourceRemoteInfo.md @@ -21,6 +21,7 @@ Name | Type | Description | Notes **gcp_gke_cluster** | [**ResourceRemoteInfoGcpGkeCluster**](ResourceRemoteInfoGcpGkeCluster.md) | | [optional] **gcp_project** | [**ResourceRemoteInfoGcpProject**](ResourceRemoteInfoGcpProject.md) | | [optional] **gcp_sql_instance** | [**ResourceRemoteInfoGcpSqlInstance**](ResourceRemoteInfoGcpSqlInstance.md) | | [optional] +**gcp_service_account** | [**ResourceRemoteInfoGcpServiceAccount**](ResourceRemoteInfoGcpServiceAccount.md) | | [optional] **github_repo** | [**ResourceRemoteInfoGithubRepo**](ResourceRemoteInfoGithubRepo.md) | | [optional] **gitlab_project** | [**ResourceRemoteInfoGitlabProject**](ResourceRemoteInfoGitlabProject.md) | | [optional] **okta_app** | [**ResourceRemoteInfoOktaApp**](ResourceRemoteInfoOktaApp.md) | | [optional] @@ -47,7 +48,7 @@ print(ResourceRemoteInfo.to_json()) # convert the object into a dict resource_remote_info_dict = resource_remote_info_instance.to_dict() # create an instance of ResourceRemoteInfo from a dict -resource_remote_info_form_dict = resource_remote_info.from_dict(resource_remote_info_dict) +resource_remote_info_from_dict = ResourceRemoteInfo.from_dict(resource_remote_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoAwsAccount.md b/docs/ResourceRemoteInfoAwsAccount.md index 0b0ea3e..a9f8c25 100644 --- a/docs/ResourceRemoteInfoAwsAccount.md +++ b/docs/ResourceRemoteInfoAwsAccount.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoAwsAccount.to_json()) # convert the object into a dict resource_remote_info_aws_account_dict = resource_remote_info_aws_account_instance.to_dict() # create an instance of ResourceRemoteInfoAwsAccount from a dict -resource_remote_info_aws_account_form_dict = resource_remote_info_aws_account.from_dict(resource_remote_info_aws_account_dict) +resource_remote_info_aws_account_from_dict = ResourceRemoteInfoAwsAccount.from_dict(resource_remote_info_aws_account_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoAwsEc2Instance.md b/docs/ResourceRemoteInfoAwsEc2Instance.md index f53a155..a860b81 100644 --- a/docs/ResourceRemoteInfoAwsEc2Instance.md +++ b/docs/ResourceRemoteInfoAwsEc2Instance.md @@ -25,7 +25,7 @@ print(ResourceRemoteInfoAwsEc2Instance.to_json()) # convert the object into a dict resource_remote_info_aws_ec2_instance_dict = resource_remote_info_aws_ec2_instance_instance.to_dict() # create an instance of ResourceRemoteInfoAwsEc2Instance from a dict -resource_remote_info_aws_ec2_instance_form_dict = resource_remote_info_aws_ec2_instance.from_dict(resource_remote_info_aws_ec2_instance_dict) +resource_remote_info_aws_ec2_instance_from_dict = ResourceRemoteInfoAwsEc2Instance.from_dict(resource_remote_info_aws_ec2_instance_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoAwsEksCluster.md b/docs/ResourceRemoteInfoAwsEksCluster.md index afb8519..93044d0 100644 --- a/docs/ResourceRemoteInfoAwsEksCluster.md +++ b/docs/ResourceRemoteInfoAwsEksCluster.md @@ -24,7 +24,7 @@ print(ResourceRemoteInfoAwsEksCluster.to_json()) # convert the object into a dict resource_remote_info_aws_eks_cluster_dict = resource_remote_info_aws_eks_cluster_instance.to_dict() # create an instance of ResourceRemoteInfoAwsEksCluster from a dict -resource_remote_info_aws_eks_cluster_form_dict = resource_remote_info_aws_eks_cluster.from_dict(resource_remote_info_aws_eks_cluster_dict) +resource_remote_info_aws_eks_cluster_from_dict = ResourceRemoteInfoAwsEksCluster.from_dict(resource_remote_info_aws_eks_cluster_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoAwsIamRole.md b/docs/ResourceRemoteInfoAwsIamRole.md index 82dbdd0..716f523 100644 --- a/docs/ResourceRemoteInfoAwsIamRole.md +++ b/docs/ResourceRemoteInfoAwsIamRole.md @@ -24,7 +24,7 @@ print(ResourceRemoteInfoAwsIamRole.to_json()) # convert the object into a dict resource_remote_info_aws_iam_role_dict = resource_remote_info_aws_iam_role_instance.to_dict() # create an instance of ResourceRemoteInfoAwsIamRole from a dict -resource_remote_info_aws_iam_role_form_dict = resource_remote_info_aws_iam_role.from_dict(resource_remote_info_aws_iam_role_dict) +resource_remote_info_aws_iam_role_from_dict = ResourceRemoteInfoAwsIamRole.from_dict(resource_remote_info_aws_iam_role_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoAwsPermissionSet.md b/docs/ResourceRemoteInfoAwsPermissionSet.md index 1c0d5d3..4b270a2 100644 --- a/docs/ResourceRemoteInfoAwsPermissionSet.md +++ b/docs/ResourceRemoteInfoAwsPermissionSet.md @@ -24,7 +24,7 @@ print(ResourceRemoteInfoAwsPermissionSet.to_json()) # convert the object into a dict resource_remote_info_aws_permission_set_dict = resource_remote_info_aws_permission_set_instance.to_dict() # create an instance of ResourceRemoteInfoAwsPermissionSet from a dict -resource_remote_info_aws_permission_set_form_dict = resource_remote_info_aws_permission_set.from_dict(resource_remote_info_aws_permission_set_dict) +resource_remote_info_aws_permission_set_from_dict = ResourceRemoteInfoAwsPermissionSet.from_dict(resource_remote_info_aws_permission_set_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoAwsRdsInstance.md b/docs/ResourceRemoteInfoAwsRdsInstance.md index ae78181..7793648 100644 --- a/docs/ResourceRemoteInfoAwsRdsInstance.md +++ b/docs/ResourceRemoteInfoAwsRdsInstance.md @@ -26,7 +26,7 @@ print(ResourceRemoteInfoAwsRdsInstance.to_json()) # convert the object into a dict resource_remote_info_aws_rds_instance_dict = resource_remote_info_aws_rds_instance_instance.to_dict() # create an instance of ResourceRemoteInfoAwsRdsInstance from a dict -resource_remote_info_aws_rds_instance_form_dict = resource_remote_info_aws_rds_instance.from_dict(resource_remote_info_aws_rds_instance_dict) +resource_remote_info_aws_rds_instance_from_dict = ResourceRemoteInfoAwsRdsInstance.from_dict(resource_remote_info_aws_rds_instance_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpBigQueryDataset.md b/docs/ResourceRemoteInfoGcpBigQueryDataset.md index 9bb3eef..72a8e10 100644 --- a/docs/ResourceRemoteInfoGcpBigQueryDataset.md +++ b/docs/ResourceRemoteInfoGcpBigQueryDataset.md @@ -24,7 +24,7 @@ print(ResourceRemoteInfoGcpBigQueryDataset.to_json()) # convert the object into a dict resource_remote_info_gcp_big_query_dataset_dict = resource_remote_info_gcp_big_query_dataset_instance.to_dict() # create an instance of ResourceRemoteInfoGcpBigQueryDataset from a dict -resource_remote_info_gcp_big_query_dataset_form_dict = resource_remote_info_gcp_big_query_dataset.from_dict(resource_remote_info_gcp_big_query_dataset_dict) +resource_remote_info_gcp_big_query_dataset_from_dict = ResourceRemoteInfoGcpBigQueryDataset.from_dict(resource_remote_info_gcp_big_query_dataset_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpBigQueryTable.md b/docs/ResourceRemoteInfoGcpBigQueryTable.md index 998923a..b231308 100644 --- a/docs/ResourceRemoteInfoGcpBigQueryTable.md +++ b/docs/ResourceRemoteInfoGcpBigQueryTable.md @@ -25,7 +25,7 @@ print(ResourceRemoteInfoGcpBigQueryTable.to_json()) # convert the object into a dict resource_remote_info_gcp_big_query_table_dict = resource_remote_info_gcp_big_query_table_instance.to_dict() # create an instance of ResourceRemoteInfoGcpBigQueryTable from a dict -resource_remote_info_gcp_big_query_table_form_dict = resource_remote_info_gcp_big_query_table.from_dict(resource_remote_info_gcp_big_query_table_dict) +resource_remote_info_gcp_big_query_table_from_dict = ResourceRemoteInfoGcpBigQueryTable.from_dict(resource_remote_info_gcp_big_query_table_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpBucket.md b/docs/ResourceRemoteInfoGcpBucket.md index d0bb09f..ee1eb0c 100644 --- a/docs/ResourceRemoteInfoGcpBucket.md +++ b/docs/ResourceRemoteInfoGcpBucket.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoGcpBucket.to_json()) # convert the object into a dict resource_remote_info_gcp_bucket_dict = resource_remote_info_gcp_bucket_instance.to_dict() # create an instance of ResourceRemoteInfoGcpBucket from a dict -resource_remote_info_gcp_bucket_form_dict = resource_remote_info_gcp_bucket.from_dict(resource_remote_info_gcp_bucket_dict) +resource_remote_info_gcp_bucket_from_dict = ResourceRemoteInfoGcpBucket.from_dict(resource_remote_info_gcp_bucket_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpComputeInstance.md b/docs/ResourceRemoteInfoGcpComputeInstance.md index 5cca1eb..adbf46a 100644 --- a/docs/ResourceRemoteInfoGcpComputeInstance.md +++ b/docs/ResourceRemoteInfoGcpComputeInstance.md @@ -25,7 +25,7 @@ print(ResourceRemoteInfoGcpComputeInstance.to_json()) # convert the object into a dict resource_remote_info_gcp_compute_instance_dict = resource_remote_info_gcp_compute_instance_instance.to_dict() # create an instance of ResourceRemoteInfoGcpComputeInstance from a dict -resource_remote_info_gcp_compute_instance_form_dict = resource_remote_info_gcp_compute_instance.from_dict(resource_remote_info_gcp_compute_instance_dict) +resource_remote_info_gcp_compute_instance_from_dict = ResourceRemoteInfoGcpComputeInstance.from_dict(resource_remote_info_gcp_compute_instance_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpFolder.md b/docs/ResourceRemoteInfoGcpFolder.md index 145aae7..a6221ae 100644 --- a/docs/ResourceRemoteInfoGcpFolder.md +++ b/docs/ResourceRemoteInfoGcpFolder.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoGcpFolder.to_json()) # convert the object into a dict resource_remote_info_gcp_folder_dict = resource_remote_info_gcp_folder_instance.to_dict() # create an instance of ResourceRemoteInfoGcpFolder from a dict -resource_remote_info_gcp_folder_form_dict = resource_remote_info_gcp_folder.from_dict(resource_remote_info_gcp_folder_dict) +resource_remote_info_gcp_folder_from_dict = ResourceRemoteInfoGcpFolder.from_dict(resource_remote_info_gcp_folder_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpGkeCluster.md b/docs/ResourceRemoteInfoGcpGkeCluster.md index 4631a9a..86c1797 100644 --- a/docs/ResourceRemoteInfoGcpGkeCluster.md +++ b/docs/ResourceRemoteInfoGcpGkeCluster.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoGcpGkeCluster.to_json()) # convert the object into a dict resource_remote_info_gcp_gke_cluster_dict = resource_remote_info_gcp_gke_cluster_instance.to_dict() # create an instance of ResourceRemoteInfoGcpGkeCluster from a dict -resource_remote_info_gcp_gke_cluster_form_dict = resource_remote_info_gcp_gke_cluster.from_dict(resource_remote_info_gcp_gke_cluster_dict) +resource_remote_info_gcp_gke_cluster_from_dict = ResourceRemoteInfoGcpGkeCluster.from_dict(resource_remote_info_gcp_gke_cluster_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpOrganization.md b/docs/ResourceRemoteInfoGcpOrganization.md index 3d7fd6b..0de381c 100644 --- a/docs/ResourceRemoteInfoGcpOrganization.md +++ b/docs/ResourceRemoteInfoGcpOrganization.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoGcpOrganization.to_json()) # convert the object into a dict resource_remote_info_gcp_organization_dict = resource_remote_info_gcp_organization_instance.to_dict() # create an instance of ResourceRemoteInfoGcpOrganization from a dict -resource_remote_info_gcp_organization_form_dict = resource_remote_info_gcp_organization.from_dict(resource_remote_info_gcp_organization_dict) +resource_remote_info_gcp_organization_from_dict = ResourceRemoteInfoGcpOrganization.from_dict(resource_remote_info_gcp_organization_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpProject.md b/docs/ResourceRemoteInfoGcpProject.md index a286c77..d7a2f59 100644 --- a/docs/ResourceRemoteInfoGcpProject.md +++ b/docs/ResourceRemoteInfoGcpProject.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoGcpProject.to_json()) # convert the object into a dict resource_remote_info_gcp_project_dict = resource_remote_info_gcp_project_instance.to_dict() # create an instance of ResourceRemoteInfoGcpProject from a dict -resource_remote_info_gcp_project_form_dict = resource_remote_info_gcp_project.from_dict(resource_remote_info_gcp_project_dict) +resource_remote_info_gcp_project_from_dict = ResourceRemoteInfoGcpProject.from_dict(resource_remote_info_gcp_project_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGcpServiceAccount.md b/docs/ResourceRemoteInfoGcpServiceAccount.md new file mode 100644 index 0000000..c0aaf38 --- /dev/null +++ b/docs/ResourceRemoteInfoGcpServiceAccount.md @@ -0,0 +1,32 @@ +# ResourceRemoteInfoGcpServiceAccount + +Remote info for a GCP service account. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | The email of the service account. | +**service_account_id** | **str** | The id of the service account. | +**project_id** | **str** | The id of the project the service account is in. | + +## Example + +```python +from opal.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceRemoteInfoGcpServiceAccount from a JSON string +resource_remote_info_gcp_service_account_instance = ResourceRemoteInfoGcpServiceAccount.from_json(json) +# print the JSON string representation of the object +print(ResourceRemoteInfoGcpServiceAccount.to_json()) + +# convert the object into a dict +resource_remote_info_gcp_service_account_dict = resource_remote_info_gcp_service_account_instance.to_dict() +# create an instance of ResourceRemoteInfoGcpServiceAccount from a dict +resource_remote_info_gcp_service_account_from_dict = ResourceRemoteInfoGcpServiceAccount.from_dict(resource_remote_info_gcp_service_account_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceRemoteInfoGcpSqlInstance.md b/docs/ResourceRemoteInfoGcpSqlInstance.md index bc21651..f88fa12 100644 --- a/docs/ResourceRemoteInfoGcpSqlInstance.md +++ b/docs/ResourceRemoteInfoGcpSqlInstance.md @@ -24,7 +24,7 @@ print(ResourceRemoteInfoGcpSqlInstance.to_json()) # convert the object into a dict resource_remote_info_gcp_sql_instance_dict = resource_remote_info_gcp_sql_instance_instance.to_dict() # create an instance of ResourceRemoteInfoGcpSqlInstance from a dict -resource_remote_info_gcp_sql_instance_form_dict = resource_remote_info_gcp_sql_instance.from_dict(resource_remote_info_gcp_sql_instance_dict) +resource_remote_info_gcp_sql_instance_from_dict = ResourceRemoteInfoGcpSqlInstance.from_dict(resource_remote_info_gcp_sql_instance_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGithubRepo.md b/docs/ResourceRemoteInfoGithubRepo.md index 110a7de..42f5546 100644 --- a/docs/ResourceRemoteInfoGithubRepo.md +++ b/docs/ResourceRemoteInfoGithubRepo.md @@ -24,7 +24,7 @@ print(ResourceRemoteInfoGithubRepo.to_json()) # convert the object into a dict resource_remote_info_github_repo_dict = resource_remote_info_github_repo_instance.to_dict() # create an instance of ResourceRemoteInfoGithubRepo from a dict -resource_remote_info_github_repo_form_dict = resource_remote_info_github_repo.from_dict(resource_remote_info_github_repo_dict) +resource_remote_info_github_repo_from_dict = ResourceRemoteInfoGithubRepo.from_dict(resource_remote_info_github_repo_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoGitlabProject.md b/docs/ResourceRemoteInfoGitlabProject.md index 93d84b1..794376a 100644 --- a/docs/ResourceRemoteInfoGitlabProject.md +++ b/docs/ResourceRemoteInfoGitlabProject.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoGitlabProject.to_json()) # convert the object into a dict resource_remote_info_gitlab_project_dict = resource_remote_info_gitlab_project_instance.to_dict() # create an instance of ResourceRemoteInfoGitlabProject from a dict -resource_remote_info_gitlab_project_form_dict = resource_remote_info_gitlab_project.from_dict(resource_remote_info_gitlab_project_dict) +resource_remote_info_gitlab_project_from_dict = ResourceRemoteInfoGitlabProject.from_dict(resource_remote_info_gitlab_project_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoOktaApp.md b/docs/ResourceRemoteInfoOktaApp.md index 3423af3..e2c17ee 100644 --- a/docs/ResourceRemoteInfoOktaApp.md +++ b/docs/ResourceRemoteInfoOktaApp.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoOktaApp.to_json()) # convert the object into a dict resource_remote_info_okta_app_dict = resource_remote_info_okta_app_instance.to_dict() # create an instance of ResourceRemoteInfoOktaApp from a dict -resource_remote_info_okta_app_form_dict = resource_remote_info_okta_app.from_dict(resource_remote_info_okta_app_dict) +resource_remote_info_okta_app_from_dict = ResourceRemoteInfoOktaApp.from_dict(resource_remote_info_okta_app_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoOktaCustomRole.md b/docs/ResourceRemoteInfoOktaCustomRole.md index 7b8e58f..2308f00 100644 --- a/docs/ResourceRemoteInfoOktaCustomRole.md +++ b/docs/ResourceRemoteInfoOktaCustomRole.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoOktaCustomRole.to_json()) # convert the object into a dict resource_remote_info_okta_custom_role_dict = resource_remote_info_okta_custom_role_instance.to_dict() # create an instance of ResourceRemoteInfoOktaCustomRole from a dict -resource_remote_info_okta_custom_role_form_dict = resource_remote_info_okta_custom_role.from_dict(resource_remote_info_okta_custom_role_dict) +resource_remote_info_okta_custom_role_from_dict = ResourceRemoteInfoOktaCustomRole.from_dict(resource_remote_info_okta_custom_role_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoOktaStandardRole.md b/docs/ResourceRemoteInfoOktaStandardRole.md index a8e77ea..67b3d85 100644 --- a/docs/ResourceRemoteInfoOktaStandardRole.md +++ b/docs/ResourceRemoteInfoOktaStandardRole.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoOktaStandardRole.to_json()) # convert the object into a dict resource_remote_info_okta_standard_role_dict = resource_remote_info_okta_standard_role_instance.to_dict() # create an instance of ResourceRemoteInfoOktaStandardRole from a dict -resource_remote_info_okta_standard_role_form_dict = resource_remote_info_okta_standard_role.from_dict(resource_remote_info_okta_standard_role_dict) +resource_remote_info_okta_standard_role_from_dict = ResourceRemoteInfoOktaStandardRole.from_dict(resource_remote_info_okta_standard_role_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoPagerdutyRole.md b/docs/ResourceRemoteInfoPagerdutyRole.md index 94b0409..2dcc037 100644 --- a/docs/ResourceRemoteInfoPagerdutyRole.md +++ b/docs/ResourceRemoteInfoPagerdutyRole.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoPagerdutyRole.to_json()) # convert the object into a dict resource_remote_info_pagerduty_role_dict = resource_remote_info_pagerduty_role_instance.to_dict() # create an instance of ResourceRemoteInfoPagerdutyRole from a dict -resource_remote_info_pagerduty_role_form_dict = resource_remote_info_pagerduty_role.from_dict(resource_remote_info_pagerduty_role_dict) +resource_remote_info_pagerduty_role_from_dict = ResourceRemoteInfoPagerdutyRole.from_dict(resource_remote_info_pagerduty_role_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoSalesforcePermissionSet.md b/docs/ResourceRemoteInfoSalesforcePermissionSet.md index f5b0d0f..0da0c89 100644 --- a/docs/ResourceRemoteInfoSalesforcePermissionSet.md +++ b/docs/ResourceRemoteInfoSalesforcePermissionSet.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoSalesforcePermissionSet.to_json()) # convert the object into a dict resource_remote_info_salesforce_permission_set_dict = resource_remote_info_salesforce_permission_set_instance.to_dict() # create an instance of ResourceRemoteInfoSalesforcePermissionSet from a dict -resource_remote_info_salesforce_permission_set_form_dict = resource_remote_info_salesforce_permission_set.from_dict(resource_remote_info_salesforce_permission_set_dict) +resource_remote_info_salesforce_permission_set_from_dict = ResourceRemoteInfoSalesforcePermissionSet.from_dict(resource_remote_info_salesforce_permission_set_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoSalesforceProfile.md b/docs/ResourceRemoteInfoSalesforceProfile.md index ac3af18..3924976 100644 --- a/docs/ResourceRemoteInfoSalesforceProfile.md +++ b/docs/ResourceRemoteInfoSalesforceProfile.md @@ -24,7 +24,7 @@ print(ResourceRemoteInfoSalesforceProfile.to_json()) # convert the object into a dict resource_remote_info_salesforce_profile_dict = resource_remote_info_salesforce_profile_instance.to_dict() # create an instance of ResourceRemoteInfoSalesforceProfile from a dict -resource_remote_info_salesforce_profile_form_dict = resource_remote_info_salesforce_profile.from_dict(resource_remote_info_salesforce_profile_dict) +resource_remote_info_salesforce_profile_from_dict = ResourceRemoteInfoSalesforceProfile.from_dict(resource_remote_info_salesforce_profile_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoSalesforceRole.md b/docs/ResourceRemoteInfoSalesforceRole.md index 27deeb6..3bdfdd9 100644 --- a/docs/ResourceRemoteInfoSalesforceRole.md +++ b/docs/ResourceRemoteInfoSalesforceRole.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoSalesforceRole.to_json()) # convert the object into a dict resource_remote_info_salesforce_role_dict = resource_remote_info_salesforce_role_instance.to_dict() # create an instance of ResourceRemoteInfoSalesforceRole from a dict -resource_remote_info_salesforce_role_form_dict = resource_remote_info_salesforce_role.from_dict(resource_remote_info_salesforce_role_dict) +resource_remote_info_salesforce_role_from_dict = ResourceRemoteInfoSalesforceRole.from_dict(resource_remote_info_salesforce_role_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceRemoteInfoTeleportRole.md b/docs/ResourceRemoteInfoTeleportRole.md index 36cc658..4c27cc3 100644 --- a/docs/ResourceRemoteInfoTeleportRole.md +++ b/docs/ResourceRemoteInfoTeleportRole.md @@ -23,7 +23,7 @@ print(ResourceRemoteInfoTeleportRole.to_json()) # convert the object into a dict resource_remote_info_teleport_role_dict = resource_remote_info_teleport_role_instance.to_dict() # create an instance of ResourceRemoteInfoTeleportRole from a dict -resource_remote_info_teleport_role_form_dict = resource_remote_info_teleport_role.from_dict(resource_remote_info_teleport_role_dict) +resource_remote_info_teleport_role_from_dict = ResourceRemoteInfoTeleportRole.from_dict(resource_remote_info_teleport_role_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceTypeEnum.md b/docs/ResourceTypeEnum.md index d9a50f4..3d29ef1 100644 --- a/docs/ResourceTypeEnum.md +++ b/docs/ResourceTypeEnum.md @@ -2,10 +2,119 @@ The type of the resource. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `AWS_IAM_ROLE` (value: `'AWS_IAM_ROLE'`) + +* `AWS_EC2_INSTANCE` (value: `'AWS_EC2_INSTANCE'`) + +* `AWS_EKS_CLUSTER` (value: `'AWS_EKS_CLUSTER'`) + +* `AWS_RDS_POSTGRES_CLUSTER` (value: `'AWS_RDS_POSTGRES_CLUSTER'`) + +* `AWS_RDS_POSTGRES_INSTANCE` (value: `'AWS_RDS_POSTGRES_INSTANCE'`) + +* `AWS_RDS_MYSQL_CLUSTER` (value: `'AWS_RDS_MYSQL_CLUSTER'`) + +* `AWS_RDS_MYSQL_INSTANCE` (value: `'AWS_RDS_MYSQL_INSTANCE'`) + +* `AWS_ACCOUNT` (value: `'AWS_ACCOUNT'`) + +* `AWS_SSO_PERMISSION_SET` (value: `'AWS_SSO_PERMISSION_SET'`) + +* `AZURE_MANAGEMENT_GROUP` (value: `'AZURE_MANAGEMENT_GROUP'`) + +* `AZURE_RESOURCE_GROUP` (value: `'AZURE_RESOURCE_GROUP'`) + +* `AZURE_SUBSCRIPTION` (value: `'AZURE_SUBSCRIPTION'`) + +* `AZURE_VIRTUAL_MACHINE` (value: `'AZURE_VIRTUAL_MACHINE'`) + +* `AZURE_STORAGE_ACCOUNT` (value: `'AZURE_STORAGE_ACCOUNT'`) + +* `AZURE_STORAGE_CONTAINER` (value: `'AZURE_STORAGE_CONTAINER'`) + +* `AZURE_SQL_SERVER` (value: `'AZURE_SQL_SERVER'`) + +* `AZURE_SQL_MANAGED_INSTANCE` (value: `'AZURE_SQL_MANAGED_INSTANCE'`) + +* `AZURE_SQL_DATABASE` (value: `'AZURE_SQL_DATABASE'`) + +* `AZURE_SQL_MANAGED_DATABASE` (value: `'AZURE_SQL_MANAGED_DATABASE'`) + +* `AZURE_USER_ASSIGNED_MANAGED_IDENTITY` (value: `'AZURE_USER_ASSIGNED_MANAGED_Identity'`) + +* `AZURE_ENTRA_ID_ROLE` (value: `'AZURE_ENTRA_ID_ROLE'`) + +* `CUSTOM` (value: `'CUSTOM'`) + +* `CUSTOM_CONNECTOR` (value: `'CUSTOM_CONNECTOR'`) + +* `GCP_ORGANIZATION` (value: `'GCP_ORGANIZATION'`) + +* `GCP_BUCKET` (value: `'GCP_BUCKET'`) + +* `GCP_COMPUTE_INSTANCE` (value: `'GCP_COMPUTE_INSTANCE'`) + +* `GCP_FOLDER` (value: `'GCP_FOLDER'`) + +* `GCP_GKE_CLUSTER` (value: `'GCP_GKE_CLUSTER'`) + +* `GCP_PROJECT` (value: `'GCP_PROJECT'`) + +* `GCP_CLOUD_SQL_POSTGRES_INSTANCE` (value: `'GCP_CLOUD_SQL_POSTGRES_INSTANCE'`) + +* `GCP_CLOUD_SQL_MYSQL_INSTANCE` (value: `'GCP_CLOUD_SQL_MYSQL_INSTANCE'`) + +* `GCP_BIG_QUERY_DATASET` (value: `'GCP_BIG_QUERY_DATASET'`) + +* `GCP_BIG_QUERY_TABLE` (value: `'GCP_BIG_QUERY_TABLE'`) + +* `GCP_SERVICE_ACCOUNT` (value: `'GCP_SERVICE_ACCOUNT'`) + +* `GIT_HUB_REPO` (value: `'GIT_HUB_REPO'`) + +* `GIT_LAB_PROJECT` (value: `'GIT_LAB_PROJECT'`) + +* `GOOGLE_WORKSPACE_ROLE` (value: `'GOOGLE_WORKSPACE_ROLE'`) + +* `MONGO_INSTANCE` (value: `'MONGO_INSTANCE'`) + +* `MONGO_ATLAS_INSTANCE` (value: `'MONGO_ATLAS_INSTANCE'`) + +* `OKTA_APP` (value: `'OKTA_APP'`) + +* `OKTA_ROLE` (value: `'OKTA_ROLE'`) + +* `OPAL_ROLE` (value: `'OPAL_ROLE'`) + +* `OPAL_SCOPED_ROLE` (value: `'OPAL_SCOPED_ROLE'`) + +* `PAGERDUTY_ROLE` (value: `'PAGERDUTY_ROLE'`) + +* `TAILSCALE_SSH` (value: `'TAILSCALE_SSH'`) + +* `SALESFORCE_PERMISSION_SET` (value: `'SALESFORCE_PERMISSION_SET'`) + +* `SALESFORCE_PROFILE` (value: `'SALESFORCE_PROFILE'`) + +* `SALESFORCE_ROLE` (value: `'SALESFORCE_ROLE'`) + +* `SNOWFLAKE_DATABASE` (value: `'SNOWFLAKE_DATABASE'`) + +* `SNOWFLAKE_SCHEMA` (value: `'SNOWFLAKE_SCHEMA'`) + +* `SNOWFLAKE_TABLE` (value: `'SNOWFLAKE_TABLE'`) + +* `WORKDAY_ROLE` (value: `'WORKDAY_ROLE'`) + +* `MYSQL_INSTANCE` (value: `'MYSQL_INSTANCE'`) + +* `MARIADB_INSTANCE` (value: `'MARIADB_INSTANCE'`) + +* `POSTGRES_INSTANCE` (value: `'POSTGRES_INSTANCE'`) + +* `TELEPORT_ROLE` (value: `'TELEPORT_ROLE'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceUser.md b/docs/ResourceUser.md index d3de0ba..a0cd2e6 100644 --- a/docs/ResourceUser.md +++ b/docs/ResourceUser.md @@ -28,7 +28,7 @@ print(ResourceUser.to_json()) # convert the object into a dict resource_user_dict = resource_user_instance.to_dict() # create an instance of ResourceUser from a dict -resource_user_form_dict = resource_user.from_dict(resource_user_dict) +resource_user_from_dict = ResourceUser.from_dict(resource_user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceUserAccessStatus.md b/docs/ResourceUserAccessStatus.md index 0e873f4..541399e 100644 --- a/docs/ResourceUserAccessStatus.md +++ b/docs/ResourceUserAccessStatus.md @@ -27,7 +27,7 @@ print(ResourceUserAccessStatus.to_json()) # convert the object into a dict resource_user_access_status_dict = resource_user_access_status_instance.to_dict() # create an instance of ResourceUserAccessStatus from a dict -resource_user_access_status_form_dict = resource_user_access_status.from_dict(resource_user_access_status_dict) +resource_user_access_status_from_dict = ResourceUserAccessStatus.from_dict(resource_user_access_status_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceUserAccessStatusEnum.md b/docs/ResourceUserAccessStatusEnum.md index a00290b..9005a81 100644 --- a/docs/ResourceUserAccessStatusEnum.md +++ b/docs/ResourceUserAccessStatusEnum.md @@ -2,10 +2,13 @@ The status of the user's access to the resource. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `AUTHORIZED` (value: `'AUTHORIZED'`) + +* `REQUESTED` (value: `'REQUESTED'`) + +* `UNAUTHORIZED` (value: `'UNAUTHORIZED'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceWithAccessLevel.md b/docs/ResourceWithAccessLevel.md index ab8c111..528e254 100644 --- a/docs/ResourceWithAccessLevel.md +++ b/docs/ResourceWithAccessLevel.md @@ -24,7 +24,7 @@ print(ResourceWithAccessLevel.to_json()) # convert the object into a dict resource_with_access_level_dict = resource_with_access_level_instance.to_dict() # create an instance of ResourceWithAccessLevel from a dict -resource_with_access_level_form_dict = resource_with_access_level.from_dict(resource_with_access_level_dict) +resource_with_access_level_from_dict = ResourceWithAccessLevel.from_dict(resource_with_access_level_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourcesApi.md b/docs/ResourcesApi.md index 60bfd5e..6562a49 100644 --- a/docs/ResourcesApi.md +++ b/docs/ResourcesApi.md @@ -4,12 +4,15 @@ All URIs are relative to *https://api.opal.dev/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**add_resource_nhi**](ResourcesApi.md#add_resource_nhi) | **POST** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | [**add_resource_user**](ResourcesApi.md#add_resource_user) | **POST** /resources/{resource_id}/users/{user_id} | [**create_resource**](ResourcesApi.md#create_resource) | **POST** /resources | [**delete_resource**](ResourcesApi.md#delete_resource) | **DELETE** /resources/{resource_id} | +[**delete_resource_nhi**](ResourcesApi.md#delete_resource_nhi) | **DELETE** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | [**delete_resource_user**](ResourcesApi.md#delete_resource_user) | **DELETE** /resources/{resource_id}/users/{user_id} | [**get_resource**](ResourcesApi.md#get_resource) | **GET** /resources/{resource_id} | [**get_resource_message_channels**](ResourcesApi.md#get_resource_message_channels) | **GET** /resources/{resource_id}/message-channels | +[**get_resource_nhis**](ResourcesApi.md#get_resource_nhis) | **GET** /resources/{resource_id}/non-human-identities | [**get_resource_reviewer_stages**](ResourcesApi.md#get_resource_reviewer_stages) | **GET** /resources/{resource_id}/reviewer-stages | [**get_resource_reviewers**](ResourcesApi.md#get_resource_reviewers) | **GET** /resources/{resource_id}/reviewers | [**get_resource_tags**](ResourcesApi.md#get_resource_tags) | **GET** /resources/{resource_id}/tags | @@ -24,6 +27,88 @@ Method | HTTP request | Description [**update_resources**](ResourcesApi.md#update_resources) | **PUT** /resources | +# **add_resource_nhi** +> ResourceNHI add_resource_nhi(resource_id, non_human_identity_id, add_resource_nhi_request=add_resource_nhi_request) + + + +Gives a non-human identity access to this resource. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.models.add_resource_nhi_request import AddResourceNhiRequest +from opal.models.resource_nhi import ResourceNHI +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.ResourcesApi(api_client) + resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. + non_human_identity_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The resource ID of the non-human identity to add. + add_resource_nhi_request = opal.AddResourceNhiRequest() # AddResourceNhiRequest | (optional) + + try: + api_response = api_instance.add_resource_nhi(resource_id, non_human_identity_id, add_resource_nhi_request=add_resource_nhi_request) + print("The response of ResourcesApi->add_resource_nhi:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->add_resource_nhi: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **str**| The ID of the resource. | + **non_human_identity_id** | **str**| The resource ID of the non-human identity to add. | + **add_resource_nhi_request** | [**AddResourceNhiRequest**](AddResourceNhiRequest.md)| | [optional] + +### Return type + +[**ResourceNHI**](ResourceNHI.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Details about the access that the non-human identity was granted to the resource. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **add_resource_user** > ResourceUser add_resource_user(resource_id, user_id, duration_minutes=duration_minutes, access_level_remote_id=access_level_remote_id, add_resource_user_request=add_resource_user_request) @@ -262,6 +347,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_resource_nhi** +> delete_resource_nhi(resource_id, non_human_identity_id, access_level_remote_id=access_level_remote_id) + + + +Removes a non-human identity's direct access from this resource. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.ResourcesApi(api_client) + resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. + non_human_identity_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The resource ID of the non-human identity to remove from this resource. + access_level_remote_id = 'roles/cloudsql.instanceUser' # str | The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. (optional) + + try: + api_instance.delete_resource_nhi(resource_id, non_human_identity_id, access_level_remote_id=access_level_remote_id) + except Exception as e: + print("Exception when calling ResourcesApi->delete_resource_nhi: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **str**| The ID of the resource. | + **non_human_identity_id** | **str**| The resource ID of the non-human identity to remove from this resource. | + **access_level_remote_id** | **str**| The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | This non-human identity's access was successfully removed from this resource. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_resource_user** > delete_resource_user(resource_id, user_id, access_level_remote_id=access_level_remote_id) @@ -494,6 +657,85 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_resource_nhis** +> AccessList get_resource_nhis(resource_id, limit=limit) + + + +Gets the list of non-human identities with access to this resource. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.models.access_list import AccessList +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.ResourcesApi(api_client) + resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. + limit = 200 # int | Limit the number of results returned. (optional) + + try: + api_response = api_instance.get_resource_nhis(resource_id, limit=limit) + print("The response of ResourcesApi->get_resource_nhis:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourcesApi->get_resource_nhis: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_id** | **str**| The ID of the resource. | + **limit** | **int**| Limit the number of results returned. | [optional] + +### Return type + +[**AccessList**](AccessList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of non-human identities with access to this resource. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_resource_reviewer_stages** > List[ReviewerStage] get_resource_reviewer_stages(resource_id) diff --git a/docs/ReviewerIDList.md b/docs/ReviewerIDList.md index 9dc79aa..d2a1320 100644 --- a/docs/ReviewerIDList.md +++ b/docs/ReviewerIDList.md @@ -23,7 +23,7 @@ print(ReviewerIDList.to_json()) # convert the object into a dict reviewer_id_list_dict = reviewer_id_list_instance.to_dict() # create an instance of ReviewerIDList from a dict -reviewer_id_list_form_dict = reviewer_id_list.from_dict(reviewer_id_list_dict) +reviewer_id_list_from_dict = ReviewerIDList.from_dict(reviewer_id_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReviewerStage.md b/docs/ReviewerStage.md index b5b640b..ea4f479 100644 --- a/docs/ReviewerStage.md +++ b/docs/ReviewerStage.md @@ -7,7 +7,8 @@ A reviewer stage. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **require_manager_approval** | **bool** | Whether this reviewer stage should require manager approval. | -**operator** | **str** | The operator of the reviewer stage. | +**require_admin_approval** | **bool** | Whether this reviewer stage should require admin approval. | [optional] +**operator** | **str** | The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. | **owner_ids** | **List[str]** | | ## Example @@ -25,7 +26,7 @@ print(ReviewerStage.to_json()) # convert the object into a dict reviewer_stage_dict = reviewer_stage_instance.to_dict() # create an instance of ReviewerStage from a dict -reviewer_stage_form_dict = reviewer_stage.from_dict(reviewer_stage_dict) +reviewer_stage_from_dict = ReviewerStage.from_dict(reviewer_stage_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ReviewerStageList.md b/docs/ReviewerStageList.md index ad1fa49..b8a9a9e 100644 --- a/docs/ReviewerStageList.md +++ b/docs/ReviewerStageList.md @@ -22,7 +22,7 @@ print(ReviewerStageList.to_json()) # convert the object into a dict reviewer_stage_list_dict = reviewer_stage_list_instance.to_dict() # create an instance of ReviewerStageList from a dict -reviewer_stage_list_form_dict = reviewer_stage_list.from_dict(reviewer_stage_list_dict) +reviewer_stage_list_from_dict = ReviewerStageList.from_dict(reviewer_stage_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RiskSensitivityEnum.md b/docs/RiskSensitivityEnum.md new file mode 100644 index 0000000..18e3d7c --- /dev/null +++ b/docs/RiskSensitivityEnum.md @@ -0,0 +1,21 @@ +# RiskSensitivityEnum + +Indicates the level of potential impact misuse or unauthorized access may incur. + +## Enum + +* `UNKNOWN` (value: `'UNKNOWN'`) + +* `CRITICAL` (value: `'CRITICAL'`) + +* `HIGH` (value: `'HIGH'`) + +* `MEDIUM` (value: `'MEDIUM'`) + +* `LOW` (value: `'LOW'`) + +* `NONE` (value: `'NONE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Session.md b/docs/Session.md index d41c82f..9b5c6ac 100644 --- a/docs/Session.md +++ b/docs/Session.md @@ -27,7 +27,7 @@ print(Session.to_json()) # convert the object into a dict session_dict = session_instance.to_dict() # create an instance of Session from a dict -session_form_dict = session.from_dict(session_dict) +session_from_dict = Session.from_dict(session_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SessionsList.md b/docs/SessionsList.md index aec7e3b..7306d09 100644 --- a/docs/SessionsList.md +++ b/docs/SessionsList.md @@ -24,7 +24,7 @@ print(SessionsList.to_json()) # convert the object into a dict sessions_list_dict = sessions_list_instance.to_dict() # create an instance of SessionsList from a dict -sessions_list_form_dict = sessions_list.from_dict(sessions_list_dict) +sessions_list_from_dict = SessionsList.from_dict(sessions_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubEvent.md b/docs/SubEvent.md index 96412b1..d20cce2 100644 --- a/docs/SubEvent.md +++ b/docs/SubEvent.md @@ -23,7 +23,7 @@ print(SubEvent.to_json()) # convert the object into a dict sub_event_dict = sub_event_instance.to_dict() # create an instance of SubEvent from a dict -sub_event_form_dict = sub_event.from_dict(sub_event_dict) +sub_event_from_dict = SubEvent.from_dict(sub_event_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Tag.md b/docs/Tag.md index 8f8df8d..742d9e6 100644 --- a/docs/Tag.md +++ b/docs/Tag.md @@ -28,7 +28,7 @@ print(Tag.to_json()) # convert the object into a dict tag_dict = tag_instance.to_dict() # create an instance of Tag from a dict -tag_form_dict = tag.from_dict(tag_dict) +tag_from_dict = Tag.from_dict(tag_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TagFilter.md b/docs/TagFilter.md index a41962e..29205d1 100644 --- a/docs/TagFilter.md +++ b/docs/TagFilter.md @@ -24,7 +24,7 @@ print(TagFilter.to_json()) # convert the object into a dict tag_filter_dict = tag_filter_instance.to_dict() # create an instance of TagFilter from a dict -tag_filter_form_dict = tag_filter.from_dict(tag_filter_dict) +tag_filter_from_dict = TagFilter.from_dict(tag_filter_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TagsApi.md b/docs/TagsApi.md index 46801dd..23aa893 100644 --- a/docs/TagsApi.md +++ b/docs/TagsApi.md @@ -8,7 +8,9 @@ Method | HTTP request | Description [**add_resource_tag**](TagsApi.md#add_resource_tag) | **POST** /tags/{tag_id}/resources/{resource_id} | [**add_user_tag**](TagsApi.md#add_user_tag) | **POST** /tags/{tag_id}/users/{user_id} | [**create_tag**](TagsApi.md#create_tag) | **POST** /tag | +[**delete_tag_by_id**](TagsApi.md#delete_tag_by_id) | **DELETE** /tag/{tag_id} | [**get_tag**](TagsApi.md#get_tag) | **GET** /tag | +[**get_tag_by_id**](TagsApi.md#get_tag_by_id) | **GET** /tag/{tag_id} | [**get_tags**](TagsApi.md#get_tags) | **GET** /tags | [**remove_group_tag**](TagsApi.md#remove_group_tag) | **DELETE** /tags/{tag_id}/groups/{group_id} | [**remove_resource_tag**](TagsApi.md#remove_resource_tag) | **DELETE** /tags/{tag_id}/resources/{resource_id} | @@ -327,6 +329,80 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_tag_by_id** +> delete_tag_by_id(tag_id) + + + +UNSTABLE. May be removed at any time. Deletes a tag with the given id. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.TagsApi(api_client) + tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The tag ID + + try: + api_instance.delete_tag_by_id(tag_id) + except Exception as e: + print("Exception when calling TagsApi->delete_tag_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tag_id** | **str**| The tag ID | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Tag was deleted. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tag** > Tag get_tag(tag_key, tag_value=tag_value) @@ -406,6 +482,83 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_tag_by_id** +> Tag get_tag_by_id(tag_id) + + + +UNSTABLE. May be removed at any time. Gets a tag with the given id. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import opal +from opal.models.tag import Tag +from opal.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.opal.dev/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = opal.Configuration( + host = "https://api.opal.dev/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = opal.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with opal.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = opal.TagsApi(api_client) + tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The tag ID + + try: + api_response = api_instance.get_tag_by_id(tag_id) + print("The response of TagsApi->get_tag_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagsApi->get_tag_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tag_id** | **str**| The tag ID | + +### Return type + +[**Tag**](Tag.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The tag requested. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tags** > PaginatedTagsList get_tags(cursor=cursor, page_size=page_size) diff --git a/docs/TagsList.md b/docs/TagsList.md index 1052cb3..34a7bf7 100644 --- a/docs/TagsList.md +++ b/docs/TagsList.md @@ -22,7 +22,7 @@ print(TagsList.to_json()) # convert the object into a dict tags_list_dict = tags_list_instance.to_dict() # create an instance of TagsList from a dict -tags_list_form_dict = tags_list.from_dict(tags_list_dict) +tags_list_from_dict = TagsList.from_dict(tags_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TicketPropagationConfiguration.md b/docs/TicketPropagationConfiguration.md new file mode 100644 index 0000000..0ccf03c --- /dev/null +++ b/docs/TicketPropagationConfiguration.md @@ -0,0 +1,33 @@ +# TicketPropagationConfiguration + +Configuration for ticket propagation, when enabled, a ticket will be created for access changes related to the users in this resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled_on_grant** | **bool** | | +**enabled_on_revocation** | **bool** | | +**ticket_provider** | [**TicketingProviderEnum**](TicketingProviderEnum.md) | | [optional] +**ticket_project_id** | **str** | | [optional] + +## Example + +```python +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration + +# TODO update the JSON string below +json = "{}" +# create an instance of TicketPropagationConfiguration from a JSON string +ticket_propagation_configuration_instance = TicketPropagationConfiguration.from_json(json) +# print the JSON string representation of the object +print(TicketPropagationConfiguration.to_json()) + +# convert the object into a dict +ticket_propagation_configuration_dict = ticket_propagation_configuration_instance.to_dict() +# create an instance of TicketPropagationConfiguration from a dict +ticket_propagation_configuration_from_dict = TicketPropagationConfiguration.from_dict(ticket_propagation_configuration_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TicketingProviderEnum.md b/docs/TicketingProviderEnum.md new file mode 100644 index 0000000..36f37ce --- /dev/null +++ b/docs/TicketingProviderEnum.md @@ -0,0 +1,15 @@ +# TicketingProviderEnum + +The third party ticketing platform provider. + +## Enum + +* `JIRA` (value: `'JIRA'`) + +* `LINEAR` (value: `'LINEAR'`) + +* `SERVICE_NOW` (value: `'SERVICE_NOW'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UAR.md b/docs/UAR.md index 69fb373..d2811be 100644 --- a/docs/UAR.md +++ b/docs/UAR.md @@ -30,7 +30,7 @@ print(UAR.to_json()) # convert the object into a dict uar_dict = uar_instance.to_dict() # create an instance of UAR from a dict -uar_form_dict = uar.from_dict(uar_dict) +uar_from_dict = UAR.from_dict(uar_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UARReviewerAssignmentPolicyEnum.md b/docs/UARReviewerAssignmentPolicyEnum.md index 40a349e..f624ac5 100644 --- a/docs/UARReviewerAssignmentPolicyEnum.md +++ b/docs/UARReviewerAssignmentPolicyEnum.md @@ -2,10 +2,13 @@ A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `MANUALLY` (value: `'MANUALLY'`) + +* `BY_OWNING_TEAM_ADMIN` (value: `'BY_OWNING_TEAM_ADMIN'`) + +* `BY_MANAGER` (value: `'BY_MANAGER'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UARScope.md b/docs/UARScope.md index 326ac6f..ad1b384 100644 --- a/docs/UARScope.md +++ b/docs/UARScope.md @@ -6,9 +6,17 @@ If set, the access review will only contain resources and groups that match at l Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**group_visibility** | **str** | Specifies what users can see during an Access Review | [optional] +**users** | **List[str]** | The access review will only include the following users. If any users are selected, any entity filters will be applied to only the entities that the selected users have access to. | [optional] +**filter_operator** | **str** | Specifies whether entities must match all (AND) or any (OR) of the filters. | [optional] +**entities** | **List[str]** | This access review will include resources and groups with ids in the given strings. | [optional] +**apps** | **List[str]** | This access review will include items in the specified applications | [optional] +**admins** | **List[str]** | This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs. | [optional] +**group_types** | [**List[GroupTypeEnum]**](GroupTypeEnum.md) | This access review will include items of the specified group types | [optional] +**resource_types** | [**List[ResourceTypeEnum]**](ResourceTypeEnum.md) | This access review will include items of the specified resource types | [optional] +**include_group_bindings** | **bool** | | [optional] **tags** | [**List[TagFilter]**](TagFilter.md) | This access review will include resources and groups who are tagged with one of the given tags. | [optional] **names** | **List[str]** | This access review will include resources and groups whose name contains one of the given strings. | [optional] -**admins** | **List[str]** | This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs. | [optional] ## Example @@ -25,7 +33,7 @@ print(UARScope.to_json()) # convert the object into a dict uar_scope_dict = uar_scope_instance.to_dict() # create an instance of UARScope from a dict -uar_scope_form_dict = uar_scope.from_dict(uar_scope_dict) +uar_scope_from_dict = UARScope.from_dict(uar_scope_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateConfigurationTemplateInfo.md b/docs/UpdateConfigurationTemplateInfo.md index 9b874d6..b6dc811 100644 --- a/docs/UpdateConfigurationTemplateInfo.md +++ b/docs/UpdateConfigurationTemplateInfo.md @@ -9,14 +9,16 @@ Name | Type | Description | Notes **configuration_template_id** | **str** | The ID of the configuration template. | **name** | **str** | The name of the configuration template. | [optional] **admin_owner_id** | **str** | The ID of the owner of the configuration template. | [optional] -**visibility** | [**VisibilityInfo**](VisibilityInfo.md) | | [optional] +**visibility** | [**VisibilityInfo**](VisibilityInfo.md) | The visibility info of the configuration template. | [optional] **linked_audit_message_channel_ids** | **List[str]** | The IDs of the audit message channels linked to the configuration template. | [optional] **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | The request configuration list linked to the configuration template. | [optional] -**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | | [optional] +**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | The request configuration list linked to the configuration template. Deprecated in favor of `request_configurations`. | [optional] **member_oncall_schedule_ids** | **List[str]** | The IDs of the on-call schedules linked to the configuration template. | [optional] **break_glass_user_ids** | **List[str]** | The IDs of the break glass users linked to the configuration template. | [optional] **require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. | [optional] **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to resources associated with this configuration template. | [optional] +**ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] +**custom_request_notification** | **str** | Custom request notification sent upon request approval for this configuration template. | [optional] ## Example @@ -33,7 +35,7 @@ print(UpdateConfigurationTemplateInfo.to_json()) # convert the object into a dict update_configuration_template_info_dict = update_configuration_template_info_instance.to_dict() # create an instance of UpdateConfigurationTemplateInfo from a dict -update_configuration_template_info_form_dict = update_configuration_template_info.from_dict(update_configuration_template_info_dict) +update_configuration_template_info_from_dict = UpdateConfigurationTemplateInfo.from_dict(update_configuration_template_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateGroupBindingInfo.md b/docs/UpdateGroupBindingInfo.md index 421a2e3..e856db6 100644 --- a/docs/UpdateGroupBindingInfo.md +++ b/docs/UpdateGroupBindingInfo.md @@ -25,7 +25,7 @@ print(UpdateGroupBindingInfo.to_json()) # convert the object into a dict update_group_binding_info_dict = update_group_binding_info_instance.to_dict() # create an instance of UpdateGroupBindingInfo from a dict -update_group_binding_info_form_dict = update_group_binding_info.from_dict(update_group_binding_info_dict) +update_group_binding_info_from_dict = UpdateGroupBindingInfo.from_dict(update_group_binding_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateGroupBindingInfoList.md b/docs/UpdateGroupBindingInfoList.md index 9e36cd3..92b357e 100644 --- a/docs/UpdateGroupBindingInfoList.md +++ b/docs/UpdateGroupBindingInfoList.md @@ -22,7 +22,7 @@ print(UpdateGroupBindingInfoList.to_json()) # convert the object into a dict update_group_binding_info_list_dict = update_group_binding_info_list_instance.to_dict() # create an instance of UpdateGroupBindingInfoList from a dict -update_group_binding_info_list_form_dict = update_group_binding_info_list.from_dict(update_group_binding_info_list_dict) +update_group_binding_info_list_from_dict = UpdateGroupBindingInfoList.from_dict(update_group_binding_info_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateGroupInfo.md b/docs/UpdateGroupInfo.md index 6f735b5..e194ac8 100644 --- a/docs/UpdateGroupInfo.md +++ b/docs/UpdateGroupInfo.md @@ -21,8 +21,11 @@ Name | Type | Description | Notes **configuration_template_id** | **str** | The ID of the associated configuration template. | [optional] **request_template_id** | **str** | The ID of the associated request template. Deprecated in favor of `request_configurations`. | [optional] **is_requestable** | **bool** | A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`. | [optional] +**group_leader_user_ids** | **List[str]** | A list of User IDs for the group leaders of the group | [optional] **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. | [optional] -**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | | [optional] +**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. | [optional] +**custom_request_notification** | **str** | Custom request notification sent to the requester when the request is approved. | [optional] +**risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] ## Example @@ -39,7 +42,7 @@ print(UpdateGroupInfo.to_json()) # convert the object into a dict update_group_info_dict = update_group_info_instance.to_dict() # create an instance of UpdateGroupInfo from a dict -update_group_info_form_dict = update_group_info.from_dict(update_group_info_dict) +update_group_info_from_dict = UpdateGroupInfo.from_dict(update_group_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateGroupInfoList.md b/docs/UpdateGroupInfoList.md index e6a04c8..7fc7660 100644 --- a/docs/UpdateGroupInfoList.md +++ b/docs/UpdateGroupInfoList.md @@ -22,7 +22,7 @@ print(UpdateGroupInfoList.to_json()) # convert the object into a dict update_group_info_list_dict = update_group_info_list_instance.to_dict() # create an instance of UpdateGroupInfoList from a dict -update_group_info_list_form_dict = update_group_info_list.from_dict(update_group_info_list_dict) +update_group_info_list_from_dict = UpdateGroupInfoList.from_dict(update_group_info_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateGroupResourcesInfo.md b/docs/UpdateGroupResourcesInfo.md index 41c1096..ebb2e28 100644 --- a/docs/UpdateGroupResourcesInfo.md +++ b/docs/UpdateGroupResourcesInfo.md @@ -22,7 +22,7 @@ print(UpdateGroupResourcesInfo.to_json()) # convert the object into a dict update_group_resources_info_dict = update_group_resources_info_instance.to_dict() # create an instance of UpdateGroupResourcesInfo from a dict -update_group_resources_info_form_dict = update_group_resources_info.from_dict(update_group_resources_info_dict) +update_group_resources_info_from_dict = UpdateGroupResourcesInfo.from_dict(update_group_resources_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateIdpGroupMappingsRequest.md b/docs/UpdateIdpGroupMappingsRequest.md new file mode 100644 index 0000000..a8f59e1 --- /dev/null +++ b/docs/UpdateIdpGroupMappingsRequest.md @@ -0,0 +1,29 @@ +# UpdateIdpGroupMappingsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mappings** | [**List[UpdateIdpGroupMappingsRequestMappingsInner]**](UpdateIdpGroupMappingsRequestMappingsInner.md) | | + +## Example + +```python +from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdpGroupMappingsRequest from a JSON string +update_idp_group_mappings_request_instance = UpdateIdpGroupMappingsRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateIdpGroupMappingsRequest.to_json()) + +# convert the object into a dict +update_idp_group_mappings_request_dict = update_idp_group_mappings_request_instance.to_dict() +# create an instance of UpdateIdpGroupMappingsRequest from a dict +update_idp_group_mappings_request_from_dict = UpdateIdpGroupMappingsRequest.from_dict(update_idp_group_mappings_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateIdpGroupMappingsRequestMappingsInner.md b/docs/UpdateIdpGroupMappingsRequestMappingsInner.md new file mode 100644 index 0000000..f66fd00 --- /dev/null +++ b/docs/UpdateIdpGroupMappingsRequestMappingsInner.md @@ -0,0 +1,30 @@ +# UpdateIdpGroupMappingsRequestMappingsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | | [optional] +**alias** | **str** | | [optional] + +## Example + +```python +from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateIdpGroupMappingsRequestMappingsInner from a JSON string +update_idp_group_mappings_request_mappings_inner_instance = UpdateIdpGroupMappingsRequestMappingsInner.from_json(json) +# print the JSON string representation of the object +print(UpdateIdpGroupMappingsRequestMappingsInner.to_json()) + +# convert the object into a dict +update_idp_group_mappings_request_mappings_inner_dict = update_idp_group_mappings_request_mappings_inner_instance.to_dict() +# create an instance of UpdateIdpGroupMappingsRequestMappingsInner from a dict +update_idp_group_mappings_request_mappings_inner_from_dict = UpdateIdpGroupMappingsRequestMappingsInner.from_dict(update_idp_group_mappings_request_mappings_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateOwnerInfo.md b/docs/UpdateOwnerInfo.md index 295d18d..a6df014 100644 --- a/docs/UpdateOwnerInfo.md +++ b/docs/UpdateOwnerInfo.md @@ -28,7 +28,7 @@ print(UpdateOwnerInfo.to_json()) # convert the object into a dict update_owner_info_dict = update_owner_info_instance.to_dict() # create an instance of UpdateOwnerInfo from a dict -update_owner_info_form_dict = update_owner_info.from_dict(update_owner_info_dict) +update_owner_info_from_dict = UpdateOwnerInfo.from_dict(update_owner_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateOwnerInfoList.md b/docs/UpdateOwnerInfoList.md index b029816..6a9a3da 100644 --- a/docs/UpdateOwnerInfoList.md +++ b/docs/UpdateOwnerInfoList.md @@ -22,7 +22,7 @@ print(UpdateOwnerInfoList.to_json()) # convert the object into a dict update_owner_info_list_dict = update_owner_info_list_instance.to_dict() # create an instance of UpdateOwnerInfoList from a dict -update_owner_info_list_form_dict = update_owner_info_list.from_dict(update_owner_info_list_dict) +update_owner_info_list_from_dict = UpdateOwnerInfoList.from_dict(update_owner_info_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateResourceInfo.md b/docs/UpdateResourceInfo.md index b57c634..0c8b5f4 100644 --- a/docs/UpdateResourceInfo.md +++ b/docs/UpdateResourceInfo.md @@ -19,11 +19,14 @@ Name | Type | Description | Notes **require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this resource. Deprecated in favor of `request_configurations`. | [optional] **require_mfa_to_connect** | **bool** | A bool representing whether or not to require MFA to connect to this resource. | [optional] **auto_approval** | **bool** | A bool representing whether or not to automatically approve requests to this resource. Deprecated in favor of `request_configurations`. | [optional] +**ticket_propagation** | [**TicketPropagationConfiguration**](TicketPropagationConfiguration.md) | | [optional] +**custom_request_notification** | **str** | Custom request notification sent upon request approval. | [optional] +**risk_sensitivity_override** | [**RiskSensitivityEnum**](RiskSensitivityEnum.md) | | [optional] **configuration_template_id** | **str** | The ID of the associated configuration template. | [optional] **request_template_id** | **str** | The ID of the associated request template. Deprecated in favor of `request_configurations`. | [optional] **is_requestable** | **bool** | A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`. | [optional] **request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of configurations for requests to this resource. If not provided, the default request configuration will be used. | [optional] -**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | | [optional] +**request_configuration_list** | [**CreateRequestConfigurationInfoList**](CreateRequestConfigurationInfoList.md) | A list of configurations for requests to this resource. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`. | [optional] ## Example @@ -40,7 +43,7 @@ print(UpdateResourceInfo.to_json()) # convert the object into a dict update_resource_info_dict = update_resource_info_instance.to_dict() # create an instance of UpdateResourceInfo from a dict -update_resource_info_form_dict = update_resource_info.from_dict(update_resource_info_dict) +update_resource_info_from_dict = UpdateResourceInfo.from_dict(update_resource_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateResourceInfoList.md b/docs/UpdateResourceInfoList.md index 4b68440..20e82ea 100644 --- a/docs/UpdateResourceInfoList.md +++ b/docs/UpdateResourceInfoList.md @@ -22,7 +22,7 @@ print(UpdateResourceInfoList.to_json()) # convert the object into a dict update_resource_info_list_dict = update_resource_info_list_instance.to_dict() # create an instance of UpdateResourceInfoList from a dict -update_resource_info_list_form_dict = update_resource_info_list.from_dict(update_resource_info_list_dict) +update_resource_info_list_from_dict = UpdateResourceInfoList.from_dict(update_resource_info_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/User.md b/docs/User.md index e4971ba..3892eb9 100644 --- a/docs/User.md +++ b/docs/User.md @@ -29,7 +29,7 @@ print(User.to_json()) # convert the object into a dict user_dict = user_instance.to_dict() # create an instance of User from a dict -user_form_dict = user.from_dict(user_dict) +user_from_dict = User.from_dict(user_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserHrIdpStatusEnum.md b/docs/UserHrIdpStatusEnum.md index 9baa83c..150dab5 100644 --- a/docs/UserHrIdpStatusEnum.md +++ b/docs/UserHrIdpStatusEnum.md @@ -2,10 +2,17 @@ User status pulled from an HR/IDP provider. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ACTIVE` (value: `'ACTIVE'`) + +* `SUSPENDED` (value: `'SUSPENDED'`) + +* `DEPROVISIONED` (value: `'DEPROVISIONED'`) + +* `DELETED` (value: `'DELETED'`) + +* `NOT_FOUND` (value: `'NOT_FOUND'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserIDList.md b/docs/UserIDList.md index e584301..54baaf4 100644 --- a/docs/UserIDList.md +++ b/docs/UserIDList.md @@ -23,7 +23,7 @@ print(UserIDList.to_json()) # convert the object into a dict user_id_list_dict = user_id_list_instance.to_dict() # create an instance of UserIDList from a dict -user_id_list_form_dict = user_id_list.from_dict(user_id_list_dict) +user_id_list_from_dict = UserIDList.from_dict(user_id_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserList.md b/docs/UserList.md index 82daf35..cbe310e 100644 --- a/docs/UserList.md +++ b/docs/UserList.md @@ -23,7 +23,7 @@ print(UserList.to_json()) # convert the object into a dict user_list_dict = user_list_instance.to_dict() # create an instance of UserList from a dict -user_list_form_dict = user_list.from_dict(user_list_dict) +user_list_from_dict = UserList.from_dict(user_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VisibilityInfo.md b/docs/VisibilityInfo.md index b6fa88d..aee3281 100644 --- a/docs/VisibilityInfo.md +++ b/docs/VisibilityInfo.md @@ -24,7 +24,7 @@ print(VisibilityInfo.to_json()) # convert the object into a dict visibility_info_dict = visibility_info_instance.to_dict() # create an instance of VisibilityInfo from a dict -visibility_info_form_dict = visibility_info.from_dict(visibility_info_dict) +visibility_info_from_dict = VisibilityInfo.from_dict(visibility_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VisibilityTypeEnum.md b/docs/VisibilityTypeEnum.md index f2ed8e6..27ddc6d 100644 --- a/docs/VisibilityTypeEnum.md +++ b/docs/VisibilityTypeEnum.md @@ -2,10 +2,11 @@ The visibility level of the entity. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `GLOBAL` (value: `'GLOBAL'`) + +* `LIMITED` (value: `'LIMITED'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/opal/__init__.py b/opal/__init__.py index d3c8ec0..72669e3 100644 --- a/opal/__init__.py +++ b/opal/__init__.py @@ -23,7 +23,9 @@ from opal.api.events_api import EventsApi from opal.api.group_bindings_api import GroupBindingsApi from opal.api.groups_api import GroupsApi +from opal.api.idp_group_mappings_api import IdpGroupMappingsApi from opal.api.message_channels_api import MessageChannelsApi +from opal.api.non_human_identities_api import NonHumanIdentitiesApi from opal.api.on_call_schedules_api import OnCallSchedulesApi from opal.api.owners_api import OwnersApi from opal.api.requests_api import RequestsApi @@ -45,8 +47,11 @@ from opal.exceptions import ApiException # import models into sdk package +from opal.models.access import Access +from opal.models.access_list import AccessList from opal.models.add_group_resource_request import AddGroupResourceRequest from opal.models.add_group_user_request import AddGroupUserRequest +from opal.models.add_resource_nhi_request import AddResourceNhiRequest from opal.models.add_resource_user_request import AddResourceUserRequest from opal.models.app import App from opal.models.app_type_enum import AppTypeEnum @@ -62,7 +67,13 @@ from opal.models.create_message_channel_info import CreateMessageChannelInfo from opal.models.create_on_call_schedule_info import CreateOnCallScheduleInfo from opal.models.create_owner_info import CreateOwnerInfo +from opal.models.create_request200_response import CreateRequest200Response from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal.models.create_request_info import CreateRequestInfo +from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket from opal.models.create_resource_info import CreateResourceInfo from opal.models.create_tag_info import CreateTagInfo from opal.models.create_uar_info import CreateUARInfo @@ -87,6 +98,8 @@ from opal.models.group_type_enum import GroupTypeEnum from opal.models.group_user import GroupUser from opal.models.group_user_list import GroupUserList +from opal.models.idp_group_mapping import IdpGroupMapping +from opal.models.idp_group_mapping_list import IdpGroupMappingList from opal.models.message_channel import MessageChannel from opal.models.message_channel_id_list import MessageChannelIDList from opal.models.message_channel_list import MessageChannelList @@ -117,6 +130,7 @@ from opal.models.resource_access_level import ResourceAccessLevel from opal.models.resource_access_user import ResourceAccessUser from opal.models.resource_access_user_list import ResourceAccessUserList +from opal.models.resource_nhi import ResourceNHI from opal.models.resource_remote_info import ResourceRemoteInfo from opal.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance @@ -132,6 +146,7 @@ from opal.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster from opal.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization from opal.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject @@ -151,12 +166,15 @@ from opal.models.reviewer_id_list import ReviewerIDList from opal.models.reviewer_stage import ReviewerStage from opal.models.reviewer_stage_list import ReviewerStageList +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum from opal.models.session import Session from opal.models.sessions_list import SessionsList from opal.models.sub_event import SubEvent from opal.models.tag import Tag from opal.models.tag_filter import TagFilter from opal.models.tags_list import TagsList +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal.models.ticketing_provider_enum import TicketingProviderEnum from opal.models.uar import UAR from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum from opal.models.uar_scope import UARScope @@ -166,6 +184,8 @@ from opal.models.update_group_info import UpdateGroupInfo from opal.models.update_group_info_list import UpdateGroupInfoList from opal.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner from opal.models.update_owner_info import UpdateOwnerInfo from opal.models.update_owner_info_list import UpdateOwnerInfoList from opal.models.update_resource_info import UpdateResourceInfo diff --git a/opal/api/__init__.py b/opal/api/__init__.py index e7d52ff..a808043 100644 --- a/opal/api/__init__.py +++ b/opal/api/__init__.py @@ -6,7 +6,9 @@ from opal.api.events_api import EventsApi from opal.api.group_bindings_api import GroupBindingsApi from opal.api.groups_api import GroupsApi +from opal.api.idp_group_mappings_api import IdpGroupMappingsApi from opal.api.message_channels_api import MessageChannelsApi +from opal.api.non_human_identities_api import NonHumanIdentitiesApi from opal.api.on_call_schedules_api import OnCallSchedulesApi from opal.api.owners_api import OwnersApi from opal.api.requests_api import RequestsApi diff --git a/opal/api/apps_api.py b/opal/api/apps_api.py index 4e7044d..0f37b17 100644 --- a/opal/api/apps_api.py +++ b/opal/api/apps_api.py @@ -257,7 +257,9 @@ def _get_app_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,11 +272,12 @@ def _get_app_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -529,7 +532,9 @@ def _get_apps_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -548,11 +553,12 @@ def _get_apps_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api/configuration_templates_api.py b/opal/api/configuration_templates_api.py index 9ea4e07..08935a6 100644 --- a/opal/api/configuration_templates_api.py +++ b/opal/api/configuration_templates_api.py @@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field +from pydantic import Field, StrictStr from typing_extensions import Annotated from opal.models.configuration_template import ConfigurationTemplate from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo @@ -257,7 +257,9 @@ def _create_configuration_template_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,11 +272,12 @@ def _create_configuration_template_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -313,6 +316,260 @@ def _create_configuration_template_serialize( + @validate_call + def delete_configuration_template( + self, + configuration_template_id: Annotated[StrictStr, Field(description="The ID of the configuration template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_configuration_template + + Deletes a configuration template. + + :param configuration_template_id: The ID of the configuration template. (required) + :type configuration_template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_configuration_template_serialize( + configuration_template_id=configuration_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_configuration_template_with_http_info( + self, + configuration_template_id: Annotated[StrictStr, Field(description="The ID of the configuration template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_configuration_template + + Deletes a configuration template. + + :param configuration_template_id: The ID of the configuration template. (required) + :type configuration_template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_configuration_template_serialize( + configuration_template_id=configuration_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_configuration_template_without_preload_content( + self, + configuration_template_id: Annotated[StrictStr, Field(description="The ID of the configuration template.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_configuration_template + + Deletes a configuration template. + + :param configuration_template_id: The ID of the configuration template. (required) + :type configuration_template_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_configuration_template_serialize( + configuration_template_id=configuration_template_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_configuration_template_serialize( + self, + configuration_template_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if configuration_template_id is not None: + _path_params['configuration_template_id'] = configuration_template_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/configuration-templates/{configuration_template_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_configuration_templates( self, @@ -515,7 +772,9 @@ def _get_configuration_templates_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -526,11 +785,12 @@ def _get_configuration_templates_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -771,7 +1031,9 @@ def _update_configuration_template_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -784,11 +1046,12 @@ def _update_configuration_template_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/opal/api/events_api.py b/opal/api/events_api.py index 4eb55ab..b8c7462 100644 --- a/opal/api/events_api.py +++ b/opal/api/events_api.py @@ -346,7 +346,9 @@ def _events_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -389,11 +391,12 @@ def _events_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api/group_bindings_api.py b/opal/api/group_bindings_api.py index 3a2e9f4..ada764c 100644 --- a/opal/api/group_bindings_api.py +++ b/opal/api/group_bindings_api.py @@ -258,7 +258,9 @@ def _create_group_binding_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -271,11 +273,12 @@ def _create_group_binding_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -529,7 +532,9 @@ def _delete_group_binding_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -781,7 +786,9 @@ def _get_group_binding_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -794,11 +801,12 @@ def _get_group_binding_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1052,7 +1060,9 @@ def _get_group_bindings_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1071,11 +1081,12 @@ def _get_group_bindings_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1316,7 +1327,9 @@ def _update_group_bindings_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/opal/api/groups_api.py b/opal/api/groups_api.py index 799da46..e42cd3f 100644 --- a/opal/api/groups_api.py +++ b/opal/api/groups_api.py @@ -314,7 +314,9 @@ def _add_group_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -335,11 +337,12 @@ def _add_group_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -645,7 +648,9 @@ def _add_group_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -670,11 +675,12 @@ def _add_group_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -928,7 +934,9 @@ def _create_group_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -941,11 +949,12 @@ def _create_group_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1199,7 +1208,9 @@ def _delete_group_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1464,7 +1475,9 @@ def _delete_group_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1718,7 +1731,9 @@ def _get_group_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1731,11 +1746,12 @@ def _get_group_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1976,7 +1992,9 @@ def _get_group_message_channels_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1989,11 +2007,12 @@ def _get_group_message_channels_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2234,7 +2253,9 @@ def _get_group_on_call_schedules_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2247,11 +2268,12 @@ def _get_group_on_call_schedules_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2492,7 +2514,9 @@ def _get_group_resources_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2505,11 +2529,12 @@ def _get_group_resources_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2750,7 +2775,9 @@ def _get_group_reviewer_stages_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2763,11 +2790,12 @@ def _get_group_reviewer_stages_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3011,7 +3039,9 @@ def _get_group_reviewers_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3024,11 +3054,12 @@ def _get_group_reviewers_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3269,7 +3300,9 @@ def _get_group_tags_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3282,11 +3315,12 @@ def _get_group_tags_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3527,7 +3561,9 @@ def _get_group_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3540,11 +3576,12 @@ def _get_group_users_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3785,7 +3822,9 @@ def _get_group_visibility_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3798,11 +3837,12 @@ def _get_group_visibility_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4096,7 +4136,9 @@ def _get_groups_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4127,11 +4169,12 @@ def _get_groups_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -4385,7 +4428,9 @@ def _set_group_message_channels_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4400,11 +4445,12 @@ def _set_group_message_channels_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -4671,7 +4717,9 @@ def _set_group_on_call_schedules_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4686,11 +4734,12 @@ def _set_group_on_call_schedules_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -4957,7 +5006,9 @@ def _set_group_resources_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5237,7 +5288,9 @@ def _set_group_reviewer_stages_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5252,11 +5305,12 @@ def _set_group_reviewer_stages_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -5526,7 +5580,9 @@ def _set_group_reviewers_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5541,11 +5597,12 @@ def _set_group_reviewers_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -5812,7 +5869,9 @@ def _set_group_visibility_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5827,11 +5886,12 @@ def _set_group_visibility_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -6085,7 +6145,9 @@ def _update_groups_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6098,11 +6160,12 @@ def _update_groups_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/opal/api/idp_group_mappings_api.py b/opal/api/idp_group_mappings_api.py new file mode 100644 index 0000000..fa2e326 --- /dev/null +++ b/opal/api/idp_group_mappings_api.py @@ -0,0 +1,852 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from opal.models.idp_group_mapping_list import IdpGroupMappingList +from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest + +from opal.api_client import ApiClient, RequestSerialized +from opal.api_response import ApiResponse +from opal.rest import RESTResponseType + + +class IdpGroupMappingsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def delete_idp_group_mappings_by_app_resource_id_group_id( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + group_id: Annotated[StrictStr, Field(description="The ID of the group.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_idp_group_mappings_by_app_resource_id_group_id + + Deletes an `IdpGroupMapping` object. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param group_id: The ID of the group. (required) + :type group_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_idp_group_mappings_by_app_resource_id_group_id_serialize( + app_resource_id=app_resource_id, + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_idp_group_mappings_by_app_resource_id_group_id_with_http_info( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + group_id: Annotated[StrictStr, Field(description="The ID of the group.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_idp_group_mappings_by_app_resource_id_group_id + + Deletes an `IdpGroupMapping` object. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param group_id: The ID of the group. (required) + :type group_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_idp_group_mappings_by_app_resource_id_group_id_serialize( + app_resource_id=app_resource_id, + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_idp_group_mappings_by_app_resource_id_group_id_without_preload_content( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + group_id: Annotated[StrictStr, Field(description="The ID of the group.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_idp_group_mappings_by_app_resource_id_group_id + + Deletes an `IdpGroupMapping` object. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param group_id: The ID of the group. (required) + :type group_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_idp_group_mappings_by_app_resource_id_group_id_serialize( + app_resource_id=app_resource_id, + group_id=group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_idp_group_mappings_by_app_resource_id_group_id_serialize( + self, + app_resource_id, + group_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if app_resource_id is not None: + _path_params['app_resource_id'] = app_resource_id + if group_id is not None: + _path_params['group_id'] = group_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/idp-group-mappings/{app_resource_id}/{group_id}/', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_idp_group_mappings( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IdpGroupMappingList: + """get_idp_group_mappings + + Returns the configured set of available `IdpGroupMapping` objects for an Okta app. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_idp_group_mappings_serialize( + app_resource_id=app_resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IdpGroupMappingList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_idp_group_mappings_with_http_info( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IdpGroupMappingList]: + """get_idp_group_mappings + + Returns the configured set of available `IdpGroupMapping` objects for an Okta app. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_idp_group_mappings_serialize( + app_resource_id=app_resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IdpGroupMappingList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_idp_group_mappings_without_preload_content( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_idp_group_mappings + + Returns the configured set of available `IdpGroupMapping` objects for an Okta app. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_idp_group_mappings_serialize( + app_resource_id=app_resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IdpGroupMappingList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_idp_group_mappings_serialize( + self, + app_resource_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if app_resource_id is not None: + _path_params['app_resource_id'] = app_resource_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/idp-group-mappings/{app_resource_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_idp_group_mappings( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + update_idp_group_mappings_request: UpdateIdpGroupMappingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """update_idp_group_mappings + + Updates the list of available `IdpGroupMapping` objects for an Okta app. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param update_idp_group_mappings_request: (required) + :type update_idp_group_mappings_request: UpdateIdpGroupMappingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_idp_group_mappings_serialize( + app_resource_id=app_resource_id, + update_idp_group_mappings_request=update_idp_group_mappings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_idp_group_mappings_with_http_info( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + update_idp_group_mappings_request: UpdateIdpGroupMappingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """update_idp_group_mappings + + Updates the list of available `IdpGroupMapping` objects for an Okta app. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param update_idp_group_mappings_request: (required) + :type update_idp_group_mappings_request: UpdateIdpGroupMappingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_idp_group_mappings_serialize( + app_resource_id=app_resource_id, + update_idp_group_mappings_request=update_idp_group_mappings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_idp_group_mappings_without_preload_content( + self, + app_resource_id: Annotated[StrictStr, Field(description="The ID of the Okta app.")], + update_idp_group_mappings_request: UpdateIdpGroupMappingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """update_idp_group_mappings + + Updates the list of available `IdpGroupMapping` objects for an Okta app. + + :param app_resource_id: The ID of the Okta app. (required) + :type app_resource_id: str + :param update_idp_group_mappings_request: (required) + :type update_idp_group_mappings_request: UpdateIdpGroupMappingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_idp_group_mappings_serialize( + app_resource_id=app_resource_id, + update_idp_group_mappings_request=update_idp_group_mappings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_idp_group_mappings_serialize( + self, + app_resource_id, + update_idp_group_mappings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if app_resource_id is not None: + _path_params['app_resource_id'] = app_resource_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_idp_group_mappings_request is not None: + _body_params = update_idp_group_mappings_request + + + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/idp-group-mappings/{app_resource_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal/api/message_channels_api.py b/opal/api/message_channels_api.py index 24d615c..9b6f103 100644 --- a/opal/api/message_channels_api.py +++ b/opal/api/message_channels_api.py @@ -256,7 +256,9 @@ def _create_message_channel_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,11 +271,12 @@ def _create_message_channel_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -527,7 +530,9 @@ def _get_message_channel_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -540,11 +545,12 @@ def _get_message_channel_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -772,7 +778,9 @@ def _get_message_channels_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -783,11 +791,12 @@ def _get_message_channels_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api/non_human_identities_api.py b/opal/api/non_human_identities_api.py new file mode 100644 index 0000000..cb810ea --- /dev/null +++ b/opal/api/non_human_identities_api.py @@ -0,0 +1,320 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from opal.models.paginated_resources_list import PaginatedResourcesList + +from opal.api_client import ApiClient, RequestSerialized +from opal.api_response import ApiResponse +from opal.rest import RESTResponseType + + +class NonHumanIdentitiesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_nhis( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PaginatedResourcesList: + """get_nhis + + Returns a list of non-human identities for your organization. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_nhis_serialize( + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedResourcesList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_nhis_with_http_info( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PaginatedResourcesList]: + """get_nhis + + Returns a list of non-human identities for your organization. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_nhis_serialize( + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedResourcesList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_nhis_without_preload_content( + self, + cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True)]], Field(description="Number of results to return per page. Default is 200.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_nhis + + Returns a list of non-human identities for your organization. + + :param cursor: The pagination cursor value. + :type cursor: str + :param page_size: Number of results to return per page. Default is 200. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_nhis_serialize( + cursor=cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PaginatedResourcesList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_nhis_serialize( + self, + cursor, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/non-human-identities', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/opal/api/on_call_schedules_api.py b/opal/api/on_call_schedules_api.py index cbb6671..d2fbcd2 100644 --- a/opal/api/on_call_schedules_api.py +++ b/opal/api/on_call_schedules_api.py @@ -256,7 +256,9 @@ def _create_on_call_schedule_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -269,11 +271,12 @@ def _create_on_call_schedule_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -527,7 +530,9 @@ def _get_on_call_schedule_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -540,11 +545,12 @@ def _get_on_call_schedule_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -772,7 +778,9 @@ def _get_on_call_schedules_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -783,11 +791,12 @@ def _get_on_call_schedules_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api/owners_api.py b/opal/api/owners_api.py index 21fff9a..ec975f6 100644 --- a/opal/api/owners_api.py +++ b/opal/api/owners_api.py @@ -260,7 +260,9 @@ def _create_owner_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -273,11 +275,12 @@ def _create_owner_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -531,7 +534,9 @@ def _delete_owner_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -783,7 +788,9 @@ def _get_owner_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -796,11 +803,12 @@ def _get_owner_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1041,7 +1049,9 @@ def _get_owner_from_name_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1054,11 +1064,12 @@ def _get_owner_from_name_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1299,7 +1310,9 @@ def _get_owner_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1312,11 +1325,12 @@ def _get_owner_users_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1583,7 +1597,9 @@ def _get_owners_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1606,11 +1622,12 @@ def _get_owners_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1864,7 +1881,9 @@ def _set_owner_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1879,11 +1898,12 @@ def _set_owner_users_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -2137,7 +2157,9 @@ def _update_owners_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2150,11 +2172,12 @@ def _update_owners_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/opal/api/requests_api.py b/opal/api/requests_api.py index 0703f06..73ccca8 100644 --- a/opal/api/requests_api.py +++ b/opal/api/requests_api.py @@ -20,6 +20,8 @@ from pydantic import Field, StrictBool, StrictStr from typing import Optional from typing_extensions import Annotated +from opal.models.create_request200_response import CreateRequest200Response +from opal.models.create_request_info import CreateRequestInfo from opal.models.request_list import RequestList from opal.api_client import ApiClient, RequestSerialized @@ -40,6 +42,280 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def create_request( + self, + create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CreateRequest200Response: + """create_request + + Create an access request + + :param create_request_info: Resources to be updated (required) + :type create_request_info: CreateRequestInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_request_serialize( + create_request_info=create_request_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateRequest200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_request_with_http_info( + self, + create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CreateRequest200Response]: + """create_request + + Create an access request + + :param create_request_info: Resources to be updated (required) + :type create_request_info: CreateRequestInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_request_serialize( + create_request_info=create_request_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateRequest200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_request_without_preload_content( + self, + create_request_info: Annotated[CreateRequestInfo, Field(description="Resources to be updated")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_request + + Create an access request + + :param create_request_info: Resources to be updated (required) + :type create_request_info: CreateRequestInfo + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_request_serialize( + create_request_info=create_request_info, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CreateRequest200Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_request_serialize( + self, + create_request_info, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_request_info is not None: + _body_params = create_request_info + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/requests', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_requests( self, @@ -281,7 +557,9 @@ def _get_requests_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -304,11 +582,12 @@ def _get_requests_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api/resources_api.py b/opal/api/resources_api.py index 4dd26dd..a2ac389 100644 --- a/opal/api/resources_api.py +++ b/opal/api/resources_api.py @@ -20,6 +20,8 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated +from opal.models.access_list import AccessList +from opal.models.add_resource_nhi_request import AddResourceNhiRequest from opal.models.add_resource_user_request import AddResourceUserRequest from opal.models.create_resource_info import CreateResourceInfo from opal.models.message_channel_id_list import MessageChannelIDList @@ -27,6 +29,7 @@ from opal.models.paginated_resources_list import PaginatedResourcesList from opal.models.resource import Resource from opal.models.resource_access_user_list import ResourceAccessUserList +from opal.models.resource_nhi import ResourceNHI from opal.models.resource_type_enum import ResourceTypeEnum from opal.models.resource_user import ResourceUser from opal.models.resource_user_access_status import ResourceUserAccessStatus @@ -55,6 +58,310 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def add_resource_nhi( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[StrictStr, Field(description="The resource ID of the non-human identity to add.")], + add_resource_nhi_request: Optional[AddResourceNhiRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResourceNHI: + """add_resource_nhi + + Gives a non-human identity access to this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param non_human_identity_id: The resource ID of the non-human identity to add. (required) + :type non_human_identity_id: str + :param add_resource_nhi_request: + :type add_resource_nhi_request: AddResourceNhiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_resource_nhi_serialize( + resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + add_resource_nhi_request=add_resource_nhi_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceNHI", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_resource_nhi_with_http_info( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[StrictStr, Field(description="The resource ID of the non-human identity to add.")], + add_resource_nhi_request: Optional[AddResourceNhiRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResourceNHI]: + """add_resource_nhi + + Gives a non-human identity access to this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param non_human_identity_id: The resource ID of the non-human identity to add. (required) + :type non_human_identity_id: str + :param add_resource_nhi_request: + :type add_resource_nhi_request: AddResourceNhiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_resource_nhi_serialize( + resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + add_resource_nhi_request=add_resource_nhi_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceNHI", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_resource_nhi_without_preload_content( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[StrictStr, Field(description="The resource ID of the non-human identity to add.")], + add_resource_nhi_request: Optional[AddResourceNhiRequest] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """add_resource_nhi + + Gives a non-human identity access to this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param non_human_identity_id: The resource ID of the non-human identity to add. (required) + :type non_human_identity_id: str + :param add_resource_nhi_request: + :type add_resource_nhi_request: AddResourceNhiRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_resource_nhi_serialize( + resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + add_resource_nhi_request=add_resource_nhi_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResourceNHI", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_resource_nhi_serialize( + self, + resource_id, + non_human_identity_id, + add_resource_nhi_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + if non_human_identity_id is not None: + _path_params['non_human_identity_id'] = non_human_identity_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_resource_nhi_request is not None: + _body_params = add_resource_nhi_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/resources/{resource_id}/non-human-identities/{non_human_identity_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def add_resource_user( self, @@ -322,7 +629,9 @@ def _add_resource_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -347,11 +656,12 @@ def _add_resource_user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -605,7 +915,9 @@ def _create_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -618,11 +930,12 @@ def _create_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -644,8 +957,548 @@ def _create_resource_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/resources', + method='POST', + resource_path='/resources', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_resource( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_resource + + Deletes a resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_resource_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_resource_with_http_info( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_resource + + Deletes a resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_resource_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_resource_without_preload_content( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_resource + + Deletes a resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_resource_serialize( + resource_id=resource_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_resource_serialize( + self, + resource_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/resources/{resource_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_resource_nhi( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[StrictStr, Field(description="The resource ID of the non-human identity to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_resource_nhi + + Removes a non-human identity's direct access from this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) + :type non_human_identity_id: str + :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_resource_nhi_serialize( + resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + access_level_remote_id=access_level_remote_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_resource_nhi_with_http_info( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[StrictStr, Field(description="The resource ID of the non-human identity to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_resource_nhi + + Removes a non-human identity's direct access from this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) + :type non_human_identity_id: str + :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_resource_nhi_serialize( + resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + access_level_remote_id=access_level_remote_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_resource_nhi_without_preload_content( + self, + resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + non_human_identity_id: Annotated[StrictStr, Field(description="The resource ID of the non-human identity to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_resource_nhi + + Removes a non-human identity's direct access from this resource. + + :param resource_id: The ID of the resource. (required) + :type resource_id: str + :param non_human_identity_id: The resource ID of the non-human identity to remove from this resource. (required) + :type non_human_identity_id: str + :param access_level_remote_id: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_resource_nhi_serialize( + resource_id=resource_id, + non_human_identity_id=non_human_identity_id, + access_level_remote_id=access_level_remote_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_resource_nhi_serialize( + self, + resource_id, + non_human_identity_id, + access_level_remote_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if resource_id is not None: + _path_params['resource_id'] = resource_id + if non_human_identity_id is not None: + _path_params['non_human_identity_id'] = non_human_identity_id + # process the query parameters + if access_level_remote_id is not None: + + _query_params.append(('access_level_remote_id', access_level_remote_id)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/resources/{resource_id}/non-human-identities/{non_human_identity_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -662,9 +1515,11 @@ def _create_resource_serialize( @validate_call - def delete_resource( + def delete_resource_user( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -678,12 +1533,16 @@ def delete_resource( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """delete_resource + """delete_resource_user - Deletes a resource. + Removes a user's direct access from this resource. :param resource_id: The ID of the resource. (required) :type resource_id: str + :param user_id: The ID of a user to remove from this resource. (required) + :type user_id: str + :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -706,8 +1565,10 @@ def delete_resource( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_serialize( + _param = self._delete_resource_user_serialize( resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -729,9 +1590,11 @@ def delete_resource( @validate_call - def delete_resource_with_http_info( + def delete_resource_user_with_http_info( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -745,12 +1608,16 @@ def delete_resource_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """delete_resource + """delete_resource_user - Deletes a resource. + Removes a user's direct access from this resource. :param resource_id: The ID of the resource. (required) :type resource_id: str + :param user_id: The ID of a user to remove from this resource. (required) + :type user_id: str + :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -773,8 +1640,10 @@ def delete_resource_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_serialize( + _param = self._delete_resource_user_serialize( resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -796,9 +1665,11 @@ def delete_resource_with_http_info( @validate_call - def delete_resource_without_preload_content( + def delete_resource_user_without_preload_content( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this resource.")], + access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -812,12 +1683,16 @@ def delete_resource_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_resource + """delete_resource_user - Deletes a resource. + Removes a user's direct access from this resource. :param resource_id: The ID of the resource. (required) :type resource_id: str + :param user_id: The ID of a user to remove from this resource. (required) + :type user_id: str + :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -840,8 +1715,10 @@ def delete_resource_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_serialize( + _param = self._delete_resource_user_serialize( resource_id=resource_id, + user_id=user_id, + access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -858,9 +1735,11 @@ def delete_resource_without_preload_content( return response_data.response - def _delete_resource_serialize( + def _delete_resource_user_serialize( self, resource_id, + user_id, + access_level_remote_id, _request_auth, _content_type, _headers, @@ -876,13 +1755,21 @@ def _delete_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id + if user_id is not None: + _path_params['user_id'] = user_id # process the query parameters + if access_level_remote_id is not None: + + _query_params.append(('access_level_remote_id', access_level_remote_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -897,7 +1784,7 @@ def _delete_resource_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/resources/{resource_id}', + resource_path='/resources/{resource_id}/users/{user_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -914,11 +1801,9 @@ def _delete_resource_serialize( @validate_call - def delete_resource_user( + def get_resource( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], - user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -931,17 +1816,13 @@ def delete_resource_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_resource_user + ) -> Resource: + """get_resource - Removes a user's direct access from this resource. + Retrieves a resource. :param resource_id: The ID of the resource. (required) :type resource_id: str - :param user_id: The ID of a user to remove from this resource. (required) - :type user_id: str - :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -964,10 +1845,8 @@ def delete_resource_user( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_user_serialize( + _param = self._get_resource_serialize( resource_id=resource_id, - user_id=user_id, - access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -975,7 +1854,7 @@ def delete_resource_user( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Resource", } response_data = self.api_client.call_api( *_param, @@ -989,11 +1868,9 @@ def delete_resource_user( @validate_call - def delete_resource_user_with_http_info( + def get_resource_with_http_info( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], - user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1006,17 +1883,13 @@ def delete_resource_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_resource_user + ) -> ApiResponse[Resource]: + """get_resource - Removes a user's direct access from this resource. + Retrieves a resource. :param resource_id: The ID of the resource. (required) :type resource_id: str - :param user_id: The ID of a user to remove from this resource. (required) - :type user_id: str - :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1039,10 +1912,8 @@ def delete_resource_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_user_serialize( + _param = self._get_resource_serialize( resource_id=resource_id, - user_id=user_id, - access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1050,7 +1921,7 @@ def delete_resource_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Resource", } response_data = self.api_client.call_api( *_param, @@ -1064,11 +1935,9 @@ def delete_resource_user_with_http_info( @validate_call - def delete_resource_user_without_preload_content( + def get_resource_without_preload_content( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], - user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this resource.")], - access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1082,16 +1951,12 @@ def delete_resource_user_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_resource_user + """get_resource - Removes a user's direct access from this resource. + Retrieves a resource. :param resource_id: The ID of the resource. (required) :type resource_id: str - :param user_id: The ID of a user to remove from this resource. (required) - :type user_id: str - :param access_level_remote_id: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - :type access_level_remote_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1114,10 +1979,8 @@ def delete_resource_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_resource_user_serialize( + _param = self._get_resource_serialize( resource_id=resource_id, - user_id=user_id, - access_level_remote_id=access_level_remote_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1125,7 +1988,7 @@ def delete_resource_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Resource", } response_data = self.api_client.call_api( *_param, @@ -1134,11 +1997,9 @@ def delete_resource_user_without_preload_content( return response_data.response - def _delete_resource_user_serialize( + def _get_resource_serialize( self, resource_id, - user_id, - access_level_remote_id, _request_auth, _content_type, _headers, @@ -1154,24 +2015,27 @@ def _delete_resource_user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id - if user_id is not None: - _path_params['user_id'] = user_id # process the query parameters - if access_level_remote_id is not None: - - _query_params.append(('access_level_remote_id', access_level_remote_id)) - # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1180,8 +2044,8 @@ def _delete_resource_user_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/resources/{resource_id}/users/{user_id}', + method='GET', + resource_path='/resources/{resource_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1198,7 +2062,7 @@ def _delete_resource_user_serialize( @validate_call - def get_resource( + def get_resource_message_channels( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -1213,10 +2077,10 @@ def get_resource( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Resource: - """get_resource + ) -> MessageChannelList: + """get_resource_message_channels - Retrieves a resource. + Gets the list of audit message channels attached to a resource. :param resource_id: The ID of the resource. (required) :type resource_id: str @@ -1242,7 +2106,7 @@ def get_resource( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_serialize( + _param = self._get_resource_message_channels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1251,7 +2115,7 @@ def get_resource( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Resource", + '200': "MessageChannelList", } response_data = self.api_client.call_api( *_param, @@ -1265,7 +2129,7 @@ def get_resource( @validate_call - def get_resource_with_http_info( + def get_resource_message_channels_with_http_info( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -1280,10 +2144,10 @@ def get_resource_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Resource]: - """get_resource + ) -> ApiResponse[MessageChannelList]: + """get_resource_message_channels - Retrieves a resource. + Gets the list of audit message channels attached to a resource. :param resource_id: The ID of the resource. (required) :type resource_id: str @@ -1309,7 +2173,7 @@ def get_resource_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_serialize( + _param = self._get_resource_message_channels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1318,7 +2182,7 @@ def get_resource_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Resource", + '200': "MessageChannelList", } response_data = self.api_client.call_api( *_param, @@ -1332,7 +2196,7 @@ def get_resource_with_http_info( @validate_call - def get_resource_without_preload_content( + def get_resource_message_channels_without_preload_content( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], _request_timeout: Union[ @@ -1348,9 +2212,9 @@ def get_resource_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource + """get_resource_message_channels - Retrieves a resource. + Gets the list of audit message channels attached to a resource. :param resource_id: The ID of the resource. (required) :type resource_id: str @@ -1376,7 +2240,7 @@ def get_resource_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_serialize( + _param = self._get_resource_message_channels_serialize( resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1385,7 +2249,7 @@ def get_resource_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Resource", + '200': "MessageChannelList", } response_data = self.api_client.call_api( *_param, @@ -1394,7 +2258,7 @@ def get_resource_without_preload_content( return response_data.response - def _get_resource_serialize( + def _get_resource_message_channels_serialize( self, resource_id, _request_auth, @@ -1412,7 +2276,9 @@ def _get_resource_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1425,11 +2291,12 @@ def _get_resource_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1439,7 +2306,7 @@ def _get_resource_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}', + resource_path='/resources/{resource_id}/message-channels', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1456,9 +2323,10 @@ def _get_resource_serialize( @validate_call - def get_resource_message_channels( + def get_resource_nhis( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1471,13 +2339,15 @@ def get_resource_message_channels( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MessageChannelList: - """get_resource_message_channels + ) -> AccessList: + """get_resource_nhis - Gets the list of audit message channels attached to a resource. + Gets the list of non-human identities with access to this resource. :param resource_id: The ID of the resource. (required) :type resource_id: str + :param limit: Limit the number of results returned. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1500,8 +2370,9 @@ def get_resource_message_channels( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_message_channels_serialize( + _param = self._get_resource_nhis_serialize( resource_id=resource_id, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1509,7 +2380,7 @@ def get_resource_message_channels( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MessageChannelList", + '200': "AccessList", } response_data = self.api_client.call_api( *_param, @@ -1523,9 +2394,10 @@ def get_resource_message_channels( @validate_call - def get_resource_message_channels_with_http_info( + def get_resource_nhis_with_http_info( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1538,13 +2410,15 @@ def get_resource_message_channels_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MessageChannelList]: - """get_resource_message_channels + ) -> ApiResponse[AccessList]: + """get_resource_nhis - Gets the list of audit message channels attached to a resource. + Gets the list of non-human identities with access to this resource. :param resource_id: The ID of the resource. (required) :type resource_id: str + :param limit: Limit the number of results returned. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1567,8 +2441,9 @@ def get_resource_message_channels_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_message_channels_serialize( + _param = self._get_resource_nhis_serialize( resource_id=resource_id, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1576,7 +2451,7 @@ def get_resource_message_channels_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MessageChannelList", + '200': "AccessList", } response_data = self.api_client.call_api( *_param, @@ -1590,9 +2465,10 @@ def get_resource_message_channels_with_http_info( @validate_call - def get_resource_message_channels_without_preload_content( + def get_resource_nhis_without_preload_content( self, resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")], + limit: Annotated[Optional[StrictInt], Field(description="Limit the number of results returned.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1606,12 +2482,14 @@ def get_resource_message_channels_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_resource_message_channels + """get_resource_nhis - Gets the list of audit message channels attached to a resource. + Gets the list of non-human identities with access to this resource. :param resource_id: The ID of the resource. (required) :type resource_id: str + :param limit: Limit the number of results returned. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1634,8 +2512,9 @@ def get_resource_message_channels_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_resource_message_channels_serialize( + _param = self._get_resource_nhis_serialize( resource_id=resource_id, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1643,7 +2522,7 @@ def get_resource_message_channels_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MessageChannelList", + '200': "AccessList", } response_data = self.api_client.call_api( *_param, @@ -1652,9 +2531,10 @@ def get_resource_message_channels_without_preload_content( return response_data.response - def _get_resource_message_channels_serialize( + def _get_resource_nhis_serialize( self, resource_id, + limit, _request_auth, _content_type, _headers, @@ -1670,24 +2550,31 @@ def _get_resource_message_channels_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters if resource_id is not None: _path_params['resource_id'] = resource_id # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + # process the header parameters # process the form parameters # process the body parameter # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1697,7 +2584,7 @@ def _get_resource_message_channels_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/resources/{resource_id}/message-channels', + resource_path='/resources/{resource_id}/non-human-identities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1928,7 +2815,9 @@ def _get_resource_reviewer_stages_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1941,11 +2830,12 @@ def _get_resource_reviewer_stages_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2186,7 +3076,9 @@ def _get_resource_reviewers_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2199,11 +3091,12 @@ def _get_resource_reviewers_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2444,7 +3337,9 @@ def _get_resource_tags_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2457,11 +3352,12 @@ def _get_resource_tags_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2715,7 +3611,9 @@ def _get_resource_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2732,11 +3630,12 @@ def _get_resource_users_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -2977,7 +3876,9 @@ def _get_resource_visibility_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2990,11 +3891,12 @@ def _get_resource_visibility_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3301,7 +4203,9 @@ def _get_resources_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3336,11 +4240,12 @@ def _get_resources_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3633,7 +4538,9 @@ def _resource_user_access_status_retrieve_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3660,11 +4567,12 @@ def _resource_user_access_status_retrieve_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -3918,7 +4826,9 @@ def _set_resource_message_channels_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3933,11 +4843,12 @@ def _set_resource_message_channels_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -4204,7 +5115,9 @@ def _set_resource_reviewer_stages_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4219,11 +5132,12 @@ def _set_resource_reviewer_stages_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -4490,7 +5404,9 @@ def _set_resource_reviewers_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4505,11 +5421,12 @@ def _set_resource_reviewers_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -4776,7 +5693,9 @@ def _set_resource_visibility_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4791,11 +5710,12 @@ def _set_resource_visibility_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -5049,7 +5969,9 @@ def _update_resources_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5062,11 +5984,12 @@ def _update_resources_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/opal/api/sessions_api.py b/opal/api/sessions_api.py index eede804..925b18f 100644 --- a/opal/api/sessions_api.py +++ b/opal/api/sessions_api.py @@ -268,7 +268,9 @@ def _sessions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -287,11 +289,12 @@ def _sessions_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api/tags_api.py b/opal/api/tags_api.py index 8e4ee76..57e8e1c 100644 --- a/opal/api/tags_api.py +++ b/opal/api/tags_api.py @@ -270,7 +270,9 @@ def _add_group_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -537,7 +539,9 @@ def _add_resource_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -804,7 +808,9 @@ def _add_user_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1097,7 +1103,9 @@ def _create_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1122,11 +1130,12 @@ def _create_tag_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1165,6 +1174,260 @@ def _create_tag_serialize( + @validate_call + def delete_tag_by_id( + self, + tag_id: Annotated[StrictStr, Field(description="The tag ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """delete_tag_by_id + + UNSTABLE. May be removed at any time. Deletes a tag with the given id. + + :param tag_id: The tag ID (required) + :type tag_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_tag_by_id_serialize( + tag_id=tag_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_tag_by_id_with_http_info( + self, + tag_id: Annotated[StrictStr, Field(description="The tag ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """delete_tag_by_id + + UNSTABLE. May be removed at any time. Deletes a tag with the given id. + + :param tag_id: The tag ID (required) + :type tag_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_tag_by_id_serialize( + tag_id=tag_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_tag_by_id_without_preload_content( + self, + tag_id: Annotated[StrictStr, Field(description="The tag ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_tag_by_id + + UNSTABLE. May be removed at any time. Deletes a tag with the given id. + + :param tag_id: The tag ID (required) + :type tag_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_tag_by_id_serialize( + tag_id=tag_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_tag_by_id_serialize( + self, + tag_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if tag_id is not None: + _path_params['tag_id'] = tag_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/tag/{tag_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_tag( self, @@ -1393,7 +1656,9 @@ def _get_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1412,11 +1677,273 @@ def _get_tag_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/tag', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_tag_by_id( + self, + tag_id: Annotated[StrictStr, Field(description="The tag ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Tag: + """get_tag_by_id + + UNSTABLE. May be removed at any time. Gets a tag with the given id. + + :param tag_id: The tag ID (required) + :type tag_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_tag_by_id_serialize( + tag_id=tag_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Tag", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_tag_by_id_with_http_info( + self, + tag_id: Annotated[StrictStr, Field(description="The tag ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Tag]: + """get_tag_by_id + + UNSTABLE. May be removed at any time. Gets a tag with the given id. + + :param tag_id: The tag ID (required) + :type tag_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_tag_by_id_serialize( + tag_id=tag_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Tag", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_tag_by_id_without_preload_content( + self, + tag_id: Annotated[StrictStr, Field(description="The tag ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_tag_by_id + + UNSTABLE. May be removed at any time. Gets a tag with the given id. + + :param tag_id: The tag ID (required) + :type tag_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_tag_by_id_serialize( + tag_id=tag_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Tag", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_tag_by_id_serialize( + self, + tag_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if tag_id is not None: + _path_params['tag_id'] = tag_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1426,7 +1953,7 @@ def _get_tag_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/tag', + resource_path='/tag/{tag_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1670,7 +2197,9 @@ def _get_tags_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1689,11 +2218,12 @@ def _get_tags_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1947,7 +2477,9 @@ def _remove_group_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2214,7 +2746,9 @@ def _remove_resource_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2481,7 +3015,9 @@ def _remove_user_tag_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/opal/api/uars_api.py b/opal/api/uars_api.py index 77331fc..c862308 100644 --- a/opal/api/uars_api.py +++ b/opal/api/uars_api.py @@ -257,7 +257,9 @@ def _create_uar_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,11 +272,12 @@ def _create_uar_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -528,7 +531,9 @@ def _get_uar_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -541,11 +546,12 @@ def _get_uar_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -799,7 +805,9 @@ def _get_uars_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -818,11 +826,12 @@ def _get_uars_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api/users_api.py b/opal/api/users_api.py index 99c0fa1..1f5584f 100644 --- a/opal/api/users_api.py +++ b/opal/api/users_api.py @@ -257,7 +257,9 @@ def _get_user_tags_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -270,11 +272,12 @@ def _get_user_tags_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -528,7 +531,9 @@ def _get_users_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -547,11 +552,12 @@ def _get_users_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -805,7 +811,9 @@ def _user_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -824,11 +832,12 @@ def _user_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/opal/api_client.py b/opal/api_client.py index 087fdc3..6ff3a7d 100644 --- a/opal/api_client.py +++ b/opal/api_client.py @@ -16,6 +16,7 @@ import datetime from dateutil.parser import parse from enum import Enum +import decimal import json import mimetypes import os @@ -23,7 +24,8 @@ import tempfile from urllib.parse import quote -from typing import Tuple, Optional, List, Dict +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr from opal.configuration import Configuration from opal.api_response import ApiResponse, T as ApiResponseT @@ -66,6 +68,7 @@ class ApiClient: 'bool': bool, 'date': datetime.date, 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, 'object': object, } _pool = None @@ -208,7 +211,8 @@ def param_serialize( post_params, collection_formats ) - post_params.extend(self.files_parameters(files)) + if files: + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( @@ -226,7 +230,7 @@ def param_serialize( body = self.sanitize_for_serialization(body) # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead @@ -313,7 +317,7 @@ def response_deserialize( match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + return_data = self.deserialize(response_text, response_type, content_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -333,9 +337,11 @@ def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict. @@ -345,6 +351,10 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): @@ -357,6 +367,8 @@ def sanitize_for_serialization(self, obj): ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) elif isinstance(obj, dict): obj_dict = obj @@ -366,28 +378,45 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = obj.to_dict() + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ return { key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() } - def deserialize(self, response_text, response_type): + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) return self.__deserialize(data, response_type) @@ -431,6 +460,8 @@ def __deserialize(self, data, klass): return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) + elif klass == decimal.Decimal: + return decimal.Decimal(data) elif issubclass(klass, Enum): return self.__deserialize_enum(data, klass) else: @@ -505,31 +536,39 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files=None): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: diff --git a/opal/configuration.py b/opal/configuration.py index bb0b15d..5f83a89 100644 --- a/opal/configuration.py +++ b/opal/configuration.py @@ -33,6 +33,9 @@ class Configuration: """This class contains various settings of the API client. :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. @@ -55,6 +58,7 @@ class Configuration: values before. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. + :param retries: Number of retries for API requests. :Example: """ @@ -67,7 +71,11 @@ def __init__(self, host=None, access_token=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, + ignore_operation_servers=False, ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None ) -> None: """Constructor """ @@ -82,6 +90,9 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ @@ -125,7 +136,10 @@ def __init__(self, host=None, self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ @@ -168,7 +182,7 @@ def __init__(self, host=None, self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = None + self.retries = retries """Adding retries to override urllib3 default value 3 """ # Enable client side validation diff --git a/opal/models/__init__.py b/opal/models/__init__.py index ebf3067..83a71c3 100644 --- a/opal/models/__init__.py +++ b/opal/models/__init__.py @@ -15,8 +15,11 @@ # import models into model package +from opal.models.access import Access +from opal.models.access_list import AccessList from opal.models.add_group_resource_request import AddGroupResourceRequest from opal.models.add_group_user_request import AddGroupUserRequest +from opal.models.add_resource_nhi_request import AddResourceNhiRequest from opal.models.add_resource_user_request import AddResourceUserRequest from opal.models.app import App from opal.models.app_type_enum import AppTypeEnum @@ -32,7 +35,13 @@ from opal.models.create_message_channel_info import CreateMessageChannelInfo from opal.models.create_on_call_schedule_info import CreateOnCallScheduleInfo from opal.models.create_owner_info import CreateOwnerInfo +from opal.models.create_request200_response import CreateRequest200Response from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal.models.create_request_info import CreateRequestInfo +from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket from opal.models.create_resource_info import CreateResourceInfo from opal.models.create_tag_info import CreateTagInfo from opal.models.create_uar_info import CreateUARInfo @@ -57,6 +66,8 @@ from opal.models.group_type_enum import GroupTypeEnum from opal.models.group_user import GroupUser from opal.models.group_user_list import GroupUserList +from opal.models.idp_group_mapping import IdpGroupMapping +from opal.models.idp_group_mapping_list import IdpGroupMappingList from opal.models.message_channel import MessageChannel from opal.models.message_channel_id_list import MessageChannelIDList from opal.models.message_channel_list import MessageChannelList @@ -87,6 +98,7 @@ from opal.models.resource_access_level import ResourceAccessLevel from opal.models.resource_access_user import ResourceAccessUser from opal.models.resource_access_user_list import ResourceAccessUserList +from opal.models.resource_nhi import ResourceNHI from opal.models.resource_remote_info import ResourceRemoteInfo from opal.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance @@ -102,6 +114,7 @@ from opal.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster from opal.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization from opal.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject @@ -121,12 +134,15 @@ from opal.models.reviewer_id_list import ReviewerIDList from opal.models.reviewer_stage import ReviewerStage from opal.models.reviewer_stage_list import ReviewerStageList +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum from opal.models.session import Session from opal.models.sessions_list import SessionsList from opal.models.sub_event import SubEvent from opal.models.tag import Tag from opal.models.tag_filter import TagFilter from opal.models.tags_list import TagsList +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal.models.ticketing_provider_enum import TicketingProviderEnum from opal.models.uar import UAR from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum from opal.models.uar_scope import UARScope @@ -136,6 +152,8 @@ from opal.models.update_group_info import UpdateGroupInfo from opal.models.update_group_info_list import UpdateGroupInfoList from opal.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner from opal.models.update_owner_info import UpdateOwnerInfo from opal.models.update_owner_info_list import UpdateOwnerInfoList from opal.models.update_resource_info import UpdateResourceInfo diff --git a/opal/models/access.py b/opal/models/access.py new file mode 100644 index 0000000..7de0004 --- /dev/null +++ b/opal/models/access.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal.models.entity_type_enum import EntityTypeEnum +from opal.models.resource_access_level import ResourceAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class Access(BaseModel): + """ + # Access Object ### Description The `Access` object is used to represent a principal's access to an entity, either directly or inherited. ### Usage Example Fetch from the `LIST ResourceNonHumanIdentities` endpoint. + """ # noqa: E501 + principal_id: StrictStr = Field(description="The ID of the principal with access.") + principal_type: EntityTypeEnum + entity_id: StrictStr = Field(description="The ID of the entity being accessed.") + entity_type: EntityTypeEnum + access_level: Optional[ResourceAccessLevel] = None + expiration_date: datetime = Field(description="The day and time the principal's access will expire.") + has_direct_access: StrictBool = Field(description="The principal has direct access to this entity (vs. inherited access).") + num_access_paths: StrictInt = Field(description="The number of ways in which the principal has access to this entity (directly and inherited).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["principal_id", "principal_type", "entity_id", "entity_type", "access_level", "expiration_date", "has_direct_access", "num_access_paths"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Access from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of access_level + if self.access_level: + _dict['access_level'] = self.access_level.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Access from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "entity_id": obj.get("entity_id"), + "entity_type": obj.get("entity_type"), + "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None, + "expiration_date": obj.get("expiration_date"), + "has_direct_access": obj.get("has_direct_access"), + "num_access_paths": obj.get("num_access_paths") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/access_list.py b/opal/models/access_list.py new file mode 100644 index 0000000..eaca29c --- /dev/null +++ b/opal/models/access_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from opal.models.access import Access +from typing import Optional, Set +from typing_extensions import Self + +class AccessList(BaseModel): + """ + AccessList + """ # noqa: E501 + results: Optional[List[Access]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["results"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccessList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in results (list) + _items = [] + if self.results: + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) + _dict['results'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccessList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [Access.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/add_group_resource_request.py b/opal/models/add_group_resource_request.py index 74b59d3..d865bb4 100644 --- a/opal/models/add_group_resource_request.py +++ b/opal/models/add_group_resource_request.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -28,8 +29,9 @@ class AddGroupResourceRequest(BaseModel): AddGroupResourceRequest """ # noqa: E501 access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.") + duration_minutes: Optional[Annotated[int, Field(le=525960, strict=True, ge=0)]] = Field(default=None, description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["access_level_remote_id"] + __properties: ClassVar[List[str]] = ["access_level_remote_id", "duration_minutes"] model_config = ConfigDict( populate_by_name=True, @@ -89,7 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "access_level_remote_id": obj.get("access_level_remote_id") + "access_level_remote_id": obj.get("access_level_remote_id"), + "duration_minutes": obj.get("duration_minutes") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/add_resource_nhi_request.py b/opal/models/add_resource_nhi_request.py new file mode 100644 index 0000000..5e6fcc1 --- /dev/null +++ b/opal/models/add_resource_nhi_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AddResourceNhiRequest(BaseModel): + """ + AddResourceNhiRequest + """ # noqa: E501 + duration_minutes: Annotated[int, Field(le=525960, strict=True)] = Field(description="The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.") + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["duration_minutes", "access_level_remote_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddResourceNhiRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddResourceNhiRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "duration_minutes": obj.get("duration_minutes"), + "access_level_remote_id": obj.get("access_level_remote_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/apps_list.py b/opal/models/apps_list.py index 61b448f..f9a9e6f 100644 --- a/opal/models/apps_list.py +++ b/opal/models/apps_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in apps (list) _items = [] if self.apps: - for _item in self.apps: - if _item: - _items.append(_item.to_dict()) + for _item_apps in self.apps: + if _item_apps: + _items.append(_item_apps.to_dict()) _dict['apps'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/configuration_template.py b/opal/models/configuration_template.py index f867248..f8197ce 100644 --- a/opal/models/configuration_template.py +++ b/opal/models/configuration_template.py @@ -20,6 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration from opal.models.visibility_info import VisibilityInfo from typing import Optional, Set from typing_extensions import Self @@ -31,15 +33,17 @@ class ConfigurationTemplate(BaseModel): configuration_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the configuration template.") name: Optional[StrictStr] = Field(default=None, description="The name of the configuration template.") admin_owner_id: Optional[StrictStr] = Field(default=None, description="The ID of the owner of the configuration template.") - visibility: Optional[VisibilityInfo] = None + visibility: Optional[VisibilityInfo] = Field(default=None, description="The visibility info of the configuration template.") linked_audit_message_channel_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the audit message channels linked to the configuration template.") request_configuration_id: Optional[StrictStr] = Field(default=None, description="The ID of the request configuration linked to the configuration template.") member_oncall_schedule_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the on-call schedules linked to the configuration template.") break_glass_user_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the break glass users linked to the configuration template.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.") require_mfa_to_connect: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA to connect to resources associated with this configuration template.") + ticket_propagation: Optional[TicketPropagationConfiguration] = None + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval for this configuration template.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configuration_id", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect"] + __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configuration_id", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "ticket_propagation", "custom_request_notification"] model_config = ConfigDict( populate_by_name=True, @@ -85,6 +89,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of visibility if self.visibility: _dict['visibility'] = self.visibility.to_dict() + # override the default output from pydantic by calling `to_dict()` of ticket_propagation + if self.ticket_propagation: + _dict['ticket_propagation'] = self.ticket_propagation.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -111,7 +118,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "member_oncall_schedule_ids": obj.get("member_oncall_schedule_ids"), "break_glass_user_ids": obj.get("break_glass_user_ids"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), - "require_mfa_to_connect": obj.get("require_mfa_to_connect") + "require_mfa_to_connect": obj.get("require_mfa_to_connect"), + "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, + "custom_request_notification": obj.get("custom_request_notification") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/create_configuration_template_info.py b/opal/models/create_configuration_template_info.py index 35a9979..70d7742 100644 --- a/opal/models/create_configuration_template_info.py +++ b/opal/models/create_configuration_template_info.py @@ -20,8 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList from opal.models.request_configuration import RequestConfiguration +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration from opal.models.visibility_info import VisibilityInfo from typing import Optional, Set from typing_extensions import Self @@ -31,7 +33,7 @@ class CreateConfigurationTemplateInfo(BaseModel): # CreateConfigurationTemplateInfo Object ### Description The `CreateConfigurationTemplateInfo` object is used to store creation info for a configuration template. ### Usage Example Use in the `POST Configuration Templates` endpoint. """ # noqa: E501 admin_owner_id: StrictStr = Field(description="The ID of the owner of the configuration template.") - visibility: VisibilityInfo + visibility: VisibilityInfo = Field(description="The visibility info of the configuration template.") linked_audit_message_channel_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the audit message channels linked to the configuration template.") member_oncall_schedule_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the on-call schedules linked to the configuration template.") break_glass_user_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the break glass users linked to the configuration template.") @@ -39,9 +41,11 @@ class CreateConfigurationTemplateInfo(BaseModel): require_mfa_to_connect: StrictBool = Field(description="A bool representing whether or not to require MFA to connect to resources associated with this configuration template.") name: StrictStr = Field(description="The name of the configuration template.") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used.") - request_configuration_list: Optional[CreateRequestConfigurationInfoList] = None + request_configuration_list: Optional[CreateRequestConfigurationInfoList] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`.") + ticket_propagation: Optional[TicketPropagationConfiguration] = None + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval for this configuration template.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["admin_owner_id", "visibility", "linked_audit_message_channel_ids", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "name", "request_configurations", "request_configuration_list"] + __properties: ClassVar[List[str]] = ["admin_owner_id", "visibility", "linked_audit_message_channel_ids", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "name", "request_configurations", "request_configuration_list", "ticket_propagation", "custom_request_notification"] model_config = ConfigDict( populate_by_name=True, @@ -90,13 +94,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in request_configurations (list) _items = [] if self.request_configurations: - for _item in self.request_configurations: - if _item: - _items.append(_item.to_dict()) + for _item_request_configurations in self.request_configurations: + if _item_request_configurations: + _items.append(_item_request_configurations.to_dict()) _dict['request_configurations'] = _items # override the default output from pydantic by calling `to_dict()` of request_configuration_list if self.request_configuration_list: _dict['request_configuration_list'] = self.request_configuration_list.to_dict() + # override the default output from pydantic by calling `to_dict()` of ticket_propagation + if self.ticket_propagation: + _dict['ticket_propagation'] = self.ticket_propagation.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -123,7 +130,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "require_mfa_to_connect": obj.get("require_mfa_to_connect"), "name": obj.get("name"), "request_configurations": [RequestConfiguration.from_dict(_item) for _item in obj["request_configurations"]] if obj.get("request_configurations") is not None else None, - "request_configuration_list": CreateRequestConfigurationInfoList.from_dict(obj["request_configuration_list"]) if obj.get("request_configuration_list") is not None else None + "request_configuration_list": CreateRequestConfigurationInfoList.from_dict(obj["request_configuration_list"]) if obj.get("request_configuration_list") is not None else None, + "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, + "custom_request_notification": obj.get("custom_request_notification") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/create_group_binding_info.py b/opal/models/create_group_binding_info.py index 36f210f..9a35d82 100644 --- a/opal/models/create_group_binding_info.py +++ b/opal/models/create_group_binding_info.py @@ -77,9 +77,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in groups (list) _items = [] if self.groups: - for _item in self.groups: - if _item: - _items.append(_item.to_dict()) + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) _dict['groups'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/create_group_info.py b/opal/models/create_group_info.py index 100d8e0..f995e43 100644 --- a/opal/models/create_group_info.py +++ b/opal/models/create_group_info.py @@ -20,8 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.group_remote_info import GroupRemoteInfo from opal.models.group_type_enum import GroupTypeEnum +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self @@ -36,8 +38,10 @@ class CreateGroupInfo(BaseModel): remote_info: Optional[GroupRemoteInfo] = None remote_group_id: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. The ID of the group on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field.") metadata: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. JSON metadata about the remote group. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on group_type and should have the following schema: ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Group Metadata\", \"properties\": { \"ad_group\": { \"properties\": { \"object_guid\": { \"type\": \"string\" } }, \"required\": [\"object_guid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Active Directory Group\" }, \"duo_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Duo Group\" }, \"git_hub_team\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"team_slug\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"team_slug\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Team\" }, \"google_groups_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Google Groups Group\" }, \"ldap_group\": { \"properties\": { \"group_uid\": { \"type\": \"string\" } }, \"required\": [\"group_uid\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"LDAP Group\" }, \"okta_directory_group\": { \"properties\": { \"group_id\": { \"type\": \"string\" } }, \"required\": [\"group_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Group\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ```") + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + risk_sensitivity_override: Optional[RiskSensitivityEnum] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["name", "description", "group_type", "app_id", "remote_info", "remote_group_id", "metadata"] + __properties: ClassVar[List[str]] = ["name", "description", "group_type", "app_id", "remote_info", "remote_group_id", "metadata", "custom_request_notification", "risk_sensitivity_override"] model_config = ConfigDict( populate_by_name=True, @@ -106,7 +110,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "app_id": obj.get("app_id"), "remote_info": GroupRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") is not None else None, "remote_group_id": obj.get("remote_group_id"), - "metadata": obj.get("metadata") + "metadata": obj.get("metadata"), + "custom_request_notification": obj.get("custom_request_notification"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/create_request200_response.py b/opal/models/create_request200_response.py new file mode 100644 index 0000000..a3e6316 --- /dev/null +++ b/opal/models/create_request200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequest200Response(BaseModel): + """ + CreateRequest200Response + """ # noqa: E501 + id: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequest200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequest200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/create_request_configuration_info_list.py b/opal/models/create_request_configuration_info_list.py index 3cc52c8..56dc3a9 100644 --- a/opal/models/create_request_configuration_info_list.py +++ b/opal/models/create_request_configuration_info_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in request_configurations (list) _items = [] if self.request_configurations: - for _item in self.request_configurations: - if _item: - _items.append(_item.to_dict()) + for _item_request_configurations in self.request_configurations: + if _item_request_configurations: + _items.append(_item_request_configurations.to_dict()) _dict['request_configurations'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/create_request_info.py b/opal/models/create_request_info.py new file mode 100644 index 0000000..d280e0b --- /dev/null +++ b/opal/models/create_request_info.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequestInfo(BaseModel): + """ + All the information needed for creating a request + """ # noqa: E501 + resources: List[CreateRequestInfoResourcesInner] + groups: List[CreateRequestInfoGroupsInner] + target_user_id: Optional[StrictStr] = Field(default=None, description="The ID of the user to be granted access. Should not be specified if target_group_id is specified.") + target_group_id: Optional[StrictStr] = Field(default=None, description="The ID of the group the request is for. Should not be specified if target_user_id is specified.") + reason: StrictStr + support_ticket: Optional[CreateRequestInfoSupportTicket] = None + duration_minutes: Annotated[int, Field(strict=True, ge=-1)] = Field(description="The duration of the request in minutes. -1 represents an indefinite duration") + custom_metadata: Optional[List[CreateRequestInfoCustomMetadataInner]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resources", "groups", "target_user_id", "target_group_id", "reason", "support_ticket", "duration_minutes", "custom_metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequestInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in resources (list) + _items = [] + if self.resources: + for _item_resources in self.resources: + if _item_resources: + _items.append(_item_resources.to_dict()) + _dict['resources'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in groups (list) + _items = [] + if self.groups: + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items + # override the default output from pydantic by calling `to_dict()` of support_ticket + if self.support_ticket: + _dict['support_ticket'] = self.support_ticket.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in custom_metadata (list) + _items = [] + if self.custom_metadata: + for _item_custom_metadata in self.custom_metadata: + if _item_custom_metadata: + _items.append(_item_custom_metadata.to_dict()) + _dict['custom_metadata'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequestInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resources": [CreateRequestInfoResourcesInner.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None, + "groups": [CreateRequestInfoGroupsInner.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None, + "target_user_id": obj.get("target_user_id"), + "target_group_id": obj.get("target_group_id"), + "reason": obj.get("reason"), + "support_ticket": CreateRequestInfoSupportTicket.from_dict(obj["support_ticket"]) if obj.get("support_ticket") is not None else None, + "duration_minutes": obj.get("duration_minutes"), + "custom_metadata": [CreateRequestInfoCustomMetadataInner.from_dict(_item) for _item in obj["custom_metadata"]] if obj.get("custom_metadata") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/create_request_info_custom_metadata_inner.py b/opal/models/create_request_info_custom_metadata_inner.py new file mode 100644 index 0000000..0017511 --- /dev/null +++ b/opal/models/create_request_info_custom_metadata_inner.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from opal.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequestInfoCustomMetadataInner(BaseModel): + """ + CreateRequestInfoCustomMetadataInner + """ # noqa: E501 + name: StrictStr + type: RequestTemplateCustomFieldTypeEnum + value: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "type", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequestInfoCustomMetadataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequestInfoCustomMetadataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type"), + "value": obj.get("value") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/create_request_info_groups_inner.py b/opal/models/create_request_info_groups_inner.py new file mode 100644 index 0000000..fc4f126 --- /dev/null +++ b/opal/models/create_request_info_groups_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequestInfoGroupsInner(BaseModel): + """ + CreateRequestInfoGroupsInner + """ # noqa: E501 + id: StrictStr = Field(description="The ID of the group requested. Should not be specified if resource_id is specified.") + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The ID of the access level requested on the remote system.") + access_level_name: Optional[StrictStr] = Field(default=None, description="The ID of the access level requested on the remote system.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "access_level_remote_id", "access_level_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequestInfoGroupsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequestInfoGroupsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "access_level_remote_id": obj.get("access_level_remote_id"), + "access_level_name": obj.get("access_level_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/create_request_info_resources_inner.py b/opal/models/create_request_info_resources_inner.py new file mode 100644 index 0000000..3f7b962 --- /dev/null +++ b/opal/models/create_request_info_resources_inner.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequestInfoResourcesInner(BaseModel): + """ + CreateRequestInfoResourcesInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the resource requested. Should not be specified if group_id is specified.") + access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The ID of the access level requested on the remote system.") + access_level_name: Optional[StrictStr] = Field(default=None, description="The ID of the access level requested on the remote system.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "access_level_remote_id", "access_level_name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequestInfoResourcesInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequestInfoResourcesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "access_level_remote_id": obj.get("access_level_remote_id"), + "access_level_name": obj.get("access_level_name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/create_request_info_support_ticket.py b/opal/models/create_request_info_support_ticket.py new file mode 100644 index 0000000..9992d73 --- /dev/null +++ b/opal/models/create_request_info_support_ticket.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from opal.models.ticketing_provider_enum import TicketingProviderEnum +from typing import Optional, Set +from typing_extensions import Self + +class CreateRequestInfoSupportTicket(BaseModel): + """ + CreateRequestInfoSupportTicket + """ # noqa: E501 + ticketing_provider: TicketingProviderEnum + remote_id: StrictStr + identifier: StrictStr + url: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ticketing_provider", "remote_id", "identifier", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRequestInfoSupportTicket from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRequestInfoSupportTicket from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ticketing_provider": obj.get("ticketing_provider"), + "remote_id": obj.get("remote_id"), + "identifier": obj.get("identifier"), + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/create_resource_info.py b/opal/models/create_resource_info.py index 3aa2126..453c0d5 100644 --- a/opal/models/create_resource_info.py +++ b/opal/models/create_resource_info.py @@ -20,8 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.resource_remote_info import ResourceRemoteInfo from opal.models.resource_type_enum import ResourceTypeEnum +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self @@ -36,8 +38,10 @@ class CreateResourceInfo(BaseModel): remote_info: Optional[ResourceRemoteInfo] = None remote_resource_id: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. The ID of the resource on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field.") metadata: Optional[StrictStr] = Field(default=None, description="Deprecated - use remote_info instead. JSON metadata about the remote resource. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. The required format is dependent on resource_type and should have the following schema: ```json { \"$schema\": \"http://json-schema.org/draft-04/schema#\", \"title\": \"Resource Metadata\", \"properties\": { \"aws_ec2_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"region\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EC2 Instance\" }, \"aws_eks_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" }, \"cluster_region\": { \"type\": \"string\" }, \"cluster_arn\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\", \"cluster_region\", \"cluster_arn\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS EKS Cluster\" }, \"aws_rds_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"engine\": { \"type\": \"string\" }, \"region\": { \"type\": \"string\" }, \"resource_id\": { \"type\": \"string\" }, \"database_name\": { \"type\": \"string\" } }, \"required\": [ \"instance_id\", \"engine\", \"region\", \"resource_id\", \"database_name\" ], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS RDS Instance\" }, \"aws_role\": { \"properties\": { \"arn\": { \"type\": \"string\" }, \"name\": { \"type\": \"string\" } }, \"required\": [\"arn\", \"name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"AWS Role\" }, \"gcp_bucket\": { \"properties\": { \"bucket_id\": { \"type\": \"string\" } }, \"required\": [\"bucket_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Bucket\" }, \"gcp_compute_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" }, \"zone\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\", \"zone\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Compute Instance\" }, \"gcp_folder\": { \"properties\": { \"folder_id\": { \"type\": \"string\" } }, \"required\": [\"folder_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Folder\" }, \"gcp_gke_cluster\": { \"properties\": { \"cluster_name\": { \"type\": \"string\" } }, \"required\": [\"cluster_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP GKE Cluster\" }, \"gcp_project\": { \"properties\": { \"project_id\": { \"type\": \"string\" } }, \"required\": [\"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP Project\" }, \"gcp_sql_instance\": { \"properties\": { \"instance_id\": { \"type\": \"string\" }, \"project_id\": { \"type\": \"string\" } }, \"required\": [\"instance_id\", \"project_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GCP SQL Instance\" }, \"git_hub_repo\": { \"properties\": { \"org_name\": { \"type\": \"string\" }, \"repo_name\": { \"type\": \"string\" } }, \"required\": [\"org_name\", \"repo_name\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"GitHub Repo\" }, \"okta_directory_app\": { \"properties\": { \"app_id\": { \"type\": \"string\" }, \"logo_url\": { \"type\": \"string\" } }, \"required\": [\"app_id\", \"logo_url\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory App\" }, \"okta_directory_role\": { \"properties\": { \"role_type\": { \"type\": \"string\" }, \"role_id\": { \"type\": \"string\" } }, \"required\": [\"role_type\", \"role_id\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Okta Directory Role\" }, \"salesforce_profile\": { \"properties\": { \"user_license\": { \"type\": \"string\" } }, \"required\": [\"user_license\"], \"additionalProperties\": false, \"type\": \"object\", \"title\": \"Salesforce Profile\" } }, \"additionalProperties\": false, \"minProperties\": 1, \"maxProperties\": 1, \"type\": \"object\" } ```") + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + risk_sensitivity_override: Optional[RiskSensitivityEnum] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["name", "description", "resource_type", "app_id", "remote_info", "remote_resource_id", "metadata"] + __properties: ClassVar[List[str]] = ["name", "description", "resource_type", "app_id", "remote_info", "remote_resource_id", "metadata", "custom_request_notification", "risk_sensitivity_override"] model_config = ConfigDict( populate_by_name=True, @@ -106,7 +110,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "app_id": obj.get("app_id"), "remote_info": ResourceRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") is not None else None, "remote_resource_id": obj.get("remote_resource_id"), - "metadata": obj.get("metadata") + "metadata": obj.get("metadata"), + "custom_request_notification": obj.get("custom_request_notification"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/create_uar_info.py b/opal/models/create_uar_info.py index d2971a8..b1032a3 100644 --- a/opal/models/create_uar_info.py +++ b/opal/models/create_uar_info.py @@ -19,7 +19,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum from opal.models.uar_scope import UARScope @@ -36,9 +36,11 @@ class CreateUARInfo(BaseModel): deadline: datetime = Field(description="The last day for reviewers to complete their access reviews.") time_zone: StrictStr = Field(description="The time zone name (as defined by the IANA Time Zone database) used in the access review deadline and exported audit report. Default is America/Los_Angeles.") self_review_allowed: StrictBool = Field(description="A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False.") + reminder_schedule: Optional[List[StrictInt]] = None + reminder_include_manager: Optional[StrictBool] = None uar_scope: Optional[UARScope] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["name", "reviewer_assignment_policy", "send_reviewer_assignment_notification", "deadline", "time_zone", "self_review_allowed", "uar_scope"] + __properties: ClassVar[List[str]] = ["name", "reviewer_assignment_policy", "send_reviewer_assignment_notification", "deadline", "time_zone", "self_review_allowed", "reminder_schedule", "reminder_include_manager", "uar_scope"] model_config = ConfigDict( populate_by_name=True, @@ -107,6 +109,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "deadline": obj.get("deadline"), "time_zone": obj.get("time_zone"), "self_review_allowed": obj.get("self_review_allowed"), + "reminder_schedule": obj.get("reminder_schedule"), + "reminder_include_manager": obj.get("reminder_include_manager"), "uar_scope": UARScope.from_dict(obj["uar_scope"]) if obj.get("uar_scope") is not None else None }) # store additional fields in additional_properties diff --git a/opal/models/event.py b/opal/models/event.py index ec080b9..d36aa5d 100644 --- a/opal/models/event.py +++ b/opal/models/event.py @@ -31,7 +31,7 @@ class Event(BaseModel): """ # noqa: E501 event_id: StrictStr = Field(description="The ID of the event.") actor_user_id: StrictStr = Field(description="The ID of the actor user.") - actor_name: Optional[Any] = Field(description="The name of the actor user.") + actor_name: Optional[Any] actor_email: Optional[StrictStr] = Field(default=None, description="The email of the actor user.") event_type: StrictStr = Field(description="The event type.") created_at: datetime = Field(description="The day and time the event was created.") @@ -86,9 +86,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in sub_events (list) _items = [] if self.sub_events: - for _item in self.sub_events: - if _item: - _items.append(_item.to_dict()) + for _item_sub_events in self.sub_events: + if _item_sub_events: + _items.append(_item_sub_events.to_dict()) _dict['sub_events'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/group.py b/opal/models/group.py index 2042200..76f029f 100644 --- a/opal/models/group.py +++ b/opal/models/group.py @@ -20,9 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.group_remote_info import GroupRemoteInfo from opal.models.group_type_enum import GroupTypeEnum from opal.models.request_configuration import RequestConfiguration +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self @@ -35,6 +37,7 @@ class Group(BaseModel): name: Optional[StrictStr] = Field(default=None, description="The name of the group.") description: Optional[StrictStr] = Field(default=None, description="A description of the group.") admin_owner_id: Optional[StrictStr] = Field(default=None, description="The ID of the owner of the group.") + group_leader_user_ids: Optional[List[StrictStr]] = Field(default=None, description="A list of User IDs for the group leaders of the group") remote_id: Optional[StrictStr] = Field(default=None, description="The ID of the remote.") remote_name: Optional[StrictStr] = Field(default=None, description="The name of the remote.") group_type: Optional[GroupTypeEnum] = None @@ -53,8 +56,11 @@ class Group(BaseModel): request_configuration_list: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of request configurations for this group. Deprecated in favor of `request_configurations`.") metadata: Optional[StrictStr] = Field(default=None, description="JSON metadata about the remote group. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details.") remote_info: Optional[GroupRemoteInfo] = None + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent to the requester when the request is approved.") + risk_sensitivity: Optional[RiskSensitivityEnum] = Field(default=None, description="The risk sensitivity level for the group. When an override is set, this field will match that.") + risk_sensitivity_override: Optional[RiskSensitivityEnum] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["group_id", "app_id", "name", "description", "admin_owner_id", "remote_id", "remote_name", "group_type", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "require_mfa_to_request", "auto_approval", "request_template_id", "configuration_template_id", "group_binding_id", "is_requestable", "request_configurations", "request_configuration_list", "metadata", "remote_info"] + __properties: ClassVar[List[str]] = ["group_id", "app_id", "name", "description", "admin_owner_id", "group_leader_user_ids", "remote_id", "remote_name", "group_type", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "require_mfa_to_request", "auto_approval", "request_template_id", "configuration_template_id", "group_binding_id", "is_requestable", "request_configurations", "request_configuration_list", "metadata", "remote_info", "custom_request_notification", "risk_sensitivity", "risk_sensitivity_override"] model_config = ConfigDict( populate_by_name=True, @@ -86,9 +92,11 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "risk_sensitivity", "additional_properties", ]) @@ -100,16 +108,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in request_configurations (list) _items = [] if self.request_configurations: - for _item in self.request_configurations: - if _item: - _items.append(_item.to_dict()) + for _item_request_configurations in self.request_configurations: + if _item_request_configurations: + _items.append(_item_request_configurations.to_dict()) _dict['request_configurations'] = _items # override the default output from pydantic by calling `to_dict()` of each item in request_configuration_list (list) _items = [] if self.request_configuration_list: - for _item in self.request_configuration_list: - if _item: - _items.append(_item.to_dict()) + for _item_request_configuration_list in self.request_configuration_list: + if _item_request_configuration_list: + _items.append(_item_request_configuration_list.to_dict()) _dict['request_configuration_list'] = _items # override the default output from pydantic by calling `to_dict()` of remote_info if self.remote_info: @@ -136,6 +144,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "description": obj.get("description"), "admin_owner_id": obj.get("admin_owner_id"), + "group_leader_user_ids": obj.get("group_leader_user_ids"), "remote_id": obj.get("remote_id"), "remote_name": obj.get("remote_name"), "group_type": obj.get("group_type"), @@ -153,7 +162,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "request_configurations": [RequestConfiguration.from_dict(_item) for _item in obj["request_configurations"]] if obj.get("request_configurations") is not None else None, "request_configuration_list": [RequestConfiguration.from_dict(_item) for _item in obj["request_configuration_list"]] if obj.get("request_configuration_list") is not None else None, "metadata": obj.get("metadata"), - "remote_info": GroupRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") is not None else None + "remote_info": GroupRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") is not None else None, + "custom_request_notification": obj.get("custom_request_notification"), + "risk_sensitivity": obj.get("risk_sensitivity"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/group_binding.py b/opal/models/group_binding.py index 015dfd6..9c6d78c 100644 --- a/opal/models/group_binding.py +++ b/opal/models/group_binding.py @@ -81,9 +81,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in groups (list) _items = [] if self.groups: - for _item in self.groups: - if _item: - _items.append(_item.to_dict()) + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) _dict['groups'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/group_remote_info_azure_ad_microsoft365_group.py b/opal/models/group_remote_info_azure_ad_microsoft365_group.py index ceff6be..fdc3750 100644 --- a/opal/models/group_remote_info_azure_ad_microsoft365_group.py +++ b/opal/models/group_remote_info_azure_ad_microsoft365_group.py @@ -25,9 +25,9 @@ class GroupRemoteInfoAzureAdMicrosoft365Group(BaseModel): """ - Remote info for Azure AD Microsoft 365 group. + Remote info for Microsoft Entra ID Microsoft 365 group. """ # noqa: E501 - group_id: StrictStr = Field(description="The id of the Azure AD Microsoft 365 group.") + group_id: StrictStr = Field(description="The id of the Microsoft Entra ID Microsoft 365 group.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["group_id"] diff --git a/opal/models/group_remote_info_azure_ad_security_group.py b/opal/models/group_remote_info_azure_ad_security_group.py index 2f79ca1..287b2bb 100644 --- a/opal/models/group_remote_info_azure_ad_security_group.py +++ b/opal/models/group_remote_info_azure_ad_security_group.py @@ -25,9 +25,9 @@ class GroupRemoteInfoAzureAdSecurityGroup(BaseModel): """ - Remote info for Azure AD Security group. + Remote info for Microsoft Entra ID Security group. """ # noqa: E501 - group_id: StrictStr = Field(description="The id of the Azure AD Security group.") + group_id: StrictStr = Field(description="The id of the Microsoft Entra ID Security group.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["group_id"] diff --git a/opal/models/group_resource_list.py b/opal/models/group_resource_list.py index 611ac73..ae102b0 100644 --- a/opal/models/group_resource_list.py +++ b/opal/models/group_resource_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in group_resources (list) _items = [] if self.group_resources: - for _item in self.group_resources: - if _item: - _items.append(_item.to_dict()) + for _item_group_resources in self.group_resources: + if _item_group_resources: + _items.append(_item_group_resources.to_dict()) _dict['group_resources'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/group_type_enum.py b/opal/models/group_type_enum.py index f4000c2..c62c9a8 100644 --- a/opal/models/group_type_enum.py +++ b/opal/models/group_type_enum.py @@ -33,11 +33,16 @@ class GroupTypeEnum(str, Enum): GIT_HUB_TEAM = 'GIT_HUB_TEAM' GIT_LAB_GROUP = 'GIT_LAB_GROUP' GOOGLE_GROUPS_GROUP = 'GOOGLE_GROUPS_GROUP' + GOOGLE_GROUPS_GKE_GROUP = 'GOOGLE_GROUPS_GKE_GROUP' LDAP_GROUP = 'LDAP_GROUP' OKTA_GROUP = 'OKTA_GROUP' + TAILSCALE_GROUP = 'TAILSCALE_GROUP' OPAL_GROUP = 'OPAL_GROUP' AZURE_AD_SECURITY_GROUP = 'AZURE_AD_SECURITY_GROUP' AZURE_AD_MICROSOFT_365_GROUP = 'AZURE_AD_MICROSOFT_365_GROUP' + CONNECTOR_GROUP = 'CONNECTOR_GROUP' + SNOWFLAKE_ROLE = 'SNOWFLAKE_ROLE' + WORKDAY_USER_SECURITY_GROUP = 'WORKDAY_USER_SECURITY_GROUP' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/opal/models/group_user.py b/opal/models/group_user.py index d952c85..863604c 100644 --- a/opal/models/group_user.py +++ b/opal/models/group_user.py @@ -34,7 +34,7 @@ class GroupUser(BaseModel): access_level: Optional[GroupAccessLevel] = None full_name: StrictStr = Field(description="The user's full name.") email: StrictStr = Field(description="The user's email.") - expiration_date: Optional[datetime] = Field(description="The day and time the user's access will expire.") + expiration_date: datetime = Field(description="The day and time the user's access will expire.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["group_id", "user_id", "access_level", "full_name", "email", "expiration_date"] @@ -87,11 +87,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if expiration_date (nullable) is None - # and model_fields_set contains the field - if self.expiration_date is None and "expiration_date" in self.model_fields_set: - _dict['expiration_date'] = None - return _dict @classmethod diff --git a/opal/models/group_user_list.py b/opal/models/group_user_list.py index 53f14d1..8150d21 100644 --- a/opal/models/group_user_list.py +++ b/opal/models/group_user_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/idp_group_mapping.py b/opal/models/idp_group_mapping.py new file mode 100644 index 0000000..4f581f9 --- /dev/null +++ b/opal/models/idp_group_mapping.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IdpGroupMapping(BaseModel): + """ + Information about a group mapping. + """ # noqa: E501 + id: StrictStr = Field(description="The ID of the idp group mapping.") + organization_id: StrictStr = Field(description="The ID of the organization.") + app_resource_id: StrictStr = Field(description="The ID of the idp app resource.") + group_id: StrictStr = Field(description="The ID of the group.") + alias: Optional[StrictStr] = Field(default=None, description="The alias of the group.") + hidden_from_end_user: StrictBool = Field(description="A bool representing whether or not the group is hidden from the end user.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "organization_id", "app_resource_id", "group_id", "alias", "hidden_from_end_user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdpGroupMapping from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdpGroupMapping from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_resource_id": obj.get("app_resource_id"), + "group_id": obj.get("group_id"), + "alias": obj.get("alias"), + "hidden_from_end_user": obj.get("hidden_from_end_user") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/idp_group_mapping_list.py b/opal/models/idp_group_mapping_list.py new file mode 100644 index 0000000..836580b --- /dev/null +++ b/opal/models/idp_group_mapping_list.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal.models.idp_group_mapping import IdpGroupMapping +from typing import Optional, Set +from typing_extensions import Self + +class IdpGroupMappingList(BaseModel): + """ + IdpGroupMappingList + """ # noqa: E501 + idp_group_mappings: List[IdpGroupMapping] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idp_group_mappings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IdpGroupMappingList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in idp_group_mappings (list) + _items = [] + if self.idp_group_mappings: + for _item_idp_group_mappings in self.idp_group_mappings: + if _item_idp_group_mappings: + _items.append(_item_idp_group_mappings.to_dict()) + _dict['idp_group_mappings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IdpGroupMappingList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "idp_group_mappings": [IdpGroupMapping.from_dict(_item) for _item in obj["idp_group_mappings"]] if obj.get("idp_group_mappings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/message_channel_list.py b/opal/models/message_channel_list.py index f4ddb2e..4cd4165 100644 --- a/opal/models/message_channel_list.py +++ b/opal/models/message_channel_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in channels (list) _items = [] if self.channels: - for _item in self.channels: - if _item: - _items.append(_item.to_dict()) + for _item_channels in self.channels: + if _item_channels: + _items.append(_item_channels.to_dict()) _dict['channels'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/on_call_schedule_list.py b/opal/models/on_call_schedule_list.py index d0e20de..a5bfd84 100644 --- a/opal/models/on_call_schedule_list.py +++ b/opal/models/on_call_schedule_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in on_call_schedules (list) _items = [] if self.on_call_schedules: - for _item in self.on_call_schedules: - if _item: - _items.append(_item.to_dict()) + for _item_on_call_schedules in self.on_call_schedules: + if _item_on_call_schedules: + _items.append(_item_on_call_schedules.to_dict()) _dict['on_call_schedules'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/owner.py b/opal/models/owner.py index 7b681c3..c173a52 100644 --- a/opal/models/owner.py +++ b/opal/models/owner.py @@ -82,16 +82,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if reviewer_message_channel_id (nullable) is None - # and model_fields_set contains the field - if self.reviewer_message_channel_id is None and "reviewer_message_channel_id" in self.model_fields_set: - _dict['reviewer_message_channel_id'] = None - - # set to None if source_group_id (nullable) is None - # and model_fields_set contains the field - if self.source_group_id is None and "source_group_id" in self.model_fields_set: - _dict['source_group_id'] = None - return _dict @classmethod diff --git a/opal/models/paginated_configuration_template_list.py b/opal/models/paginated_configuration_template_list.py index d37b9c3..0f00124 100644 --- a/opal/models/paginated_configuration_template_list.py +++ b/opal/models/paginated_configuration_template_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/paginated_event_list.py b/opal/models/paginated_event_list.py index ef66e28..afcd43e 100644 --- a/opal/models/paginated_event_list.py +++ b/opal/models/paginated_event_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/paginated_group_bindings_list.py b/opal/models/paginated_group_bindings_list.py index ca2f5c1..7bb0b04 100644 --- a/opal/models/paginated_group_bindings_list.py +++ b/opal/models/paginated_group_bindings_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/paginated_groups_list.py b/opal/models/paginated_groups_list.py index 820a956..531b469 100644 --- a/opal/models/paginated_groups_list.py +++ b/opal/models/paginated_groups_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/paginated_owners_list.py b/opal/models/paginated_owners_list.py index 15a0b1a..eb8dfd1 100644 --- a/opal/models/paginated_owners_list.py +++ b/opal/models/paginated_owners_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/paginated_resources_list.py b/opal/models/paginated_resources_list.py index 21a829f..fbdcc45 100644 --- a/opal/models/paginated_resources_list.py +++ b/opal/models/paginated_resources_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/paginated_tags_list.py b/opal/models/paginated_tags_list.py index 01e1428..b4403ef 100644 --- a/opal/models/paginated_tags_list.py +++ b/opal/models/paginated_tags_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/paginated_uars_list.py b/opal/models/paginated_uars_list.py index a2e6912..967cf8a 100644 --- a/opal/models/paginated_uars_list.py +++ b/opal/models/paginated_uars_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/paginated_users_list.py b/opal/models/paginated_users_list.py index cdf7c0e..0214683 100644 --- a/opal/models/paginated_users_list.py +++ b/opal/models/paginated_users_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/request.py b/opal/models/request.py index 5332e6a..4a9714f 100644 --- a/opal/models/request.py +++ b/opal/models/request.py @@ -35,14 +35,15 @@ class Request(BaseModel): created_at: datetime = Field(description="The date and time the request was created.") updated_at: datetime = Field(description="The date and time the request was last updated.") requester_id: StrictStr = Field(description="The unique identifier of the user who created the request.") - target_user_id: StrictStr = Field(description="The unique identifier of the user who is the target of the request.") - status: RequestStatusEnum + target_user_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the user who is the target of the request.") + target_group_id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the group who is the target of the request.") + status: RequestStatusEnum = Field(description="The status of the request.") reason: StrictStr = Field(description="The reason for the request.") duration_minutes: Optional[StrictInt] = Field(default=None, description="The duration of the request in minutes.") requested_items_list: Optional[List[RequestedItem]] = Field(default=None, description="The list of targets for the request.") custom_fields_responses: Optional[List[RequestCustomFieldResponse]] = Field(default=None, description="The responses given to the custom fields associated to the request") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "requester_id", "target_user_id", "status", "reason", "duration_minutes", "requested_items_list", "custom_fields_responses"] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "requester_id", "target_user_id", "target_group_id", "status", "reason", "duration_minutes", "requested_items_list", "custom_fields_responses"] model_config = ConfigDict( populate_by_name=True, @@ -88,16 +89,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in requested_items_list (list) _items = [] if self.requested_items_list: - for _item in self.requested_items_list: - if _item: - _items.append(_item.to_dict()) + for _item_requested_items_list in self.requested_items_list: + if _item_requested_items_list: + _items.append(_item_requested_items_list.to_dict()) _dict['requested_items_list'] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields_responses (list) _items = [] if self.custom_fields_responses: - for _item in self.custom_fields_responses: - if _item: - _items.append(_item.to_dict()) + for _item_custom_fields_responses in self.custom_fields_responses: + if _item_custom_fields_responses: + _items.append(_item_custom_fields_responses.to_dict()) _dict['custom_fields_responses'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: @@ -121,6 +122,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "updated_at": obj.get("updated_at"), "requester_id": obj.get("requester_id"), "target_user_id": obj.get("target_user_id"), + "target_group_id": obj.get("target_group_id"), "status": obj.get("status"), "reason": obj.get("reason"), "duration_minutes": obj.get("duration_minutes"), diff --git a/opal/models/request_configuration.py b/opal/models/request_configuration.py index 29c2916..58d2cf2 100644 --- a/opal/models/request_configuration.py +++ b/opal/models/request_configuration.py @@ -29,7 +29,7 @@ class RequestConfiguration(BaseModel): """ # Request Configuration Object ### Description The `RequestConfiguration` object is used to represent a request configuration. ### Usage Example Returned from the `GET Request Configurations` endpoint. """ # noqa: E501 - condition: Optional[Condition] = None + condition: Optional[Condition] = Field(default=None, description="The condition for the request configuration.") allow_requests: StrictBool = Field(description="A bool representing whether or not to allow requests for this resource.") auto_approval: StrictBool = Field(description="A bool representing whether or not to automatically approve requests for this resource.") require_mfa_to_request: StrictBool = Field(description="A bool representing whether or not to require MFA for requesting access to this resource.") @@ -89,9 +89,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in reviewer_stages (list) _items = [] if self.reviewer_stages: - for _item in self.reviewer_stages: - if _item: - _items.append(_item.to_dict()) + for _item_reviewer_stages in self.reviewer_stages: + if _item_reviewer_stages: + _items.append(_item_reviewer_stages.to_dict()) _dict['reviewer_stages'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/request_custom_field_response_field_value.py b/opal/models/request_custom_field_response_field_value.py index e237f3d..3a6958e 100644 --- a/opal/models/request_custom_field_response_field_value.py +++ b/opal/models/request_custom_field_response_field_value.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from pydantic import StrictStr, Field -from typing import Union, List, Optional, Dict +from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self REQUESTCUSTOMFIELDRESPONSEFIELDVALUE_ONE_OF_SCHEMAS = ["bool", "str"] @@ -33,7 +33,7 @@ class RequestCustomFieldResponseFieldValue(BaseModel): # data type: bool oneof_schema_2_validator: Optional[StrictBool] = None actual_instance: Optional[Union[bool, str]] = None - one_of_schemas: List[str] = Field(default=Literal["bool", "str"]) + one_of_schemas: Set[str] = { "bool", "str" } model_config = ConfigDict( validate_assignment=True, diff --git a/opal/models/request_list.py b/opal/models/request_list.py index d9fed00..667f4b0 100644 --- a/opal/models/request_list.py +++ b/opal/models/request_list.py @@ -77,9 +77,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in requests (list) _items = [] if self.requests: - for _item in self.requests: - if _item: - _items.append(_item.to_dict()) + for _item_requests in self.requests: + if _item_requests: + _items.append(_item_requests.to_dict()) _dict['requests'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/resource.py b/opal/models/resource.py index 7cb031e..fd32976 100644 --- a/opal/models/resource.py +++ b/opal/models/resource.py @@ -20,9 +20,12 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.request_configuration import RequestConfiguration from opal.models.resource_remote_info import ResourceRemoteInfo from opal.models.resource_type_enum import ResourceTypeEnum +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration from typing import Optional, Set from typing_extensions import Self @@ -52,10 +55,14 @@ class Resource(BaseModel): configuration_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated configuration template.") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of configurations for requests to this resource.") request_configuration_list: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of configurations for requests to this resource. Deprecated in favor of `request_configurations`.") + ticket_propagation: Optional[TicketPropagationConfiguration] = None + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + risk_sensitivity: Optional[RiskSensitivityEnum] = Field(default=None, description="The risk sensitivity level for the resource. When an override is set, this field will match that.") + risk_sensitivity_override: Optional[RiskSensitivityEnum] = None metadata: Optional[StrictStr] = Field(default=None, description="JSON metadata about the remote resource. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details.") remote_info: Optional[ResourceRemoteInfo] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["resource_id", "app_id", "name", "description", "admin_owner_id", "remote_resource_id", "remote_resource_name", "resource_type", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "request_template_id", "is_requestable", "parent_resource_id", "configuration_template_id", "request_configurations", "request_configuration_list", "metadata", "remote_info"] + __properties: ClassVar[List[str]] = ["resource_id", "app_id", "name", "description", "admin_owner_id", "remote_resource_id", "remote_resource_name", "resource_type", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "require_mfa_to_approve", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "request_template_id", "is_requestable", "parent_resource_id", "configuration_template_id", "request_configurations", "request_configuration_list", "ticket_propagation", "custom_request_notification", "risk_sensitivity", "risk_sensitivity_override", "metadata", "remote_info"] model_config = ConfigDict( populate_by_name=True, @@ -87,9 +94,11 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "risk_sensitivity", "additional_properties", ]) @@ -101,17 +110,20 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in request_configurations (list) _items = [] if self.request_configurations: - for _item in self.request_configurations: - if _item: - _items.append(_item.to_dict()) + for _item_request_configurations in self.request_configurations: + if _item_request_configurations: + _items.append(_item_request_configurations.to_dict()) _dict['request_configurations'] = _items # override the default output from pydantic by calling `to_dict()` of each item in request_configuration_list (list) _items = [] if self.request_configuration_list: - for _item in self.request_configuration_list: - if _item: - _items.append(_item.to_dict()) + for _item_request_configuration_list in self.request_configuration_list: + if _item_request_configuration_list: + _items.append(_item_request_configuration_list.to_dict()) _dict['request_configuration_list'] = _items + # override the default output from pydantic by calling `to_dict()` of ticket_propagation + if self.ticket_propagation: + _dict['ticket_propagation'] = self.ticket_propagation.to_dict() # override the default output from pydantic by calling `to_dict()` of remote_info if self.remote_info: _dict['remote_info'] = self.remote_info.to_dict() @@ -154,6 +166,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "configuration_template_id": obj.get("configuration_template_id"), "request_configurations": [RequestConfiguration.from_dict(_item) for _item in obj["request_configurations"]] if obj.get("request_configurations") is not None else None, "request_configuration_list": [RequestConfiguration.from_dict(_item) for _item in obj["request_configuration_list"]] if obj.get("request_configuration_list") is not None else None, + "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, + "custom_request_notification": obj.get("custom_request_notification"), + "risk_sensitivity": obj.get("risk_sensitivity"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override"), "metadata": obj.get("metadata"), "remote_info": ResourceRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") is not None else None }) diff --git a/opal/models/resource_access_level.py b/opal/models/resource_access_level.py index 1480cf5..b4edd4d 100644 --- a/opal/models/resource_access_level.py +++ b/opal/models/resource_access_level.py @@ -25,7 +25,7 @@ class ResourceAccessLevel(BaseModel): """ - # Access Level Object ### Description The `ResourceAccessLevel` object is used to represent the level of access that a user has to a resource or a resource has to a group. The \"default\" access level is a `ResourceAccessLevel` object whose fields are all empty strings. ### Usage Example View the `ResourceAccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. + # Access Level Object ### Description The `AccessLevel` object is used to represent the level of access that a principal has. The \"default\" access level is a `AccessLevel` object whose fields are all empty strings. ### Usage Example View the `AccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. """ # noqa: E501 access_level_name: StrictStr = Field(description="The human-readable name of the access level.") access_level_remote_id: StrictStr = Field(description="The machine-readable identifier of the access level.") diff --git a/opal/models/resource_access_user.py b/opal/models/resource_access_user.py index eda9496..96341f2 100644 --- a/opal/models/resource_access_user.py +++ b/opal/models/resource_access_user.py @@ -20,7 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from opal.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self @@ -34,7 +34,7 @@ class ResourceAccessUser(BaseModel): access_level: ResourceAccessLevel full_name: StrictStr = Field(description="The user's full name.") email: StrictStr = Field(description="The user's email.") - expiration_date: Optional[datetime] = Field(description="The day and time the user's access will expire.") + expiration_date: datetime = Field(description="The day and time the user's access will expire.") has_direct_access: StrictBool = Field(description="The user has direct access to this resources (vs. indirectly, like through a group).") num_access_paths: StrictInt = Field(description="The number of ways in which the user has access through this resource (directly and indirectly).") additional_properties: Dict[str, Any] = {} @@ -89,11 +89,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if expiration_date (nullable) is None - # and model_fields_set contains the field - if self.expiration_date is None and "expiration_date" in self.model_fields_set: - _dict['expiration_date'] = None - return _dict @classmethod diff --git a/opal/models/resource_access_user_list.py b/opal/models/resource_access_user_list.py index f1755ad..1c0a90f 100644 --- a/opal/models/resource_access_user_list.py +++ b/opal/models/resource_access_user_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/resource_nhi.py b/opal/models/resource_nhi.py new file mode 100644 index 0000000..469188f --- /dev/null +++ b/opal/models/resource_nhi.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal.models.resource_access_level import ResourceAccessLevel +from typing import Optional, Set +from typing_extensions import Self + +class ResourceNHI(BaseModel): + """ + # Resource Non-Human Identity Direct Access Object ### Description This object is used to represent a non-human identity with direct access to a resource. + """ # noqa: E501 + resource_id: StrictStr = Field(description="The ID of the resource.") + non_human_identity_id: StrictStr = Field(description="The resource ID of the non-human identity.") + access_level: Optional[ResourceAccessLevel] = None + expiration_date: datetime = Field(description="The day and time the non-human identity's access will expire.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["resource_id", "non_human_identity_id", "access_level", "expiration_date"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceNHI from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of access_level + if self.access_level: + _dict['access_level'] = self.access_level.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceNHI from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id"), + "non_human_identity_id": obj.get("non_human_identity_id"), + "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None, + "expiration_date": obj.get("expiration_date") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/resource_remote_info.py b/opal/models/resource_remote_info.py index 38c8102..2ba1910 100644 --- a/opal/models/resource_remote_info.py +++ b/opal/models/resource_remote_info.py @@ -34,6 +34,7 @@ from opal.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster from opal.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization from opal.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject @@ -67,6 +68,7 @@ class ResourceRemoteInfo(BaseModel): gcp_gke_cluster: Optional[ResourceRemoteInfoGcpGkeCluster] = None gcp_project: Optional[ResourceRemoteInfoGcpProject] = None gcp_sql_instance: Optional[ResourceRemoteInfoGcpSqlInstance] = None + gcp_service_account: Optional[ResourceRemoteInfoGcpServiceAccount] = None github_repo: Optional[ResourceRemoteInfoGithubRepo] = None gitlab_project: Optional[ResourceRemoteInfoGitlabProject] = None okta_app: Optional[ResourceRemoteInfoOktaApp] = None @@ -78,7 +80,7 @@ class ResourceRemoteInfo(BaseModel): salesforce_role: Optional[ResourceRemoteInfoSalesforceRole] = None teleport_role: Optional[ResourceRemoteInfoTeleportRole] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["aws_account", "aws_permission_set", "aws_iam_role", "aws_ec2_instance", "aws_rds_instance", "aws_eks_cluster", "gcp_organization", "gcp_bucket", "gcp_compute_instance", "gcp_big_query_dataset", "gcp_big_query_table", "gcp_folder", "gcp_gke_cluster", "gcp_project", "gcp_sql_instance", "github_repo", "gitlab_project", "okta_app", "okta_standard_role", "okta_custom_role", "pagerduty_role", "salesforce_permission_set", "salesforce_profile", "salesforce_role", "teleport_role"] + __properties: ClassVar[List[str]] = ["aws_account", "aws_permission_set", "aws_iam_role", "aws_ec2_instance", "aws_rds_instance", "aws_eks_cluster", "gcp_organization", "gcp_bucket", "gcp_compute_instance", "gcp_big_query_dataset", "gcp_big_query_table", "gcp_folder", "gcp_gke_cluster", "gcp_project", "gcp_sql_instance", "gcp_service_account", "github_repo", "gitlab_project", "okta_app", "okta_standard_role", "okta_custom_role", "pagerduty_role", "salesforce_permission_set", "salesforce_profile", "salesforce_role", "teleport_role"] model_config = ConfigDict( populate_by_name=True, @@ -166,6 +168,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of gcp_sql_instance if self.gcp_sql_instance: _dict['gcp_sql_instance'] = self.gcp_sql_instance.to_dict() + # override the default output from pydantic by calling `to_dict()` of gcp_service_account + if self.gcp_service_account: + _dict['gcp_service_account'] = self.gcp_service_account.to_dict() # override the default output from pydantic by calling `to_dict()` of github_repo if self.github_repo: _dict['github_repo'] = self.github_repo.to_dict() @@ -228,6 +233,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "gcp_gke_cluster": ResourceRemoteInfoGcpGkeCluster.from_dict(obj["gcp_gke_cluster"]) if obj.get("gcp_gke_cluster") is not None else None, "gcp_project": ResourceRemoteInfoGcpProject.from_dict(obj["gcp_project"]) if obj.get("gcp_project") is not None else None, "gcp_sql_instance": ResourceRemoteInfoGcpSqlInstance.from_dict(obj["gcp_sql_instance"]) if obj.get("gcp_sql_instance") is not None else None, + "gcp_service_account": ResourceRemoteInfoGcpServiceAccount.from_dict(obj["gcp_service_account"]) if obj.get("gcp_service_account") is not None else None, "github_repo": ResourceRemoteInfoGithubRepo.from_dict(obj["github_repo"]) if obj.get("github_repo") is not None else None, "gitlab_project": ResourceRemoteInfoGitlabProject.from_dict(obj["gitlab_project"]) if obj.get("gitlab_project") is not None else None, "okta_app": ResourceRemoteInfoOktaApp.from_dict(obj["okta_app"]) if obj.get("okta_app") is not None else None, diff --git a/opal/models/resource_remote_info_gcp_service_account.py b/opal/models/resource_remote_info_gcp_service_account.py new file mode 100644 index 0000000..9a62688 --- /dev/null +++ b/opal/models/resource_remote_info_gcp_service_account.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceRemoteInfoGcpServiceAccount(BaseModel): + """ + Remote info for a GCP service account. + """ # noqa: E501 + email: StrictStr = Field(description="The email of the service account.") + service_account_id: StrictStr = Field(description="The id of the service account.") + project_id: StrictStr = Field(description="The id of the project the service account is in.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "service_account_id", "project_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoGcpServiceAccount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceRemoteInfoGcpServiceAccount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "service_account_id": obj.get("service_account_id"), + "project_id": obj.get("project_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/resource_type_enum.py b/opal/models/resource_type_enum.py index 2abad99..a671a0c 100644 --- a/opal/models/resource_type_enum.py +++ b/opal/models/resource_type_enum.py @@ -30,11 +30,27 @@ class ResourceTypeEnum(str, Enum): AWS_IAM_ROLE = 'AWS_IAM_ROLE' AWS_EC2_INSTANCE = 'AWS_EC2_INSTANCE' AWS_EKS_CLUSTER = 'AWS_EKS_CLUSTER' + AWS_RDS_POSTGRES_CLUSTER = 'AWS_RDS_POSTGRES_CLUSTER' AWS_RDS_POSTGRES_INSTANCE = 'AWS_RDS_POSTGRES_INSTANCE' + AWS_RDS_MYSQL_CLUSTER = 'AWS_RDS_MYSQL_CLUSTER' AWS_RDS_MYSQL_INSTANCE = 'AWS_RDS_MYSQL_INSTANCE' AWS_ACCOUNT = 'AWS_ACCOUNT' AWS_SSO_PERMISSION_SET = 'AWS_SSO_PERMISSION_SET' + AZURE_MANAGEMENT_GROUP = 'AZURE_MANAGEMENT_GROUP' + AZURE_RESOURCE_GROUP = 'AZURE_RESOURCE_GROUP' + AZURE_SUBSCRIPTION = 'AZURE_SUBSCRIPTION' + AZURE_VIRTUAL_MACHINE = 'AZURE_VIRTUAL_MACHINE' + AZURE_STORAGE_ACCOUNT = 'AZURE_STORAGE_ACCOUNT' + AZURE_STORAGE_CONTAINER = 'AZURE_STORAGE_CONTAINER' + AZURE_SQL_SERVER = 'AZURE_SQL_SERVER' + AZURE_SQL_MANAGED_INSTANCE = 'AZURE_SQL_MANAGED_INSTANCE' + AZURE_SQL_DATABASE = 'AZURE_SQL_DATABASE' + AZURE_SQL_MANAGED_DATABASE = 'AZURE_SQL_MANAGED_DATABASE' + AZURE_USER_ASSIGNED_MANAGED_IDENTITY = 'AZURE_USER_ASSIGNED_MANAGED_Identity' + AZURE_ENTRA_ID_ROLE = 'AZURE_ENTRA_ID_ROLE' CUSTOM = 'CUSTOM' + CUSTOM_CONNECTOR = 'CUSTOM_CONNECTOR' + GCP_ORGANIZATION = 'GCP_ORGANIZATION' GCP_BUCKET = 'GCP_BUCKET' GCP_COMPUTE_INSTANCE = 'GCP_COMPUTE_INSTANCE' GCP_FOLDER = 'GCP_FOLDER' @@ -42,6 +58,9 @@ class ResourceTypeEnum(str, Enum): GCP_PROJECT = 'GCP_PROJECT' GCP_CLOUD_SQL_POSTGRES_INSTANCE = 'GCP_CLOUD_SQL_POSTGRES_INSTANCE' GCP_CLOUD_SQL_MYSQL_INSTANCE = 'GCP_CLOUD_SQL_MYSQL_INSTANCE' + GCP_BIG_QUERY_DATASET = 'GCP_BIG_QUERY_DATASET' + GCP_BIG_QUERY_TABLE = 'GCP_BIG_QUERY_TABLE' + GCP_SERVICE_ACCOUNT = 'GCP_SERVICE_ACCOUNT' GIT_HUB_REPO = 'GIT_HUB_REPO' GIT_LAB_PROJECT = 'GIT_LAB_PROJECT' GOOGLE_WORKSPACE_ROLE = 'GOOGLE_WORKSPACE_ROLE' @@ -50,14 +69,19 @@ class ResourceTypeEnum(str, Enum): OKTA_APP = 'OKTA_APP' OKTA_ROLE = 'OKTA_ROLE' OPAL_ROLE = 'OPAL_ROLE' + OPAL_SCOPED_ROLE = 'OPAL_SCOPED_ROLE' PAGERDUTY_ROLE = 'PAGERDUTY_ROLE' TAILSCALE_SSH = 'TAILSCALE_SSH' SALESFORCE_PERMISSION_SET = 'SALESFORCE_PERMISSION_SET' SALESFORCE_PROFILE = 'SALESFORCE_PROFILE' SALESFORCE_ROLE = 'SALESFORCE_ROLE' + SNOWFLAKE_DATABASE = 'SNOWFLAKE_DATABASE' + SNOWFLAKE_SCHEMA = 'SNOWFLAKE_SCHEMA' + SNOWFLAKE_TABLE = 'SNOWFLAKE_TABLE' WORKDAY_ROLE = 'WORKDAY_ROLE' MYSQL_INSTANCE = 'MYSQL_INSTANCE' MARIADB_INSTANCE = 'MARIADB_INSTANCE' + POSTGRES_INSTANCE = 'POSTGRES_INSTANCE' TELEPORT_ROLE = 'TELEPORT_ROLE' @classmethod diff --git a/opal/models/resource_user.py b/opal/models/resource_user.py index 67608fc..131bfb5 100644 --- a/opal/models/resource_user.py +++ b/opal/models/resource_user.py @@ -20,7 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from opal.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self @@ -34,7 +34,7 @@ class ResourceUser(BaseModel): access_level: ResourceAccessLevel full_name: StrictStr = Field(description="The user's full name.") email: StrictStr = Field(description="The user's email.") - expiration_date: Optional[datetime] = Field(description="The day and time the user's access will expire.") + expiration_date: datetime = Field(description="The day and time the user's access will expire.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["resource_id", "user_id", "access_level", "full_name", "email", "expiration_date"] @@ -87,11 +87,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if expiration_date (nullable) is None - # and model_fields_set contains the field - if self.expiration_date is None and "expiration_date" in self.model_fields_set: - _dict['expiration_date'] = None - return _dict @classmethod diff --git a/opal/models/resource_user_access_status.py b/opal/models/resource_user_access_status.py index 5bf88ae..75033f7 100644 --- a/opal/models/resource_user_access_status.py +++ b/opal/models/resource_user_access_status.py @@ -34,7 +34,7 @@ class ResourceUserAccessStatus(BaseModel): user_id: StrictStr = Field(description="The ID of the user.") access_level: Optional[ResourceAccessLevel] = None status: ResourceUserAccessStatusEnum - expiration_date: Optional[datetime] = Field(description="The day and time the user's access will expire.") + expiration_date: datetime = Field(description="The day and time the user's access will expire.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["resource_id", "user_id", "access_level", "status", "expiration_date"] @@ -87,11 +87,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if expiration_date (nullable) is None - # and model_fields_set contains the field - if self.expiration_date is None and "expiration_date" in self.model_fields_set: - _dict['expiration_date'] = None - return _dict @classmethod diff --git a/opal/models/reviewer_stage.py b/opal/models/reviewer_stage.py index 6175778..496fcc3 100644 --- a/opal/models/reviewer_stage.py +++ b/opal/models/reviewer_stage.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,10 +28,11 @@ class ReviewerStage(BaseModel): A reviewer stage. """ # noqa: E501 require_manager_approval: StrictBool = Field(description="Whether this reviewer stage should require manager approval.") - operator: StrictStr = Field(description="The operator of the reviewer stage.") + require_admin_approval: Optional[StrictBool] = Field(default=None, description="Whether this reviewer stage should require admin approval.") + operator: StrictStr = Field(description="The operator of the reviewer stage. Admin and manager approval are also treated as reviewers.") owner_ids: List[StrictStr] additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["require_manager_approval", "operator", "owner_ids"] + __properties: ClassVar[List[str]] = ["require_manager_approval", "require_admin_approval", "operator", "owner_ids"] @field_validator('operator') def operator_validate_enum(cls, value): @@ -99,6 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "require_manager_approval": obj.get("require_manager_approval"), + "require_admin_approval": obj.get("require_admin_approval"), "operator": obj.get("operator"), "owner_ids": obj.get("owner_ids") }) diff --git a/opal/models/reviewer_stage_list.py b/opal/models/reviewer_stage_list.py index dc24d02..f4c9bcc 100644 --- a/opal/models/reviewer_stage_list.py +++ b/opal/models/reviewer_stage_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in stages (list) _items = [] if self.stages: - for _item in self.stages: - if _item: - _items.append(_item.to_dict()) + for _item_stages in self.stages: + if _item_stages: + _items.append(_item_stages.to_dict()) _dict['stages'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/risk_sensitivity_enum.py b/opal/models/risk_sensitivity_enum.py new file mode 100644 index 0000000..c326699 --- /dev/null +++ b/opal/models/risk_sensitivity_enum.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class RiskSensitivityEnum(str, Enum): + """ + Indicates the level of potential impact misuse or unauthorized access may incur. + """ + + """ + allowed enum values + """ + UNKNOWN = 'UNKNOWN' + CRITICAL = 'CRITICAL' + HIGH = 'HIGH' + MEDIUM = 'MEDIUM' + LOW = 'LOW' + NONE = 'NONE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RiskSensitivityEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal/models/sessions_list.py b/opal/models/sessions_list.py index dba2529..a635aa2 100644 --- a/opal/models/sessions_list.py +++ b/opal/models/sessions_list.py @@ -78,25 +78,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in results (list) _items = [] if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) + for _item_results in self.results: + if _item_results: + _items.append(_item_results.to_dict()) _dict['results'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if next (nullable) is None - # and model_fields_set contains the field - if self.next is None and "next" in self.model_fields_set: - _dict['next'] = None - - # set to None if previous (nullable) is None - # and model_fields_set contains the field - if self.previous is None and "previous" in self.model_fields_set: - _dict['previous'] = None - return _dict @classmethod diff --git a/opal/models/tags_list.py b/opal/models/tags_list.py index 6f93d52..d967680 100644 --- a/opal/models/tags_list.py +++ b/opal/models/tags_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in tags (list) _items = [] if self.tags: - for _item in self.tags: - if _item: - _items.append(_item.to_dict()) + for _item_tags in self.tags: + if _item_tags: + _items.append(_item_tags.to_dict()) _dict['tags'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/ticket_propagation_configuration.py b/opal/models/ticket_propagation_configuration.py new file mode 100644 index 0000000..a73e64e --- /dev/null +++ b/opal/models/ticket_propagation_configuration.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from opal.models.ticketing_provider_enum import TicketingProviderEnum +from typing import Optional, Set +from typing_extensions import Self + +class TicketPropagationConfiguration(BaseModel): + """ + Configuration for ticket propagation, when enabled, a ticket will be created for access changes related to the users in this resource. + """ # noqa: E501 + enabled_on_grant: StrictBool + enabled_on_revocation: StrictBool + ticket_provider: Optional[TicketingProviderEnum] = None + ticket_project_id: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled_on_grant", "enabled_on_revocation", "ticket_provider", "ticket_project_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TicketPropagationConfiguration from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TicketPropagationConfiguration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled_on_grant": obj.get("enabled_on_grant"), + "enabled_on_revocation": obj.get("enabled_on_revocation"), + "ticket_provider": obj.get("ticket_provider"), + "ticket_project_id": obj.get("ticket_project_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/ticketing_provider_enum.py b/opal/models/ticketing_provider_enum.py new file mode 100644 index 0000000..3b951b2 --- /dev/null +++ b/opal/models/ticketing_provider_enum.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TicketingProviderEnum(str, Enum): + """ + The third party ticketing platform provider. + """ + + """ + allowed enum values + """ + JIRA = 'JIRA' + LINEAR = 'LINEAR' + SERVICE_NOW = 'SERVICE_NOW' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TicketingProviderEnum from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/opal/models/uar_scope.py b/opal/models/uar_scope.py index 2201c6b..00e3b75 100644 --- a/opal/models/uar_scope.py +++ b/opal/models/uar_scope.py @@ -18,8 +18,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from opal.models.group_type_enum import GroupTypeEnum +from opal.models.resource_type_enum import ResourceTypeEnum from opal.models.tag_filter import TagFilter from typing import Optional, Set from typing_extensions import Self @@ -28,11 +30,39 @@ class UARScope(BaseModel): """ If set, the access review will only contain resources and groups that match at least one of the filters in scope. """ # noqa: E501 + group_visibility: Optional[StrictStr] = Field(default=None, description="Specifies what users can see during an Access Review") + users: Optional[List[StrictStr]] = Field(default=None, description="The access review will only include the following users. If any users are selected, any entity filters will be applied to only the entities that the selected users have access to.") + filter_operator: Optional[StrictStr] = Field(default=None, description="Specifies whether entities must match all (AND) or any (OR) of the filters.") + entities: Optional[List[StrictStr]] = Field(default=None, description="This access review will include resources and groups with ids in the given strings.") + apps: Optional[List[StrictStr]] = Field(default=None, description="This access review will include items in the specified applications") + admins: Optional[List[StrictStr]] = Field(default=None, description="This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs.") + group_types: Optional[List[GroupTypeEnum]] = Field(default=None, description="This access review will include items of the specified group types") + resource_types: Optional[List[ResourceTypeEnum]] = Field(default=None, description="This access review will include items of the specified resource types") + include_group_bindings: Optional[StrictBool] = None tags: Optional[List[TagFilter]] = Field(default=None, description="This access review will include resources and groups who are tagged with one of the given tags.") names: Optional[List[StrictStr]] = Field(default=None, description="This access review will include resources and groups whose name contains one of the given strings.") - admins: Optional[List[StrictStr]] = Field(default=None, description="This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["tags", "names", "admins"] + __properties: ClassVar[List[str]] = ["group_visibility", "users", "filter_operator", "entities", "apps", "admins", "group_types", "resource_types", "include_group_bindings", "tags", "names"] + + @field_validator('group_visibility') + def group_visibility_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['STRICT', 'VIEW_VISIBLE_AND_ASSIGNED', 'VIEW_ALL']): + raise ValueError("must be one of enum values ('STRICT', 'VIEW_VISIBLE_AND_ASSIGNED', 'VIEW_ALL')") + return value + + @field_validator('filter_operator') + def filter_operator_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ANY', 'ALL']): + raise ValueError("must be one of enum values ('ANY', 'ALL')") + return value model_config = ConfigDict( populate_by_name=True, @@ -78,9 +108,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in tags (list) _items = [] if self.tags: - for _item in self.tags: - if _item: - _items.append(_item.to_dict()) + for _item_tags in self.tags: + if _item_tags: + _items.append(_item_tags.to_dict()) _dict['tags'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: @@ -99,9 +129,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "group_visibility": obj.get("group_visibility"), + "users": obj.get("users"), + "filter_operator": obj.get("filter_operator"), + "entities": obj.get("entities"), + "apps": obj.get("apps"), + "admins": obj.get("admins"), + "group_types": obj.get("group_types"), + "resource_types": obj.get("resource_types"), + "include_group_bindings": obj.get("include_group_bindings"), "tags": [TagFilter.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, - "names": obj.get("names"), - "admins": obj.get("admins") + "names": obj.get("names") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/update_configuration_template_info.py b/opal/models/update_configuration_template_info.py index 4291dae..3b223d4 100644 --- a/opal/models/update_configuration_template_info.py +++ b/opal/models/update_configuration_template_info.py @@ -20,8 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList from opal.models.request_configuration import RequestConfiguration +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration from opal.models.visibility_info import VisibilityInfo from typing import Optional, Set from typing_extensions import Self @@ -33,16 +35,18 @@ class UpdateConfigurationTemplateInfo(BaseModel): configuration_template_id: StrictStr = Field(description="The ID of the configuration template.") name: Optional[StrictStr] = Field(default=None, description="The name of the configuration template.") admin_owner_id: Optional[StrictStr] = Field(default=None, description="The ID of the owner of the configuration template.") - visibility: Optional[VisibilityInfo] = None + visibility: Optional[VisibilityInfo] = Field(default=None, description="The visibility info of the configuration template.") linked_audit_message_channel_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the audit message channels linked to the configuration template.") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="The request configuration list linked to the configuration template.") - request_configuration_list: Optional[CreateRequestConfigurationInfoList] = None + request_configuration_list: Optional[CreateRequestConfigurationInfoList] = Field(default=None, description="The request configuration list linked to the configuration template. Deprecated in favor of `request_configurations`.") member_oncall_schedule_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the on-call schedules linked to the configuration template.") break_glass_user_ids: Optional[List[StrictStr]] = Field(default=None, description="The IDs of the break glass users linked to the configuration template.") require_mfa_to_approve: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.") require_mfa_to_connect: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA to connect to resources associated with this configuration template.") + ticket_propagation: Optional[TicketPropagationConfiguration] = None + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval for this configuration template.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configurations", "request_configuration_list", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect"] + __properties: ClassVar[List[str]] = ["configuration_template_id", "name", "admin_owner_id", "visibility", "linked_audit_message_channel_ids", "request_configurations", "request_configuration_list", "member_oncall_schedule_ids", "break_glass_user_ids", "require_mfa_to_approve", "require_mfa_to_connect", "ticket_propagation", "custom_request_notification"] model_config = ConfigDict( populate_by_name=True, @@ -91,13 +95,16 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in request_configurations (list) _items = [] if self.request_configurations: - for _item in self.request_configurations: - if _item: - _items.append(_item.to_dict()) + for _item_request_configurations in self.request_configurations: + if _item_request_configurations: + _items.append(_item_request_configurations.to_dict()) _dict['request_configurations'] = _items # override the default output from pydantic by calling `to_dict()` of request_configuration_list if self.request_configuration_list: _dict['request_configuration_list'] = self.request_configuration_list.to_dict() + # override the default output from pydantic by calling `to_dict()` of ticket_propagation + if self.ticket_propagation: + _dict['ticket_propagation'] = self.ticket_propagation.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -125,7 +132,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "member_oncall_schedule_ids": obj.get("member_oncall_schedule_ids"), "break_glass_user_ids": obj.get("break_glass_user_ids"), "require_mfa_to_approve": obj.get("require_mfa_to_approve"), - "require_mfa_to_connect": obj.get("require_mfa_to_connect") + "require_mfa_to_connect": obj.get("require_mfa_to_connect"), + "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, + "custom_request_notification": obj.get("custom_request_notification") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/update_group_binding_info.py b/opal/models/update_group_binding_info.py index 2ac99a0..ad8a38e 100644 --- a/opal/models/update_group_binding_info.py +++ b/opal/models/update_group_binding_info.py @@ -78,9 +78,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in groups (list) _items = [] if self.groups: - for _item in self.groups: - if _item: - _items.append(_item.to_dict()) + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) _dict['groups'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/update_group_binding_info_list.py b/opal/models/update_group_binding_info_list.py index 1e27b58..d1024d3 100644 --- a/opal/models/update_group_binding_info_list.py +++ b/opal/models/update_group_binding_info_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in group_bindings (list) _items = [] if self.group_bindings: - for _item in self.group_bindings: - if _item: - _items.append(_item.to_dict()) + for _item_group_bindings in self.group_bindings: + if _item_group_bindings: + _items.append(_item_group_bindings.to_dict()) _dict['group_bindings'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/update_group_info.py b/opal/models/update_group_info.py index d97cb7f..d4c022f 100644 --- a/opal/models/update_group_info.py +++ b/opal/models/update_group_info.py @@ -20,8 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList from opal.models.request_configuration import RequestConfiguration +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self @@ -44,10 +46,13 @@ class UpdateGroupInfo(BaseModel): configuration_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated configuration template.") request_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated request template. Deprecated in favor of `request_configurations`.") is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`.") + group_leader_user_ids: Optional[List[StrictStr]] = Field(default=None, description="A list of User IDs for the group leaders of the group") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used.") - request_configuration_list: Optional[CreateRequestConfigurationInfoList] = None + request_configuration_list: Optional[CreateRequestConfigurationInfoList] = Field(default=None, description="The request configuration list of the configuration template. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`.") + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent to the requester when the request is approved.") + risk_sensitivity_override: Optional[RiskSensitivityEnum] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["group_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "require_mfa_to_request", "auto_approval", "configuration_template_id", "request_template_id", "is_requestable", "request_configurations", "request_configuration_list"] + __properties: ClassVar[List[str]] = ["group_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "require_mfa_to_request", "auto_approval", "configuration_template_id", "request_template_id", "is_requestable", "group_leader_user_ids", "request_configurations", "request_configuration_list", "custom_request_notification", "risk_sensitivity_override"] model_config = ConfigDict( populate_by_name=True, @@ -93,9 +98,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in request_configurations (list) _items = [] if self.request_configurations: - for _item in self.request_configurations: - if _item: - _items.append(_item.to_dict()) + for _item_request_configurations in self.request_configurations: + if _item_request_configurations: + _items.append(_item_request_configurations.to_dict()) _dict['request_configurations'] = _items # override the default output from pydantic by calling `to_dict()` of request_configuration_list if self.request_configuration_list: @@ -132,8 +137,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "configuration_template_id": obj.get("configuration_template_id"), "request_template_id": obj.get("request_template_id"), "is_requestable": obj.get("is_requestable"), + "group_leader_user_ids": obj.get("group_leader_user_ids"), "request_configurations": [RequestConfiguration.from_dict(_item) for _item in obj["request_configurations"]] if obj.get("request_configurations") is not None else None, - "request_configuration_list": CreateRequestConfigurationInfoList.from_dict(obj["request_configuration_list"]) if obj.get("request_configuration_list") is not None else None + "request_configuration_list": CreateRequestConfigurationInfoList.from_dict(obj["request_configuration_list"]) if obj.get("request_configuration_list") is not None else None, + "custom_request_notification": obj.get("custom_request_notification"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/opal/models/update_group_info_list.py b/opal/models/update_group_info_list.py index e7e3469..afe16c9 100644 --- a/opal/models/update_group_info_list.py +++ b/opal/models/update_group_info_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in groups (list) _items = [] if self.groups: - for _item in self.groups: - if _item: - _items.append(_item.to_dict()) + for _item_groups in self.groups: + if _item_groups: + _items.append(_item_groups.to_dict()) _dict['groups'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/update_group_resources_info.py b/opal/models/update_group_resources_info.py index ac4b909..01f77b8 100644 --- a/opal/models/update_group_resources_info.py +++ b/opal/models/update_group_resources_info.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in resources (list) _items = [] if self.resources: - for _item in self.resources: - if _item: - _items.append(_item.to_dict()) + for _item_resources in self.resources: + if _item_resources: + _items.append(_item_resources.to_dict()) _dict['resources'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/update_idp_group_mappings_request.py b/opal/models/update_idp_group_mappings_request.py new file mode 100644 index 0000000..628b2a7 --- /dev/null +++ b/opal/models/update_idp_group_mappings_request.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner +from typing import Optional, Set +from typing_extensions import Self + +class UpdateIdpGroupMappingsRequest(BaseModel): + """ + UpdateIdpGroupMappingsRequest + """ # noqa: E501 + mappings: List[UpdateIdpGroupMappingsRequestMappingsInner] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["mappings"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateIdpGroupMappingsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in mappings (list) + _items = [] + if self.mappings: + for _item_mappings in self.mappings: + if _item_mappings: + _items.append(_item_mappings.to_dict()) + _dict['mappings'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateIdpGroupMappingsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mappings": [UpdateIdpGroupMappingsRequestMappingsInner.from_dict(_item) for _item in obj["mappings"]] if obj.get("mappings") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/update_idp_group_mappings_request_mappings_inner.py b/opal/models/update_idp_group_mappings_request_mappings_inner.py new file mode 100644 index 0000000..c43b4a3 --- /dev/null +++ b/opal/models/update_idp_group_mappings_request_mappings_inner.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateIdpGroupMappingsRequestMappingsInner(BaseModel): + """ + UpdateIdpGroupMappingsRequestMappingsInner + """ # noqa: E501 + group_id: Optional[StrictStr] = None + alias: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["group_id", "alias"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateIdpGroupMappingsRequestMappingsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateIdpGroupMappingsRequestMappingsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id"), + "alias": obj.get("alias") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/opal/models/update_owner_info_list.py b/opal/models/update_owner_info_list.py index 0a9db97..823ce8a 100644 --- a/opal/models/update_owner_info_list.py +++ b/opal/models/update_owner_info_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in owners (list) _items = [] if self.owners: - for _item in self.owners: - if _item: - _items.append(_item.to_dict()) + for _item_owners in self.owners: + if _item_owners: + _items.append(_item_owners.to_dict()) _dict['owners'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/update_resource_info.py b/opal/models/update_resource_info.py index ffd0f0c..966659d 100644 --- a/opal/models/update_resource_info.py +++ b/opal/models/update_resource_info.py @@ -20,8 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList from opal.models.request_configuration import RequestConfiguration +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration from typing import Optional, Set from typing_extensions import Self @@ -42,13 +45,16 @@ class UpdateResourceInfo(BaseModel): require_mfa_to_request: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for requesting access to this resource. Deprecated in favor of `request_configurations`.") require_mfa_to_connect: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA to connect to this resource.") auto_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to automatically approve requests to this resource. Deprecated in favor of `request_configurations`.") + ticket_propagation: Optional[TicketPropagationConfiguration] = None + custom_request_notification: Optional[Annotated[str, Field(strict=True, max_length=800)]] = Field(default=None, description="Custom request notification sent upon request approval.") + risk_sensitivity_override: Optional[RiskSensitivityEnum] = None configuration_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated configuration template.") request_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated request template. Deprecated in favor of `request_configurations`.") is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`.") request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of configurations for requests to this resource. If not provided, the default request configuration will be used.") - request_configuration_list: Optional[CreateRequestConfigurationInfoList] = None + request_configuration_list: Optional[CreateRequestConfigurationInfoList] = Field(default=None, description="A list of configurations for requests to this resource. If not provided, the default request configuration will be used. Deprecated in favor of `request_configurations`.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["resource_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "configuration_template_id", "request_template_id", "is_requestable", "request_configurations", "request_configuration_list"] + __properties: ClassVar[List[str]] = ["resource_id", "name", "description", "admin_owner_id", "max_duration", "recommended_duration", "require_manager_approval", "require_support_ticket", "folder_id", "require_mfa_to_approve", "require_mfa_to_request", "require_mfa_to_connect", "auto_approval", "ticket_propagation", "custom_request_notification", "risk_sensitivity_override", "configuration_template_id", "request_template_id", "is_requestable", "request_configurations", "request_configuration_list"] model_config = ConfigDict( populate_by_name=True, @@ -91,12 +97,15 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of ticket_propagation + if self.ticket_propagation: + _dict['ticket_propagation'] = self.ticket_propagation.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in request_configurations (list) _items = [] if self.request_configurations: - for _item in self.request_configurations: - if _item: - _items.append(_item.to_dict()) + for _item_request_configurations in self.request_configurations: + if _item_request_configurations: + _items.append(_item_request_configurations.to_dict()) _dict['request_configurations'] = _items # override the default output from pydantic by calling `to_dict()` of request_configuration_list if self.request_configuration_list: @@ -131,6 +140,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "require_mfa_to_request": obj.get("require_mfa_to_request"), "require_mfa_to_connect": obj.get("require_mfa_to_connect"), "auto_approval": obj.get("auto_approval"), + "ticket_propagation": TicketPropagationConfiguration.from_dict(obj["ticket_propagation"]) if obj.get("ticket_propagation") is not None else None, + "custom_request_notification": obj.get("custom_request_notification"), + "risk_sensitivity_override": obj.get("risk_sensitivity_override"), "configuration_template_id": obj.get("configuration_template_id"), "request_template_id": obj.get("request_template_id"), "is_requestable": obj.get("is_requestable"), diff --git a/opal/models/update_resource_info_list.py b/opal/models/update_resource_info_list.py index d487c3f..29395a0 100644 --- a/opal/models/update_resource_info_list.py +++ b/opal/models/update_resource_info_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in resources (list) _items = [] if self.resources: - for _item in self.resources: - if _item: - _items.append(_item.to_dict()) + for _item_resources in self.resources: + if _item_resources: + _items.append(_item_resources.to_dict()) _dict['resources'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/models/user_list.py b/opal/models/user_list.py index f79d3ba..24b01b6 100644 --- a/opal/models/user_list.py +++ b/opal/models/user_list.py @@ -76,9 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of each item in users (list) _items = [] if self.users: - for _item in self.users: - if _item: - _items.append(_item.to_dict()) + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) _dict['users'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: diff --git a/opal/rest.py b/opal/rest.py index cb6edb1..fe4e015 100644 --- a/opal/rest.py +++ b/opal/rest.py @@ -203,6 +203,8 @@ def request( # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( method, url, @@ -224,7 +226,7 @@ def request( headers=headers, preload_content=False ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, diff --git a/pyproject.toml b/pyproject.toml index 740a5bc..e4dab13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,19 +10,20 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Opal API"] include = ["opal/py.typed"] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" +urllib3 = ">= 1.25.3 < 3.0.0" +python-dateutil = ">= 2.8.2" +pydantic = ">= 2" +typing-extensions = ">= 4.7.1" [tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" -types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" +pytest = ">= 7.2.1" +pytest-cov = ">= 2.8.1" +tox = ">= 3.9.0" +flake8 = ">= 4.0.0" +types-python-dateutil = ">= 2.8.19.14" +mypy = ">= 1.5" [build-system] diff --git a/requirements.txt b/requirements.txt index cc85509..e51ba9f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 urllib3 >= 1.25.3, < 2.1.0 +setuptools >= 21.0.0 +python_dateutil >= 2.5.3 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/setup.py b/setup.py index c027d12..be388ab 100644 --- a/setup.py +++ b/setup.py @@ -23,10 +23,10 @@ # http://pypi.python.org/pypi/setuptools NAME = "opal" VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" +PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", "pydantic >= 2", "typing-extensions >= 4.7.1", ] diff --git a/test-requirements.txt b/test-requirements.txt index 8e6d8cb..bb38d82 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,4 +2,4 @@ pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 mypy>=1.4.1 -types-python-dateutil>=2.8.19 +types-python-dateutil>=2.8.19 \ No newline at end of file diff --git a/test/test_access.py b/test/test_access.py new file mode 100644 index 0000000..b8caeed --- /dev/null +++ b/test/test_access.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.access import Access + +class TestAccess(unittest.TestCase): + """Access unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Access: + """Test Access + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Access` + """ + model = Access() + if include_optional: + return Access( + principal_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + principal_type = 'GROUP', + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_type = 'GROUP', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + expiration_date = '2022-01-23T04:56:07Z', + has_direct_access = True, + num_access_paths = 3 + ) + else: + return Access( + principal_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + principal_type = 'GROUP', + entity_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + entity_type = 'GROUP', + expiration_date = '2022-01-23T04:56:07Z', + has_direct_access = True, + num_access_paths = 3, + ) + """ + + def testAccess(self): + """Test Access""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_access_list.py b/test/test_access_list.py new file mode 100644 index 0000000..7895c15 --- /dev/null +++ b/test/test_access_list.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.access_list import AccessList + +class TestAccessList(unittest.TestCase): + """AccessList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccessList: + """Test AccessList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccessList` + """ + model = AccessList() + if include_optional: + return AccessList( + results = [ + {principal_id=29827fb8-f2dd-4e80-9576-28e31e9934ac, principal_type=RESOURCE, entity_id=1b978423-db0a-4037-a4cf-f79c60cb67b3, entity_type=RESOURCE, expiration_date=2022-01-23T04:56:07Z, has_direct_access=true, num_access_paths=3} + ] + ) + else: + return AccessList( + ) + """ + + def testAccessList(self): + """Test AccessList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_resource_nhi_request.py b/test/test_add_resource_nhi_request.py new file mode 100644 index 0000000..9457713 --- /dev/null +++ b/test/test_add_resource_nhi_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.add_resource_nhi_request import AddResourceNhiRequest + +class TestAddResourceNhiRequest(unittest.TestCase): + """AddResourceNhiRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddResourceNhiRequest: + """Test AddResourceNhiRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddResourceNhiRequest` + """ + model = AddResourceNhiRequest() + if include_optional: + return AddResourceNhiRequest( + duration_minutes = 60, + access_level_remote_id = 'roles/cloudsql.instanceUser' + ) + else: + return AddResourceNhiRequest( + duration_minutes = 60, + ) + """ + + def testAddResourceNhiRequest(self): + """Test AddResourceNhiRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_request200_response.py b/test/test_create_request200_response.py new file mode 100644 index 0000000..df05e8d --- /dev/null +++ b/test/test_create_request200_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.create_request200_response import CreateRequest200Response + +class TestCreateRequest200Response(unittest.TestCase): + """CreateRequest200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRequest200Response: + """Test CreateRequest200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRequest200Response` + """ + model = CreateRequest200Response() + if include_optional: + return CreateRequest200Response( + id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' + ) + else: + return CreateRequest200Response( + ) + """ + + def testCreateRequest200Response(self): + """Test CreateRequest200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_request_info.py b/test/test_create_request_info.py new file mode 100644 index 0000000..4b598d8 --- /dev/null +++ b/test/test_create_request_info.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.create_request_info import CreateRequestInfo + +class TestCreateRequestInfo(unittest.TestCase): + """CreateRequestInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRequestInfo: + """Test CreateRequestInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRequestInfo` + """ + model = CreateRequestInfo() + if include_optional: + return CreateRequestInfo( + resources = [ + opal.models.create_request_info_resources_inner.CreateRequestInfo_resources_inner( + id = 'group283-ca87-4a8a-bdbb-df212eca5353', + access_level_remote_id = 'arn:aws:iam::490306337630:role/SupportUser', + access_level_name = 'arn:aws:iam::490306337630:role/SupportUser', ) + ], + groups = [ + opal.models.create_request_info_groups_inner.CreateRequestInfo_groups_inner( + id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + access_level_remote_id = 'arn:aws:iam::490306337630:role/SupportUser', + access_level_name = 'arn:aws:iam::490306337630:role/SupportUser', ) + ], + target_user_id = 'userd283-ca87-4a8a-bdbb-df212eca5353', + target_group_id = 'userd283-ca87-4a8a-bdbb-df212eca5353', + reason = '', + support_ticket = opal.models.create_request_info_support_ticket.CreateRequestInfo_support_ticket( + ticketing_provider = 'LINEAR', + remote_id = '', + identifier = '', + url = '', ), + duration_minutes = -1, + custom_metadata = [ + opal.models.create_request_info_custom_metadata_inner.CreateRequestInfo_custom_metadata_inner( + name = '', + type = 'SHORT_TEXT', + value = '', ) + ] + ) + else: + return CreateRequestInfo( + resources = [ + opal.models.create_request_info_resources_inner.CreateRequestInfo_resources_inner( + id = 'group283-ca87-4a8a-bdbb-df212eca5353', + access_level_remote_id = 'arn:aws:iam::490306337630:role/SupportUser', + access_level_name = 'arn:aws:iam::490306337630:role/SupportUser', ) + ], + groups = [ + opal.models.create_request_info_groups_inner.CreateRequestInfo_groups_inner( + id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + access_level_remote_id = 'arn:aws:iam::490306337630:role/SupportUser', + access_level_name = 'arn:aws:iam::490306337630:role/SupportUser', ) + ], + reason = '', + duration_minutes = -1, + ) + """ + + def testCreateRequestInfo(self): + """Test CreateRequestInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_request_info_custom_metadata_inner.py b/test/test_create_request_info_custom_metadata_inner.py new file mode 100644 index 0000000..aad20c0 --- /dev/null +++ b/test/test_create_request_info_custom_metadata_inner.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner + +class TestCreateRequestInfoCustomMetadataInner(unittest.TestCase): + """CreateRequestInfoCustomMetadataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRequestInfoCustomMetadataInner: + """Test CreateRequestInfoCustomMetadataInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRequestInfoCustomMetadataInner` + """ + model = CreateRequestInfoCustomMetadataInner() + if include_optional: + return CreateRequestInfoCustomMetadataInner( + name = '', + type = 'SHORT_TEXT', + value = '' + ) + else: + return CreateRequestInfoCustomMetadataInner( + name = '', + type = 'SHORT_TEXT', + value = '', + ) + """ + + def testCreateRequestInfoCustomMetadataInner(self): + """Test CreateRequestInfoCustomMetadataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_request_info_groups_inner.py b/test/test_create_request_info_groups_inner.py new file mode 100644 index 0000000..7308c20 --- /dev/null +++ b/test/test_create_request_info_groups_inner.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner + +class TestCreateRequestInfoGroupsInner(unittest.TestCase): + """CreateRequestInfoGroupsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRequestInfoGroupsInner: + """Test CreateRequestInfoGroupsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRequestInfoGroupsInner` + """ + model = CreateRequestInfoGroupsInner() + if include_optional: + return CreateRequestInfoGroupsInner( + id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + access_level_remote_id = 'arn:aws:iam::490306337630:role/SupportUser', + access_level_name = 'arn:aws:iam::490306337630:role/SupportUser' + ) + else: + return CreateRequestInfoGroupsInner( + id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', + ) + """ + + def testCreateRequestInfoGroupsInner(self): + """Test CreateRequestInfoGroupsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_request_info_resources_inner.py b/test/test_create_request_info_resources_inner.py new file mode 100644 index 0000000..5d45de8 --- /dev/null +++ b/test/test_create_request_info_resources_inner.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner + +class TestCreateRequestInfoResourcesInner(unittest.TestCase): + """CreateRequestInfoResourcesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRequestInfoResourcesInner: + """Test CreateRequestInfoResourcesInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRequestInfoResourcesInner` + """ + model = CreateRequestInfoResourcesInner() + if include_optional: + return CreateRequestInfoResourcesInner( + id = 'group283-ca87-4a8a-bdbb-df212eca5353', + access_level_remote_id = 'arn:aws:iam::490306337630:role/SupportUser', + access_level_name = 'arn:aws:iam::490306337630:role/SupportUser' + ) + else: + return CreateRequestInfoResourcesInner( + ) + """ + + def testCreateRequestInfoResourcesInner(self): + """Test CreateRequestInfoResourcesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_request_info_support_ticket.py b/test/test_create_request_info_support_ticket.py new file mode 100644 index 0000000..69e561d --- /dev/null +++ b/test/test_create_request_info_support_ticket.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket + +class TestCreateRequestInfoSupportTicket(unittest.TestCase): + """CreateRequestInfoSupportTicket unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRequestInfoSupportTicket: + """Test CreateRequestInfoSupportTicket + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRequestInfoSupportTicket` + """ + model = CreateRequestInfoSupportTicket() + if include_optional: + return CreateRequestInfoSupportTicket( + ticketing_provider = 'LINEAR', + remote_id = '', + identifier = '', + url = '' + ) + else: + return CreateRequestInfoSupportTicket( + ticketing_provider = 'LINEAR', + remote_id = '', + identifier = '', + url = '', + ) + """ + + def testCreateRequestInfoSupportTicket(self): + """Test CreateRequestInfoSupportTicket""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_idp_group_mapping.py b/test/test_idp_group_mapping.py new file mode 100644 index 0000000..14150b1 --- /dev/null +++ b/test/test_idp_group_mapping.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.idp_group_mapping import IdpGroupMapping + +class TestIdpGroupMapping(unittest.TestCase): + """IdpGroupMapping unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IdpGroupMapping: + """Test IdpGroupMapping + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IdpGroupMapping` + """ + model = IdpGroupMapping() + if include_optional: + return IdpGroupMapping( + id = '7870617d-e72a-47f5-a84c-693817ab4567', + organization_id = '1520617d-e72a-47f5-a84c-693817ab48ad2', + app_resource_id = '6f99639b-7928-4043-8184-47cbc6766145', + group_id = '6f99639b-7928-4043-8184-47cbc6766145', + alias = 'finance-team', + hidden_from_end_user = False + ) + else: + return IdpGroupMapping( + id = '7870617d-e72a-47f5-a84c-693817ab4567', + organization_id = '1520617d-e72a-47f5-a84c-693817ab48ad2', + app_resource_id = '6f99639b-7928-4043-8184-47cbc6766145', + group_id = '6f99639b-7928-4043-8184-47cbc6766145', + hidden_from_end_user = False, + ) + """ + + def testIdpGroupMapping(self): + """Test IdpGroupMapping""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_idp_group_mapping_list.py b/test/test_idp_group_mapping_list.py new file mode 100644 index 0000000..85c2558 --- /dev/null +++ b/test/test_idp_group_mapping_list.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.idp_group_mapping_list import IdpGroupMappingList + +class TestIdpGroupMappingList(unittest.TestCase): + """IdpGroupMappingList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IdpGroupMappingList: + """Test IdpGroupMappingList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IdpGroupMappingList` + """ + model = IdpGroupMappingList() + if include_optional: + return IdpGroupMappingList( + idp_group_mappings = [ + {id=7870617d-e72a-47f5-a84c-693817ab4567, organization_id=1520617d-e72a-47f5-a84c-693817ab48ad2, app_resource_id=6f99639b-7928-4043-8184-47cbc6766145, group_id=6f99639b-7928-4043-8184-47cbc6766145, alias=finance-team, hidden_from_end_user=false} + ] + ) + else: + return IdpGroupMappingList( + idp_group_mappings = [ + {id=7870617d-e72a-47f5-a84c-693817ab4567, organization_id=1520617d-e72a-47f5-a84c-693817ab48ad2, app_resource_id=6f99639b-7928-4043-8184-47cbc6766145, group_id=6f99639b-7928-4043-8184-47cbc6766145, alias=finance-team, hidden_from_end_user=false} + ], + ) + """ + + def testIdpGroupMappingList(self): + """Test IdpGroupMappingList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_idp_group_mappings_api.py b/test/test_idp_group_mappings_api.py new file mode 100644 index 0000000..5fd9724 --- /dev/null +++ b/test/test_idp_group_mappings_api.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.api.idp_group_mappings_api import IdpGroupMappingsApi + + +class TestIdpGroupMappingsApi(unittest.TestCase): + """IdpGroupMappingsApi unit test stubs""" + + def setUp(self) -> None: + self.api = IdpGroupMappingsApi() + + def tearDown(self) -> None: + pass + + def test_delete_idp_group_mappings_by_app_resource_id_group_id(self) -> None: + """Test case for delete_idp_group_mappings_by_app_resource_id_group_id + + """ + pass + + def test_get_idp_group_mappings(self) -> None: + """Test case for get_idp_group_mappings + + """ + pass + + def test_update_idp_group_mappings(self) -> None: + """Test case for update_idp_group_mappings + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_non_human_identities_api.py b/test/test_non_human_identities_api.py new file mode 100644 index 0000000..ead3aa7 --- /dev/null +++ b/test/test_non_human_identities_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.api.non_human_identities_api import NonHumanIdentitiesApi + + +class TestNonHumanIdentitiesApi(unittest.TestCase): + """NonHumanIdentitiesApi unit test stubs""" + + def setUp(self) -> None: + self.api = NonHumanIdentitiesApi() + + def tearDown(self) -> None: + pass + + def test_get_nhis(self) -> None: + """Test case for get_nhis + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_nhi.py b/test/test_resource_nhi.py new file mode 100644 index 0000000..1397b74 --- /dev/null +++ b/test/test_resource_nhi.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.resource_nhi import ResourceNHI + +class TestResourceNHI(unittest.TestCase): + """ResourceNHI unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceNHI: + """Test ResourceNHI + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceNHI` + """ + model = ResourceNHI() + if include_optional: + return ResourceNHI( + resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + non_human_identity_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac', + access_level = {access_level_name=AdminRole, access_level_remote_id=arn:aws:iam::590304332660:role/AdministratorAccess}, + expiration_date = '2022-01-23T04:56:07Z' + ) + else: + return ResourceNHI( + resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3', + non_human_identity_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac', + expiration_date = '2022-01-23T04:56:07Z', + ) + """ + + def testResourceNHI(self): + """Test ResourceNHI""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_remote_info_gcp_service_account.py b/test/test_resource_remote_info_gcp_service_account.py new file mode 100644 index 0000000..066da03 --- /dev/null +++ b/test/test_resource_remote_info_gcp_service_account.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount + +class TestResourceRemoteInfoGcpServiceAccount(unittest.TestCase): + """ResourceRemoteInfoGcpServiceAccount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceRemoteInfoGcpServiceAccount: + """Test ResourceRemoteInfoGcpServiceAccount + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ResourceRemoteInfoGcpServiceAccount` + """ + model = ResourceRemoteInfoGcpServiceAccount() + if include_optional: + return ResourceRemoteInfoGcpServiceAccount( + email = 'production@project.iam.gserviceaccount.com', + service_account_id = '103561576023829463298', + project_id = 'example-project-898931321' + ) + else: + return ResourceRemoteInfoGcpServiceAccount( + email = 'production@project.iam.gserviceaccount.com', + service_account_id = '103561576023829463298', + project_id = 'example-project-898931321', + ) + """ + + def testResourceRemoteInfoGcpServiceAccount(self): + """Test ResourceRemoteInfoGcpServiceAccount""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_risk_sensitivity_enum.py b/test/test_risk_sensitivity_enum.py new file mode 100644 index 0000000..f88d015 --- /dev/null +++ b/test/test_risk_sensitivity_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.risk_sensitivity_enum import RiskSensitivityEnum + +class TestRiskSensitivityEnum(unittest.TestCase): + """RiskSensitivityEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRiskSensitivityEnum(self): + """Test RiskSensitivityEnum""" + # inst = RiskSensitivityEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ticket_propagation_configuration.py b/test/test_ticket_propagation_configuration.py new file mode 100644 index 0000000..f4f8334 --- /dev/null +++ b/test/test_ticket_propagation_configuration.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration + +class TestTicketPropagationConfiguration(unittest.TestCase): + """TicketPropagationConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TicketPropagationConfiguration: + """Test TicketPropagationConfiguration + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TicketPropagationConfiguration` + """ + model = TicketPropagationConfiguration() + if include_optional: + return TicketPropagationConfiguration( + enabled_on_grant = True, + enabled_on_revocation = True, + ticket_provider = 'LINEAR', + ticket_project_id = '' + ) + else: + return TicketPropagationConfiguration( + enabled_on_grant = True, + enabled_on_revocation = True, + ) + """ + + def testTicketPropagationConfiguration(self): + """Test TicketPropagationConfiguration""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ticketing_provider_enum.py b/test/test_ticketing_provider_enum.py new file mode 100644 index 0000000..8f58438 --- /dev/null +++ b/test/test_ticketing_provider_enum.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.ticketing_provider_enum import TicketingProviderEnum + +class TestTicketingProviderEnum(unittest.TestCase): + """TicketingProviderEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTicketingProviderEnum(self): + """Test TicketingProviderEnum""" + # inst = TicketingProviderEnum() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_idp_group_mappings_request.py b/test/test_update_idp_group_mappings_request.py new file mode 100644 index 0000000..ede7a8c --- /dev/null +++ b/test/test_update_idp_group_mappings_request.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest + +class TestUpdateIdpGroupMappingsRequest(unittest.TestCase): + """UpdateIdpGroupMappingsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateIdpGroupMappingsRequest: + """Test UpdateIdpGroupMappingsRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateIdpGroupMappingsRequest` + """ + model = UpdateIdpGroupMappingsRequest() + if include_optional: + return UpdateIdpGroupMappingsRequest( + mappings = [ + opal.models.update_idp_group_mappings_request_mappings_inner.updateIdpGroupMappings_request_mappings_inner( + group_id = '', + alias = '', ) + ] + ) + else: + return UpdateIdpGroupMappingsRequest( + mappings = [ + opal.models.update_idp_group_mappings_request_mappings_inner.updateIdpGroupMappings_request_mappings_inner( + group_id = '', + alias = '', ) + ], + ) + """ + + def testUpdateIdpGroupMappingsRequest(self): + """Test UpdateIdpGroupMappingsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_idp_group_mappings_request_mappings_inner.py b/test/test_update_idp_group_mappings_request_mappings_inner.py new file mode 100644 index 0000000..1a2b920 --- /dev/null +++ b/test/test_update_idp_group_mappings_request_mappings_inner.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Opal API + + Your Home For Developer Resources. + + The version of the OpenAPI document: 1.0 + Contact: hello@opal.dev + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner + +class TestUpdateIdpGroupMappingsRequestMappingsInner(unittest.TestCase): + """UpdateIdpGroupMappingsRequestMappingsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateIdpGroupMappingsRequestMappingsInner: + """Test UpdateIdpGroupMappingsRequestMappingsInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateIdpGroupMappingsRequestMappingsInner` + """ + model = UpdateIdpGroupMappingsRequestMappingsInner() + if include_optional: + return UpdateIdpGroupMappingsRequestMappingsInner( + group_id = '', + alias = '' + ) + else: + return UpdateIdpGroupMappingsRequestMappingsInner( + ) + """ + + def testUpdateIdpGroupMappingsRequestMappingsInner(self): + """Test UpdateIdpGroupMappingsRequestMappingsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()