diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
new file mode 100644
index 0000000..d639f56
--- /dev/null
+++ b/.github/workflows/python.yml
@@ -0,0 +1,38 @@
+# NOTE: This file is auto generated by OpenAPI Generator.
+# URL: https://openapi-generator.tech
+#
+# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
+
+name: opal Python package
+
+on: [push, pull_request]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8 pytest
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
+ - name: Lint with flake8
+ run: |
+ # stop the build if there are Python syntax errors or undefined names
+ flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+ - name: Test with pytest
+ run: |
+ pytest
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f06494a..6f3d480 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,24 +1,31 @@
+# NOTE: This file is auto generated by OpenAPI Generator.
+# URL: https://openapi-generator.tech
+#
# ref: https://docs.gitlab.com/ee/ci/README.html
+# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
stages:
- test
-.tests:
+.pytest:
stage: test
script:
- pip install -r requirements.txt
- pip install -r test-requirements.txt
- pytest --cov=opal
-test-3.6:
- extends: .tests
- image: python:3.6-alpine
-test-3.7:
- extends: .tests
+pytest-3.7:
+ extends: .pytest
image: python:3.7-alpine
-test-3.8:
- extends: .tests
+pytest-3.8:
+ extends: .pytest
image: python:3.8-alpine
-test-3.9:
- extends: .tests
+pytest-3.9:
+ extends: .pytest
image: python:3.9-alpine
+pytest-3.10:
+ extends: .pytest
+ image: python:3.10-alpine
+pytest-3.11:
+ extends: .pytest
+ image: python:3.11-alpine
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 172513a..2136f61 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -1,123 +1,312 @@
+.github/workflows/python.yml
.gitignore
.gitlab-ci.yml
.travis.yml
README.md
+docs/AddGroupResourceRequest.md
+docs/AddGroupUserRequest.md
+docs/AddResourceUserRequest.md
+docs/App.md
+docs/AppTypeEnum.md
+docs/AppsApi.md
+docs/AppsList.md
+docs/AwsPermissionSetMetadata.md
+docs/AwsPermissionSetMetadataAwsPermissionSet.md
+docs/Condition.md
+docs/ConfigurationTemplate.md
+docs/ConfigurationTemplatesApi.md
+docs/CreateConfigurationTemplateInfo.md
+docs/CreateGroupBindingInfo.md
+docs/CreateGroupBindingInfoGroupsInner.md
+docs/CreateGroupInfo.md
+docs/CreateMessageChannelInfo.md
+docs/CreateOnCallScheduleInfo.md
+docs/CreateOwnerInfo.md
+docs/CreateRequestConfigurationInfoList.md
+docs/CreateResourceInfo.md
+docs/CreateTagInfo.md
+docs/CreateUARInfo.md
docs/EntityTypeEnum.md
docs/Event.md
docs/EventsApi.md
docs/Group.md
-docs/GroupFunctionEnum.md
+docs/GroupAccessLevel.md
+docs/GroupBinding.md
+docs/GroupBindingGroup.md
+docs/GroupBindingsApi.md
+docs/GroupRemoteInfo.md
+docs/GroupRemoteInfoActiveDirectoryGroup.md
+docs/GroupRemoteInfoAzureAdMicrosoft365Group.md
+docs/GroupRemoteInfoAzureAdSecurityGroup.md
+docs/GroupRemoteInfoDuoGroup.md
+docs/GroupRemoteInfoGithubTeam.md
+docs/GroupRemoteInfoGitlabGroup.md
+docs/GroupRemoteInfoGoogleGroup.md
+docs/GroupRemoteInfoLdapGroup.md
+docs/GroupRemoteInfoOktaGroup.md
+docs/GroupResource.md
+docs/GroupResourceList.md
docs/GroupTypeEnum.md
+docs/GroupUser.md
+docs/GroupUserList.md
docs/GroupsApi.md
docs/MessageChannel.md
docs/MessageChannelIDList.md
docs/MessageChannelList.md
docs/MessageChannelProviderEnum.md
-docs/MessageChannelTypeEnum.md
-docs/NewAdminIDList.md
+docs/MessageChannelsApi.md
+docs/OnCallSchedule.md
+docs/OnCallScheduleIDList.md
+docs/OnCallScheduleList.md
+docs/OnCallScheduleProviderEnum.md
+docs/OnCallSchedulesApi.md
+docs/Owner.md
+docs/OwnersApi.md
+docs/PaginatedConfigurationTemplateList.md
docs/PaginatedEventList.md
+docs/PaginatedGroupBindingsList.md
docs/PaginatedGroupsList.md
-docs/PaginatedResourceUserList.md
+docs/PaginatedOwnersList.md
docs/PaginatedResourcesList.md
+docs/PaginatedTagsList.md
+docs/PaginatedUARsList.md
+docs/PaginatedUsersList.md
+docs/Request.md
+docs/RequestConfiguration.md
+docs/RequestCustomFieldResponse.md
+docs/RequestCustomFieldResponseFieldValue.md
+docs/RequestList.md
+docs/RequestStatusEnum.md
+docs/RequestTemplateCustomFieldTypeEnum.md
+docs/RequestedItem.md
+docs/RequestsApi.md
docs/Resource.md
docs/ResourceAccessLevel.md
+docs/ResourceAccessUser.md
+docs/ResourceAccessUserList.md
+docs/ResourceRemoteInfo.md
+docs/ResourceRemoteInfoAwsAccount.md
+docs/ResourceRemoteInfoAwsEc2Instance.md
+docs/ResourceRemoteInfoAwsEksCluster.md
+docs/ResourceRemoteInfoAwsIamRole.md
+docs/ResourceRemoteInfoAwsPermissionSet.md
+docs/ResourceRemoteInfoAwsRdsInstance.md
+docs/ResourceRemoteInfoGcpBigQueryDataset.md
+docs/ResourceRemoteInfoGcpBigQueryTable.md
+docs/ResourceRemoteInfoGcpBucket.md
+docs/ResourceRemoteInfoGcpComputeInstance.md
+docs/ResourceRemoteInfoGcpFolder.md
+docs/ResourceRemoteInfoGcpGkeCluster.md
+docs/ResourceRemoteInfoGcpOrganization.md
+docs/ResourceRemoteInfoGcpProject.md
+docs/ResourceRemoteInfoGcpSqlInstance.md
+docs/ResourceRemoteInfoGithubRepo.md
+docs/ResourceRemoteInfoGitlabProject.md
+docs/ResourceRemoteInfoOktaApp.md
+docs/ResourceRemoteInfoOktaCustomRole.md
+docs/ResourceRemoteInfoOktaStandardRole.md
+docs/ResourceRemoteInfoPagerdutyRole.md
+docs/ResourceRemoteInfoSalesforcePermissionSet.md
+docs/ResourceRemoteInfoSalesforceProfile.md
+docs/ResourceRemoteInfoSalesforceRole.md
+docs/ResourceRemoteInfoTeleportRole.md
docs/ResourceTypeEnum.md
docs/ResourceUser.md
docs/ResourceUserAccessStatus.md
docs/ResourceUserAccessStatusEnum.md
+docs/ResourceWithAccessLevel.md
docs/ResourcesApi.md
docs/ReviewerIDList.md
+docs/ReviewerStage.md
+docs/ReviewerStageList.md
docs/Session.md
docs/SessionsApi.md
docs/SessionsList.md
+docs/SubEvent.md
docs/Tag.md
+docs/TagFilter.md
docs/TagsApi.md
docs/TagsList.md
+docs/UAR.md
+docs/UARReviewerAssignmentPolicyEnum.md
+docs/UARScope.md
+docs/UarsApi.md
+docs/UpdateConfigurationTemplateInfo.md
+docs/UpdateGroupBindingInfo.md
+docs/UpdateGroupBindingInfoList.md
docs/UpdateGroupInfo.md
docs/UpdateGroupInfoList.md
+docs/UpdateGroupResourcesInfo.md
+docs/UpdateOwnerInfo.md
+docs/UpdateOwnerInfoList.md
docs/UpdateResourceInfo.md
docs/UpdateResourceInfoList.md
docs/User.md
+docs/UserHrIdpStatusEnum.md
+docs/UserIDList.md
+docs/UserList.md
docs/UsersApi.md
-docs/UsersList.md
-docs/VisibilityEnum.md
+docs/VisibilityInfo.md
+docs/VisibilityTypeEnum.md
git_push.sh
opal/__init__.py
opal/api/__init__.py
+opal/api/apps_api.py
+opal/api/configuration_templates_api.py
opal/api/events_api.py
+opal/api/group_bindings_api.py
opal/api/groups_api.py
+opal/api/message_channels_api.py
+opal/api/on_call_schedules_api.py
+opal/api/owners_api.py
+opal/api/requests_api.py
opal/api/resources_api.py
opal/api/sessions_api.py
opal/api/tags_api.py
+opal/api/uars_api.py
opal/api/users_api.py
opal/api_client.py
-opal/apis/__init__.py
+opal/api_response.py
opal/configuration.py
opal/exceptions.py
-opal/model/__init__.py
-opal/model/entity_type_enum.py
-opal/model/event.py
-opal/model/group.py
-opal/model/group_function_enum.py
-opal/model/group_type_enum.py
-opal/model/message_channel.py
-opal/model/message_channel_id_list.py
-opal/model/message_channel_list.py
-opal/model/message_channel_provider_enum.py
-opal/model/message_channel_type_enum.py
-opal/model/new_admin_id_list.py
-opal/model/paginated_event_list.py
-opal/model/paginated_groups_list.py
-opal/model/paginated_resource_user_list.py
-opal/model/paginated_resources_list.py
-opal/model/resource.py
-opal/model/resource_access_level.py
-opal/model/resource_type_enum.py
-opal/model/resource_user.py
-opal/model/resource_user_access_status.py
-opal/model/resource_user_access_status_enum.py
-opal/model/reviewer_id_list.py
-opal/model/session.py
-opal/model/sessions_list.py
-opal/model/tag.py
-opal/model/tags_list.py
-opal/model/update_group_info.py
-opal/model/update_group_info_list.py
-opal/model/update_resource_info.py
-opal/model/update_resource_info_list.py
-opal/model/user.py
-opal/model/users_list.py
-opal/model/visibility_enum.py
-opal/model_utils.py
opal/models/__init__.py
+opal/models/add_group_resource_request.py
+opal/models/add_group_user_request.py
+opal/models/add_resource_user_request.py
+opal/models/app.py
+opal/models/app_type_enum.py
+opal/models/apps_list.py
+opal/models/aws_permission_set_metadata.py
+opal/models/aws_permission_set_metadata_aws_permission_set.py
+opal/models/condition.py
+opal/models/configuration_template.py
+opal/models/create_configuration_template_info.py
+opal/models/create_group_binding_info.py
+opal/models/create_group_binding_info_groups_inner.py
+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_request_configuration_info_list.py
+opal/models/create_resource_info.py
+opal/models/create_tag_info.py
+opal/models/create_uar_info.py
+opal/models/entity_type_enum.py
+opal/models/event.py
+opal/models/group.py
+opal/models/group_access_level.py
+opal/models/group_binding.py
+opal/models/group_binding_group.py
+opal/models/group_remote_info.py
+opal/models/group_remote_info_active_directory_group.py
+opal/models/group_remote_info_azure_ad_microsoft365_group.py
+opal/models/group_remote_info_azure_ad_security_group.py
+opal/models/group_remote_info_duo_group.py
+opal/models/group_remote_info_github_team.py
+opal/models/group_remote_info_gitlab_group.py
+opal/models/group_remote_info_google_group.py
+opal/models/group_remote_info_ldap_group.py
+opal/models/group_remote_info_okta_group.py
+opal/models/group_resource.py
+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/message_channel.py
+opal/models/message_channel_id_list.py
+opal/models/message_channel_list.py
+opal/models/message_channel_provider_enum.py
+opal/models/on_call_schedule.py
+opal/models/on_call_schedule_id_list.py
+opal/models/on_call_schedule_list.py
+opal/models/on_call_schedule_provider_enum.py
+opal/models/owner.py
+opal/models/paginated_configuration_template_list.py
+opal/models/paginated_event_list.py
+opal/models/paginated_group_bindings_list.py
+opal/models/paginated_groups_list.py
+opal/models/paginated_owners_list.py
+opal/models/paginated_resources_list.py
+opal/models/paginated_tags_list.py
+opal/models/paginated_uars_list.py
+opal/models/paginated_users_list.py
+opal/models/request.py
+opal/models/request_configuration.py
+opal/models/request_custom_field_response.py
+opal/models/request_custom_field_response_field_value.py
+opal/models/request_list.py
+opal/models/request_status_enum.py
+opal/models/request_template_custom_field_type_enum.py
+opal/models/requested_item.py
+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_remote_info.py
+opal/models/resource_remote_info_aws_account.py
+opal/models/resource_remote_info_aws_ec2_instance.py
+opal/models/resource_remote_info_aws_eks_cluster.py
+opal/models/resource_remote_info_aws_iam_role.py
+opal/models/resource_remote_info_aws_permission_set.py
+opal/models/resource_remote_info_aws_rds_instance.py
+opal/models/resource_remote_info_gcp_big_query_dataset.py
+opal/models/resource_remote_info_gcp_big_query_table.py
+opal/models/resource_remote_info_gcp_bucket.py
+opal/models/resource_remote_info_gcp_compute_instance.py
+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_sql_instance.py
+opal/models/resource_remote_info_github_repo.py
+opal/models/resource_remote_info_gitlab_project.py
+opal/models/resource_remote_info_okta_app.py
+opal/models/resource_remote_info_okta_custom_role.py
+opal/models/resource_remote_info_okta_standard_role.py
+opal/models/resource_remote_info_pagerduty_role.py
+opal/models/resource_remote_info_salesforce_permission_set.py
+opal/models/resource_remote_info_salesforce_profile.py
+opal/models/resource_remote_info_salesforce_role.py
+opal/models/resource_remote_info_teleport_role.py
+opal/models/resource_type_enum.py
+opal/models/resource_user.py
+opal/models/resource_user_access_status.py
+opal/models/resource_user_access_status_enum.py
+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/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/uar.py
+opal/models/uar_reviewer_assignment_policy_enum.py
+opal/models/uar_scope.py
+opal/models/update_configuration_template_info.py
+opal/models/update_group_binding_info.py
+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_owner_info.py
+opal/models/update_owner_info_list.py
+opal/models/update_resource_info.py
+opal/models/update_resource_info_list.py
+opal/models/user.py
+opal/models/user_hr_idp_status_enum.py
+opal/models/user_id_list.py
+opal/models/user_list.py
+opal/models/visibility_info.py
+opal/models/visibility_type_enum.py
+opal/py.typed
opal/rest.py
+pyproject.toml
requirements.txt
setup.cfg
setup.py
test-requirements.txt
test/__init__.py
-test/test_entity_type_enum.py
-test/test_group.py
-test/test_group_function_enum.py
-test/test_group_type_enum.py
-test/test_groups_api.py
-test/test_message_channel.py
-test/test_message_channel_id_list.py
-test/test_message_channel_list.py
-test/test_message_channel_provider_enum.py
-test/test_message_channel_type_enum.py
-test/test_new_admin_id_list.py
-test/test_paginated_groups_list.py
-test/test_paginated_resources_list.py
-test/test_resource.py
-test/test_resource_type_enum.py
-test/test_reviewer_id_list.py
-test/test_tag.py
-test/test_tags_api.py
-test/test_tags_list.py
-test/test_update_group_info.py
-test/test_update_group_info_list.py
-test/test_update_resource_info.py
-test/test_update_resource_info_list.py
-test/test_visibility_enum.py
tox.ini
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
index 1e20ec3..ba7f754 100644
--- a/.openapi-generator/VERSION
+++ b/.openapi-generator/VERSION
@@ -1 +1 @@
-5.4.0
\ No newline at end of file
+7.4.0
diff --git a/.openapi-generator/templates/common_README.mustache b/.openapi-generator/templates/common_README.mustache
new file mode 100644
index 0000000..e78d5ee
--- /dev/null
+++ b/.openapi-generator/templates/common_README.mustache
@@ -0,0 +1,126 @@
+```python
+{{#apiInfo}}{{#apis}}{{#-last}}{{#hasHttpSignatureMethods}}import datetime{{/hasHttpSignatureMethods}}{{/-last}}{{/apis}}{{/apiInfo}}
+import {{{packageName}}}
+from {{{packageName}}}.rest import ApiException
+from pprint import pprint
+{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
+{{> python_doc_auth_partial}}
+
+# Enter a context with an instance of the API client
+{{#asyncio}}async {{/asyncio}}with {{{packageName}}}.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = {{{packageName}}}.{{{classname}}}(api_client)
+ {{#allParams}}
+ {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
+ {{/allParams}}
+
+ try:
+ {{#summary}}
+ # {{{.}}}
+ {{/summary}}
+ {{#returnType}}api_response = {{/returnType}}{{#asyncio}}await {{/asyncio}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
+ {{#returnType}}
+ print("The response of {{classname}}->{{operationId}}:\n")
+ pprint(api_response)
+ {{/returnType}}
+ except ApiException as e:
+ print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e)
+{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
+```
+
+Example with Events API:
+
+```python
+import time
+import opal
+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 = 'YOUR_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.EventsApi(api_client)
+ start_date_filter = "2021/11/01" # str | A start date filter for the events. (optional)
+ end_date_filter = "2021-11-12" # str | An end date filter for the events. (optional)
+ actor_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An actor filter for the events. Supply the ID of the actor. (optional)
+ object_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An object filter for the events. Supply the ID of the object. (optional)
+ event_type_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An event type filter for the events. (optional)
+ 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.events(start_date_filter=start_date_filter, end_date_filter=end_date_filter, actor_filter=actor_filter, object_filter=object_filter, event_type_filter=event_type_filter, cursor=cursor, page_size=page_size)
+ pprint(api_response.dict())
+ except opal.ApiException as e:
+ print("Exception when calling EventsApi->events: %s\n" % e)
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *{{{basePath}}}*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}}
+{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
+
+## Documentation For Models
+
+{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
+{{/model}}{{/models}}
+
+
+## Documentation For Authorization
+
+{{^authMethods}}Endpoints do not require authorization.{{/authMethods}}
+{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}}
+{{#authMethods}}
+
+### {{{name}}}
+
+{{#isApiKey}}
+- **Type**: API key
+- **API key parameter name**: {{{keyParamName}}}
+- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
+{{/isApiKey}}
+{{#isBasic}}
+{{#isBasicBasic}}
+- **Type**: HTTP basic authentication
+{{/isBasicBasic}}
+{{#isBasicBearer}}
+- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
+{{/isBasicBearer}}
+{{#isHttpSignature}}
+- **Type**: HTTP signature authentication
+{{/isHttpSignature}}
+{{/isBasic}}
+{{#isOAuth}}
+- **Type**: OAuth
+- **Flow**: {{{flow}}}
+- **Authorization URL**: {{{authorizationUrl}}}
+- **Scopes**: {{^scopes}}N/A{{/scopes}}
+{{#scopes}} - **{{{scope}}}**: {{{description}}}
+{{/scopes}}
+{{/isOAuth}}
+
+{{/authMethods}}
+
+## Author
+
+{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}}
+{{/-last}}{{/apis}}{{/apiInfo}}
diff --git a/.openapi-generator/templates/github-workflow.mustache b/.openapi-generator/templates/github-workflow.mustache
new file mode 100644
index 0000000..a78752b
--- /dev/null
+++ b/.openapi-generator/templates/github-workflow.mustache
@@ -0,0 +1,39 @@
+# NOTE: This file is auto generated by OpenAPI Generator.
+# URL: https://openapi-generator.tech
+#
+# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
+
+name: {{packageName}} Python package
+{{=<% %>=}}
+
+on: [push, pull_request]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8 pytest
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
+ - name: Lint with flake8
+ run: |
+ # stop the build if there are Python syntax errors or undefined names
+ flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+ - name: Test with pytest
+ run: |
+ pytest
diff --git a/.travis.yml b/.travis.yml
index 22062d8..406fe06 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,14 @@
# ref: https://docs.travis-ci.com/user/languages/python
language: python
python:
- - "3.6"
- "3.7"
- "3.8"
- "3.9"
+ - "3.10"
+ - "3.11"
+ # uncomment the following if needed
+ #- "3.11-dev" # 3.11 development branch
+ #- "nightly" # nightly build
# command to install dependencies
install:
- "pip install -r requirements.txt"
diff --git a/Makefile b/Makefile
index 4e84851..11c5004 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
-SHELL := /bin/bash
+SHELL:=/bin/bash
+PYTHON_POST_PROCESS_FILE=python -m black
-OPENAPI_GEN=openapi-generator generate -i api/openapi.yaml -g python -o . -c config.json
+OPENAPI_GEN=openapi-generator generate --enable-post-process-file -i api/openapi.yaml -g python -o . -c config.json -t .openapi-generator/templates
gen-openapi:
$(OPENAPI_GEN)
diff --git a/README.md b/README.md
index b5a0386..26f8835 100644
--- a/README.md
+++ b/README.md
@@ -5,12 +5,13 @@ 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
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.opal.dev/](https://www.opal.dev/)
## Requirements.
-Python >=3.6
+Python 3.7+
## Installation & Usage
### pip install
@@ -20,7 +21,7 @@ If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/opalsecurity/opal-python.git
```
-(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/opalsecurity/opal-pythong.git`)
+(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/opalsecurity/opal-python.git`)
Then import the package:
```python
@@ -41,17 +42,58 @@ Then import the package:
import opal
```
+### Tests
+
+Execute `pytest` to run the tests.
+
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```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.AppsApi(api_client)
+ app_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the app.
+
+ try:
+ api_response = api_instance.get_app(app_id)
+ print("The response of AppsApi->get_app:\n")
+ pprint(api_response)
+ except ApiException as e:
+ print("Exception when calling AppsApi->get_app: %s\n" % e)
+
+```
+
+Example with Events API:
+
+```python
import time
import opal
from pprint import pprint
-from opal.api import events_api
-from opal.model.paginated_event_list import PaginatedEventList
# 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(
@@ -72,18 +114,18 @@ configuration = opal.Configuration(
# 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 = events_api.EventsApi(api_client)
+ api_instance = opal.EventsApi(api_client)
start_date_filter = "2021/11/01" # str | A start date filter for the events. (optional)
-end_date_filter = "2021-11-12" # str | An end date filter for the events. (optional)
-actor_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An actor filter for the events. Supply the ID of the actor. (optional)
-object_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An object filter for the events. Supply the ID of the object. (optional)
-event_type_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An event type filter for the events. (optional)
-cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional)
-page_size = 200 # int | Number of results to return per page. Default is 200. (optional)
+ end_date_filter = "2021-11-12" # str | An end date filter for the events. (optional)
+ actor_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An actor filter for the events. Supply the ID of the actor. (optional)
+ object_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An object filter for the events. Supply the ID of the object. (optional)
+ event_type_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An event type filter for the events. (optional)
+ 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.events(start_date_filter=start_date_filter, end_date_filter=end_date_filter, actor_filter=actor_filter, object_filter=object_filter, event_type_filter=event_type_filter, cursor=cursor, page_size=page_size)
- pprint(api_response)
+ pprint(api_response.dict())
except opal.ApiException as e:
print("Exception when calling EventsApi->events: %s\n" % e)
```
@@ -94,25 +136,71 @@ All URIs are relative to *https://api.opal.dev/v1*
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* | [**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 |
-*GroupsApi* | [**convert_group**](docs/GroupsApi.md#convert_group) | **PUT** /groups/{group_id}/convert |
+*GroupBindingsApi* | [**create_group_binding**](docs/GroupBindingsApi.md#create_group_binding) | **POST** /group-bindings |
+*GroupBindingsApi* | [**delete_group_binding**](docs/GroupBindingsApi.md#delete_group_binding) | **DELETE** /group-bindings/{group_binding_id} |
+*GroupBindingsApi* | [**get_group_binding**](docs/GroupBindingsApi.md#get_group_binding) | **GET** /group-bindings/{group_binding_id} |
+*GroupBindingsApi* | [**get_group_bindings**](docs/GroupBindingsApi.md#get_group_bindings) | **GET** /group-bindings |
+*GroupBindingsApi* | [**update_group_bindings**](docs/GroupBindingsApi.md#update_group_bindings) | **PUT** /group-bindings |
+*GroupsApi* | [**add_group_resource**](docs/GroupsApi.md#add_group_resource) | **POST** /groups/{group_id}/resources/{resource_id} |
+*GroupsApi* | [**add_group_user**](docs/GroupsApi.md#add_group_user) | **POST** /groups/{group_id}/users/{user_id} |
+*GroupsApi* | [**create_group**](docs/GroupsApi.md#create_group) | **POST** /groups |
*GroupsApi* | [**delete_group**](docs/GroupsApi.md#delete_group) | **DELETE** /groups/{group_id} |
+*GroupsApi* | [**delete_group_user**](docs/GroupsApi.md#delete_group_user) | **DELETE** /groups/{group_id}/users/{user_id} |
+*GroupsApi* | [**get_group**](docs/GroupsApi.md#get_group) | **GET** /groups/{group_id} |
*GroupsApi* | [**get_group_message_channels**](docs/GroupsApi.md#get_group_message_channels) | **GET** /groups/{group_id}/message-channels |
+*GroupsApi* | [**get_group_on_call_schedules**](docs/GroupsApi.md#get_group_on_call_schedules) | **GET** /groups/{group_id}/on-call-schedules |
+*GroupsApi* | [**get_group_resources**](docs/GroupsApi.md#get_group_resources) | **GET** /groups/{group_id}/resources |
+*GroupsApi* | [**get_group_reviewer_stages**](docs/GroupsApi.md#get_group_reviewer_stages) | **GET** /groups/{group_id}/reviewer-stages |
*GroupsApi* | [**get_group_reviewers**](docs/GroupsApi.md#get_group_reviewers) | **GET** /groups/{group_id}/reviewers |
*GroupsApi* | [**get_group_tags**](docs/GroupsApi.md#get_group_tags) | **GET** /groups/{group_id}/tags |
+*GroupsApi* | [**get_group_users**](docs/GroupsApi.md#get_group_users) | **GET** /groups/{group_id}/users |
+*GroupsApi* | [**get_group_visibility**](docs/GroupsApi.md#get_group_visibility) | **GET** /groups/{group_id}/visibility |
*GroupsApi* | [**get_groups**](docs/GroupsApi.md#get_groups) | **GET** /groups |
*GroupsApi* | [**set_group_message_channels**](docs/GroupsApi.md#set_group_message_channels) | **PUT** /groups/{group_id}/message-channels |
+*GroupsApi* | [**set_group_on_call_schedules**](docs/GroupsApi.md#set_group_on_call_schedules) | **PUT** /groups/{group_id}/on-call-schedules |
+*GroupsApi* | [**set_group_resources**](docs/GroupsApi.md#set_group_resources) | **PUT** /groups/{group_id}/resources |
+*GroupsApi* | [**set_group_reviewer_stages**](docs/GroupsApi.md#set_group_reviewer_stages) | **PUT** /groups/{group_id}/reviewer-stages |
*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 |
+*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 |
+*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 |
+*OwnersApi* | [**create_owner**](docs/OwnersApi.md#create_owner) | **POST** /owners |
+*OwnersApi* | [**delete_owner**](docs/OwnersApi.md#delete_owner) | **DELETE** /owners/{owner_id} |
+*OwnersApi* | [**get_owner**](docs/OwnersApi.md#get_owner) | **GET** /owners/{owner_id} |
+*OwnersApi* | [**get_owner_from_name**](docs/OwnersApi.md#get_owner_from_name) | **GET** /owners/name/{owner_name} |
+*OwnersApi* | [**get_owner_users**](docs/OwnersApi.md#get_owner_users) | **GET** /owners/{owner_id}/users |
+*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* | [**get_requests**](docs/RequestsApi.md#get_requests) | **GET** /requests |
+*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_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_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 |
+*ResourcesApi* | [**get_resource_users**](docs/ResourcesApi.md#get_resource_users) | **GET** /resources/{resource_id}/users |
+*ResourcesApi* | [**get_resource_visibility**](docs/ResourcesApi.md#get_resource_visibility) | **GET** /resources/{resource_id}/visibility |
*ResourcesApi* | [**get_resources**](docs/ResourcesApi.md#get_resources) | **GET** /resources |
*ResourcesApi* | [**resource_user_access_status_retrieve**](docs/ResourcesApi.md#resource_user_access_status_retrieve) | **GET** /resource-user-access-status/{resource_id}/{user_id} |
-*ResourcesApi* | [**resource_users**](docs/ResourcesApi.md#resource_users) | **GET** /resource-users |
*ResourcesApi* | [**set_resource_message_channels**](docs/ResourcesApi.md#set_resource_message_channels) | **PUT** /resources/{resource_id}/message-channels |
+*ResourcesApi* | [**set_resource_reviewer_stages**](docs/ResourcesApi.md#set_resource_reviewer_stages) | **PUT** /resources/{resource_id}/reviewer-stages |
*ResourcesApi* | [**set_resource_reviewers**](docs/ResourcesApi.md#set_resource_reviewers) | **PUT** /resources/{resource_id}/reviewers |
+*ResourcesApi* | [**set_resource_visibility**](docs/ResourcesApi.md#set_resource_visibility) | **PUT** /resources/{resource_id}/visibility |
*ResourcesApi* | [**update_resources**](docs/ResourcesApi.md#update_resources) | **PUT** /resources |
*SessionsApi* | [**sessions**](docs/SessionsApi.md#sessions) | **GET** /sessions |
*TagsApi* | [**add_group_tag**](docs/TagsApi.md#add_group_tag) | **POST** /tags/{tag_id}/groups/{group_id} |
@@ -120,54 +208,160 @@ Class | Method | HTTP request | Description
*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* | [**get_tag**](docs/TagsApi.md#get_tag) | **GET** /tag |
+*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} |
*TagsApi* | [**remove_user_tag**](docs/TagsApi.md#remove_user_tag) | **DELETE** /tags/{tag_id}/users/{user_id} |
+*UarsApi* | [**create_uar**](docs/UarsApi.md#create_uar) | **POST** /uar |
+*UarsApi* | [**get_uar**](docs/UarsApi.md#get_uar) | **GET** /uar/{uar_id} |
+*UarsApi* | [**get_uars**](docs/UarsApi.md#get_uars) | **GET** /uars |
*UsersApi* | [**get_user_tags**](docs/UsersApi.md#get_user_tags) | **GET** /users/{user_id}/tags |
+*UsersApi* | [**get_users**](docs/UsersApi.md#get_users) | **GET** /users |
*UsersApi* | [**user**](docs/UsersApi.md#user) | **GET** /user |
## Documentation For Models
+ - [AddGroupResourceRequest](docs/AddGroupResourceRequest.md)
+ - [AddGroupUserRequest](docs/AddGroupUserRequest.md)
+ - [AddResourceUserRequest](docs/AddResourceUserRequest.md)
+ - [App](docs/App.md)
+ - [AppTypeEnum](docs/AppTypeEnum.md)
+ - [AppsList](docs/AppsList.md)
+ - [AwsPermissionSetMetadata](docs/AwsPermissionSetMetadata.md)
+ - [AwsPermissionSetMetadataAwsPermissionSet](docs/AwsPermissionSetMetadataAwsPermissionSet.md)
+ - [Condition](docs/Condition.md)
+ - [ConfigurationTemplate](docs/ConfigurationTemplate.md)
+ - [CreateConfigurationTemplateInfo](docs/CreateConfigurationTemplateInfo.md)
+ - [CreateGroupBindingInfo](docs/CreateGroupBindingInfo.md)
+ - [CreateGroupBindingInfoGroupsInner](docs/CreateGroupBindingInfoGroupsInner.md)
+ - [CreateGroupInfo](docs/CreateGroupInfo.md)
+ - [CreateMessageChannelInfo](docs/CreateMessageChannelInfo.md)
+ - [CreateOnCallScheduleInfo](docs/CreateOnCallScheduleInfo.md)
+ - [CreateOwnerInfo](docs/CreateOwnerInfo.md)
+ - [CreateRequestConfigurationInfoList](docs/CreateRequestConfigurationInfoList.md)
+ - [CreateResourceInfo](docs/CreateResourceInfo.md)
+ - [CreateTagInfo](docs/CreateTagInfo.md)
+ - [CreateUARInfo](docs/CreateUARInfo.md)
- [EntityTypeEnum](docs/EntityTypeEnum.md)
- [Event](docs/Event.md)
- [Group](docs/Group.md)
- - [GroupFunctionEnum](docs/GroupFunctionEnum.md)
+ - [GroupAccessLevel](docs/GroupAccessLevel.md)
+ - [GroupBinding](docs/GroupBinding.md)
+ - [GroupBindingGroup](docs/GroupBindingGroup.md)
+ - [GroupRemoteInfo](docs/GroupRemoteInfo.md)
+ - [GroupRemoteInfoActiveDirectoryGroup](docs/GroupRemoteInfoActiveDirectoryGroup.md)
+ - [GroupRemoteInfoAzureAdMicrosoft365Group](docs/GroupRemoteInfoAzureAdMicrosoft365Group.md)
+ - [GroupRemoteInfoAzureAdSecurityGroup](docs/GroupRemoteInfoAzureAdSecurityGroup.md)
+ - [GroupRemoteInfoDuoGroup](docs/GroupRemoteInfoDuoGroup.md)
+ - [GroupRemoteInfoGithubTeam](docs/GroupRemoteInfoGithubTeam.md)
+ - [GroupRemoteInfoGitlabGroup](docs/GroupRemoteInfoGitlabGroup.md)
+ - [GroupRemoteInfoGoogleGroup](docs/GroupRemoteInfoGoogleGroup.md)
+ - [GroupRemoteInfoLdapGroup](docs/GroupRemoteInfoLdapGroup.md)
+ - [GroupRemoteInfoOktaGroup](docs/GroupRemoteInfoOktaGroup.md)
+ - [GroupResource](docs/GroupResource.md)
+ - [GroupResourceList](docs/GroupResourceList.md)
- [GroupTypeEnum](docs/GroupTypeEnum.md)
+ - [GroupUser](docs/GroupUser.md)
+ - [GroupUserList](docs/GroupUserList.md)
- [MessageChannel](docs/MessageChannel.md)
- [MessageChannelIDList](docs/MessageChannelIDList.md)
- [MessageChannelList](docs/MessageChannelList.md)
- [MessageChannelProviderEnum](docs/MessageChannelProviderEnum.md)
- - [MessageChannelTypeEnum](docs/MessageChannelTypeEnum.md)
- - [NewAdminIDList](docs/NewAdminIDList.md)
+ - [OnCallSchedule](docs/OnCallSchedule.md)
+ - [OnCallScheduleIDList](docs/OnCallScheduleIDList.md)
+ - [OnCallScheduleList](docs/OnCallScheduleList.md)
+ - [OnCallScheduleProviderEnum](docs/OnCallScheduleProviderEnum.md)
+ - [Owner](docs/Owner.md)
+ - [PaginatedConfigurationTemplateList](docs/PaginatedConfigurationTemplateList.md)
- [PaginatedEventList](docs/PaginatedEventList.md)
+ - [PaginatedGroupBindingsList](docs/PaginatedGroupBindingsList.md)
- [PaginatedGroupsList](docs/PaginatedGroupsList.md)
- - [PaginatedResourceUserList](docs/PaginatedResourceUserList.md)
+ - [PaginatedOwnersList](docs/PaginatedOwnersList.md)
- [PaginatedResourcesList](docs/PaginatedResourcesList.md)
+ - [PaginatedTagsList](docs/PaginatedTagsList.md)
+ - [PaginatedUARsList](docs/PaginatedUARsList.md)
+ - [PaginatedUsersList](docs/PaginatedUsersList.md)
+ - [Request](docs/Request.md)
+ - [RequestConfiguration](docs/RequestConfiguration.md)
+ - [RequestCustomFieldResponse](docs/RequestCustomFieldResponse.md)
+ - [RequestCustomFieldResponseFieldValue](docs/RequestCustomFieldResponseFieldValue.md)
+ - [RequestList](docs/RequestList.md)
+ - [RequestStatusEnum](docs/RequestStatusEnum.md)
+ - [RequestTemplateCustomFieldTypeEnum](docs/RequestTemplateCustomFieldTypeEnum.md)
+ - [RequestedItem](docs/RequestedItem.md)
- [Resource](docs/Resource.md)
- [ResourceAccessLevel](docs/ResourceAccessLevel.md)
+ - [ResourceAccessUser](docs/ResourceAccessUser.md)
+ - [ResourceAccessUserList](docs/ResourceAccessUserList.md)
+ - [ResourceRemoteInfo](docs/ResourceRemoteInfo.md)
+ - [ResourceRemoteInfoAwsAccount](docs/ResourceRemoteInfoAwsAccount.md)
+ - [ResourceRemoteInfoAwsEc2Instance](docs/ResourceRemoteInfoAwsEc2Instance.md)
+ - [ResourceRemoteInfoAwsEksCluster](docs/ResourceRemoteInfoAwsEksCluster.md)
+ - [ResourceRemoteInfoAwsIamRole](docs/ResourceRemoteInfoAwsIamRole.md)
+ - [ResourceRemoteInfoAwsPermissionSet](docs/ResourceRemoteInfoAwsPermissionSet.md)
+ - [ResourceRemoteInfoAwsRdsInstance](docs/ResourceRemoteInfoAwsRdsInstance.md)
+ - [ResourceRemoteInfoGcpBigQueryDataset](docs/ResourceRemoteInfoGcpBigQueryDataset.md)
+ - [ResourceRemoteInfoGcpBigQueryTable](docs/ResourceRemoteInfoGcpBigQueryTable.md)
+ - [ResourceRemoteInfoGcpBucket](docs/ResourceRemoteInfoGcpBucket.md)
+ - [ResourceRemoteInfoGcpComputeInstance](docs/ResourceRemoteInfoGcpComputeInstance.md)
+ - [ResourceRemoteInfoGcpFolder](docs/ResourceRemoteInfoGcpFolder.md)
+ - [ResourceRemoteInfoGcpGkeCluster](docs/ResourceRemoteInfoGcpGkeCluster.md)
+ - [ResourceRemoteInfoGcpOrganization](docs/ResourceRemoteInfoGcpOrganization.md)
+ - [ResourceRemoteInfoGcpProject](docs/ResourceRemoteInfoGcpProject.md)
+ - [ResourceRemoteInfoGcpSqlInstance](docs/ResourceRemoteInfoGcpSqlInstance.md)
+ - [ResourceRemoteInfoGithubRepo](docs/ResourceRemoteInfoGithubRepo.md)
+ - [ResourceRemoteInfoGitlabProject](docs/ResourceRemoteInfoGitlabProject.md)
+ - [ResourceRemoteInfoOktaApp](docs/ResourceRemoteInfoOktaApp.md)
+ - [ResourceRemoteInfoOktaCustomRole](docs/ResourceRemoteInfoOktaCustomRole.md)
+ - [ResourceRemoteInfoOktaStandardRole](docs/ResourceRemoteInfoOktaStandardRole.md)
+ - [ResourceRemoteInfoPagerdutyRole](docs/ResourceRemoteInfoPagerdutyRole.md)
+ - [ResourceRemoteInfoSalesforcePermissionSet](docs/ResourceRemoteInfoSalesforcePermissionSet.md)
+ - [ResourceRemoteInfoSalesforceProfile](docs/ResourceRemoteInfoSalesforceProfile.md)
+ - [ResourceRemoteInfoSalesforceRole](docs/ResourceRemoteInfoSalesforceRole.md)
+ - [ResourceRemoteInfoTeleportRole](docs/ResourceRemoteInfoTeleportRole.md)
- [ResourceTypeEnum](docs/ResourceTypeEnum.md)
- [ResourceUser](docs/ResourceUser.md)
- [ResourceUserAccessStatus](docs/ResourceUserAccessStatus.md)
- [ResourceUserAccessStatusEnum](docs/ResourceUserAccessStatusEnum.md)
+ - [ResourceWithAccessLevel](docs/ResourceWithAccessLevel.md)
- [ReviewerIDList](docs/ReviewerIDList.md)
+ - [ReviewerStage](docs/ReviewerStage.md)
+ - [ReviewerStageList](docs/ReviewerStageList.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)
+ - [UAR](docs/UAR.md)
+ - [UARReviewerAssignmentPolicyEnum](docs/UARReviewerAssignmentPolicyEnum.md)
+ - [UARScope](docs/UARScope.md)
+ - [UpdateConfigurationTemplateInfo](docs/UpdateConfigurationTemplateInfo.md)
+ - [UpdateGroupBindingInfo](docs/UpdateGroupBindingInfo.md)
+ - [UpdateGroupBindingInfoList](docs/UpdateGroupBindingInfoList.md)
- [UpdateGroupInfo](docs/UpdateGroupInfo.md)
- [UpdateGroupInfoList](docs/UpdateGroupInfoList.md)
+ - [UpdateGroupResourcesInfo](docs/UpdateGroupResourcesInfo.md)
+ - [UpdateOwnerInfo](docs/UpdateOwnerInfo.md)
+ - [UpdateOwnerInfoList](docs/UpdateOwnerInfoList.md)
- [UpdateResourceInfo](docs/UpdateResourceInfo.md)
- [UpdateResourceInfoList](docs/UpdateResourceInfoList.md)
- [User](docs/User.md)
- - [UsersList](docs/UsersList.md)
- - [VisibilityEnum](docs/VisibilityEnum.md)
+ - [UserHrIdpStatusEnum](docs/UserHrIdpStatusEnum.md)
+ - [UserIDList](docs/UserIDList.md)
+ - [UserList](docs/UserList.md)
+ - [VisibilityInfo](docs/VisibilityInfo.md)
+ - [VisibilityTypeEnum](docs/VisibilityTypeEnum.md)
+
## Documentation For Authorization
-## BearerAuth
+Authentication schemes defined for the API:
+
+### BearerAuth
- **Type**: Bearer authentication
@@ -177,22 +371,3 @@ Class | Method | HTTP request | Description
hello@opal.dev
-## Notes for Large OpenAPI documents
-If the OpenAPI document is large, imports in opal.apis and opal.models may fail with a
-RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
-
-Solution 1:
-Use specific imports for apis and models like:
-- `from opal.api.default_api import DefaultApi`
-- `from opal.model.pet import Pet`
-
-Solution 2:
-Before importing the package, adjust the maximum recursion limit as shown below:
-```
-import sys
-sys.setrecursionlimit(1500)
-import opal
-from opal.apis import *
-from opal.models import *
-```
-
diff --git a/api/openapi.yaml b/api/openapi.yaml
index 814f056..1a8b83b 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -11,13 +11,140 @@ servers:
- description: Production
url: https://api.opal.dev/v1
paths:
+ /apps:
+ get:
+ description: Returns a list of `App` objects.
+ operationId: getApps
+ parameters:
+ - description: A list of app types to filter by.
+ example:
+ - OKTA_DIRECTORY
+ - GIT_HUB
+ explode: false
+ in: query
+ name: app_type_filter
+ required: false
+ schema:
+ items:
+ $ref: "#/components/schemas/AppTypeEnum"
+ type: array
+ style: form
+ - description: An owner ID to filter by.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ explode: true
+ in: query
+ name: owner_filter
+ required: false
+ schema:
+ format: uuid
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/AppsList"
+ description: A list of apps for your organization.
+ security:
+ - BearerAuth: []
+ tags:
+ - apps
+ /apps/{app_id}:
+ get:
+ description: Returns an `App` object.
+ operationId: getApp
+ parameters:
+ - description: The ID of the app.
+ example: 32acc112-21ff-4669-91c2-21e27683eaa1
+ explode: true
+ in: path
+ name: app_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/App"
+ description: The requested `App`.
+ security:
+ - BearerAuth: []
+ tags:
+ - apps
+ /configuration-templates:
+ get:
+ description: Returns a list of `ConfigurationTemplate` objects.
+ operationId: getConfigurationTemplates
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/PaginatedConfigurationTemplateList"
+ description: One page worth of configuration templates for your organization.
+ security:
+ - BearerAuth: []
+ tags:
+ - configuration-templates
+ post:
+ description: Creates a configuration template.
+ operationId: createConfigurationTemplate
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateConfigurationTemplateInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ConfigurationTemplate"
+ description: The configuration template just created.
+ security:
+ - BearerAuth: []
+ tags:
+ - configuration-templates
+ put:
+ description: Update a configuration template.
+ operationId: updateConfigurationTemplate
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ConfigurationTemplate"
+ description: The configuration template just updated.
+ requestBody:
+ description: Configuration template to be updated
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UpdateConfigurationTemplateInfo"
+ security:
+ - BearerAuth: []
+ tags:
+ - configuration-templates
/events:
get:
description: Returns a list of `Event` objects.
operationId: events
parameters:
- description: A start date filter for the events.
- example: 2021/11/01
+ examples:
+ withDate:
+ summary: Example with date
+ value: 2021-11-01
+ withDatetime:
+ summary: Example with date and time
+ value: 2021-11-01 12:00:00
explode: true
in: query
name: start_date_filter
@@ -26,7 +153,13 @@ paths:
type: string
style: form
- description: An end date filter for the events.
- example: 2021-11-12
+ examples:
+ withDate:
+ summary: Example with date
+ value: 2021-11-12
+ withDatetime:
+ summary: Example with date and time
+ value: 2021-11-12 12:00:00
explode: true
in: query
name: end_date_filter
@@ -55,7 +188,7 @@ paths:
type: string
style: form
- description: An event type filter for the events.
- example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ example: USER_MFA_RESET
explode: true
in: query
name: event_type_filter
@@ -63,6 +196,15 @@ paths:
schema:
type: string
style: form
+ - description: An API filter for the events. Supply the name and preview of the API token.
+ example: fullaccess:**************************M_g==
+ explode: true
+ in: query
+ name: api_token_filter
+ required: false
+ schema:
+ type: string
+ style: form
- description: The pagination cursor value.
example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
explode: true
@@ -117,23 +259,38 @@ paths:
type: integer
maximum: 1000
style: form
- - description: The group function to filter by.
- example: REGULAR
+ - description: The group type to filter by.
+ example: OPAL_GROUP
explode: true
in: query
- name: group_function_filter
+ name: group_type_filter
+ required: false
+ schema:
+ $ref: "#/components/schemas/GroupTypeEnum"
+ style: form
+ - description: The group ids to filter by.
+ example:
+ - 4baf8423-db0a-4037-a4cf-f79c60cb67a5
+ - 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: query
+ name: group_ids
required: false
schema:
- $ref: "#/components/schemas/GroupFunctionEnum"
+ items:
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ type: array
style: form
- - description: The group type to filter by.
- example: OPAL_GROUP
+ - description: Group name.
+ example: example-name
explode: true
in: query
- name: group_type_filter
+ name: group_name
required: false
schema:
- $ref: "#/components/schemas/GroupTypeEnum"
+ type: string
style: form
responses:
"200":
@@ -155,7 +312,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/UpdateGroupInfoList'
+ $ref: "#/components/schemas/UpdateGroupInfoList"
responses:
"200":
content:
@@ -167,14 +324,34 @@ paths:
- BearerAuth: []
tags:
- groups
+ post:
+ description: Creates a group. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing groups.
+ operationId: createGroup
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateGroupInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Group"
+ description: The group just created.
+ security:
+ - BearerAuth: []
+ tags:
+ - groups
/groups/{group_id}:
- delete:
- description: Deletes a group.
- operationId: delete_group
+ get:
+ description: Returns a `Group` object.
+ operationId: getGroup
parameters:
- description: The ID of the group.
- example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
- explode: false
+ example: 32acc112-21ff-4669-91c2-21e27683eaa1
+ explode: true
in: path
name: group_id
required: true
@@ -184,15 +361,18 @@ paths:
style: simple
responses:
"200":
- description: The group was successfully deleted.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Group"
+ description: The requested `Group`.
security:
- BearerAuth: []
tags:
- groups
- /groups/{group_id}/convert:
- put:
- description: Updates a groups function.
- operationId: convert_group
+ delete:
+ description: Deletes a group.
+ operationId: delete_group
parameters:
- description: The ID of the group.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
@@ -204,45 +384,16 @@ paths:
format: uuid
type: string
style: simple
- - description: The group function to convert to.
- example: TEAM
- explode: false
- in: query
- name: group_function
- required: true
- schema:
- $ref: "#/components/schemas/GroupFunctionEnum"
- style: form
- - description: The ID of the owning team of the group. Required when converting from Team to Group.
- example: 7c86c85d-0651-43e2-a748-d69d658418e8
- explode: false
- in: query
- name: owner_team_id
- required: false
- schema:
- format: uuid
- type: string
- style: form
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NewAdminIDList"
responses:
"200":
- description: The converted group.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Group"
+ description: The group was successfully deleted.
security:
- BearerAuth: []
tags:
- groups
/groups/{group_id}/message-channels:
- get:
- description: Gets the list of message channels attached to a group.
+ get:
+ description: Gets the list of audit and reviewer message channels attached to a group.
operationId: get_group_message_channels
parameters:
- description: The ID of the group.
@@ -261,13 +412,13 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/MessageChannelList"
- description: The message channels attached to the group.
+ description: The audit and reviewer message channels attached to the group.
security:
- BearerAuth: []
tags:
- groups
put:
- description: Sets the list of message channels attached to a group.
+ description: Sets the list of audit message channels attached to a group.
operationId: set_group_message_channels
parameters:
- description: The ID of the group.
@@ -296,15 +447,15 @@ paths:
format: uuid
type: string
type: array
- description: The updated message channel IDs for the group.
+ description: The updated audit message channel IDs for the group.
security:
- BearerAuth: []
tags:
- groups
- /groups/{group_id}/reviewers:
- get:
- description: Gets the list of team/user IDs of the reviewers for a group.
- operationId: get_group_reviewers
+ /groups/{group_id}/on-call-schedules:
+ get:
+ description: Gets the list of on call schedules attached to a group.
+ operationId: get_group_on_call_schedules
parameters:
- description: The ID of the group.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
@@ -321,19 +472,15 @@ paths:
content:
application/json:
schema:
- items:
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- format: uuid
- type: string
- type: array
- description: The IDs of teams/users that are reviewers for this group.
+ $ref: "#/components/schemas/OnCallScheduleList"
+ description: The on call schedules attached to the group.
security:
- BearerAuth: []
tags:
- groups
put:
- description: Sets the list of reviewers for a group.
- operationId: set_group_reviewers
+ description: Sets the list of on call schedules attached to a group.
+ operationId: set_group_on_call_schedules
parameters:
- description: The ID of the group.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
@@ -350,32 +497,32 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/ReviewerIDList"
+ $ref: "#/components/schemas/OnCallScheduleIDList"
responses:
"200":
content:
application/json:
schema:
items:
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ example: bb0197c0-5ea5-45d9-b3b7-b6c439be6435
format: uuid
type: string
type: array
- description: The updated IDs of teams/users that are reviewers for this group
+ description: The updated on call schedule IDs for the group.
security:
- BearerAuth: []
tags:
- groups
- /groups/{group_id}/tags:
+ /groups/{group_id}/resources:
get:
- description: Returns all tags applied to the group.
- operationId: get_group_tags
+ description: Gets the list of resources that the group gives access to.
+ operationId: get_group_resources
parameters:
- - description: The ID of the group whose tags to return.
- name: group_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ - description: The ID of the group.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
+ name: group_id
required: true
schema:
format: uuid
@@ -384,106 +531,56 @@ paths:
responses:
"200":
content:
- application/json:
- schema:
- $ref: "#/components/schemas/TagsList"
- description: The tags applied to the group.
+ application/json:
+ schema:
+ $ref: "#/components/schemas/GroupResourceList"
+ description: The resources that the group gives access to to.
security:
- BearerAuth: []
tags:
- groups
- /resources:
- get:
- description: Returns a list of resources for your organization.
- operationId: getResources
+ put:
+ description: Sets the list of resources that the group gives access to.
+ operationId: set_group_resources
parameters:
- - description: The pagination cursor value.
- example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
- explode: true
- in: query
- name: cursor
- required: false
+ - 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: 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
- - description: The resource type to filter by.
- example: AWS_IAM_ROLE
- explode: true
- in: query
- name: resource_type_filter
- required: false
- schema:
- $ref: "#/components/schemas/ResourceTypeEnum"
- style: form
- responses:
- "200":
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PaginatedResourcesList"
- description: One page worth resources associated with your organization.
- security:
- - BearerAuth: []
- tags:
- - resources
- put:
- description: Bulk updates a list of resources.
- operationId: updateResources
+ style: simple
requestBody:
- description: Resources to be updated
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/UpdateResourceInfoList'
+ $ref: "#/components/schemas/UpdateGroupResourcesInfo"
responses:
"200":
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/UpdateResourceInfoList"
- description: The resulting updated resource infos.
+ description: The group resource were successfully set.
security:
- BearerAuth: []
tags:
- - resources
- /resources/{resource_id}:
- delete:
- description: Deletes a resource.
- operationId: delete_resource
+ - groups
+ /groups/{group_id}/resources/{resource_id}:
+ post:
+ description: Adds a resource to a group.
+ operationId: add_group_resource
parameters:
- - description: The ID of the resource.
+ - description: The ID of the group.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
- name: resource_id
+ name: group_id
required: true
schema:
format: uuid
type: string
style: simple
- responses:
- "200":
- description: The resource was successfully deleted.
- security:
- - BearerAuth: []
- tags:
- - resources
- /resources/{resource_id}/message-channels:
- get:
- description: Gets the list of message channels attached to a resource.
- operationId: get_resource_message_channels
- parameters:
- description: The ID of the resource.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
@@ -494,26 +591,75 @@ paths:
format: uuid
type: string
style: simple
- responses:
- "200":
+ - 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
+ explode: true
+ in: query
+ name: access_level_remote_id
+ required: false
+ schema:
+ type: string
+ style: form
+ deprecated: true
+ requestBody:
+ required: false
+ content:
+ application/json:
+ schema:
+ example:
+ access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess
+ 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
+ type: object
+ responses:
+ "200":
content:
application/json:
schema:
- $ref: "#/components/schemas/MessageChannelList"
- description: The message channels attached to the resource.
+ $ref: "#/components/schemas/GroupResource"
+ description: The created `GroupResource` object.
security:
- BearerAuth: []
tags:
- - resources
+ - groups
+ /groups/{group_id}/visibility:
+ get:
+ description: Gets the visibility of this group.
+ operationId: get_group_visibility
+ parameters:
+ - 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":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/VisibilityInfo"
+ description: The visibility info of this group.
+ security:
+ - BearerAuth: []
+ tags:
+ - groups
put:
- description: Sets the list of message channels attached to a resource.
- operationId: set_resource_message_channels
+ description: Sets the visibility of this group.
+ operationId: set_group_visibility
parameters:
- - description: The ID of the resource.
+ - description: The ID of the group.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
- name: resource_id
+ name: group_id
required: true
schema:
format: uuid
@@ -524,32 +670,29 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/MessageChannelIDList"
+ $ref: "#/components/schemas/VisibilityInfo"
responses:
"200":
content:
application/json:
schema:
- items:
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- format: uuid
- type: string
- type: array
- description: The updated message channel IDs for the resource.
+ $ref: "#/components/schemas/VisibilityInfo"
+ description: The visibility info of this group.
security:
- BearerAuth: []
tags:
- - resources
- /resources/{resource_id}/reviewers:
- get:
- description: Gets the list of team/user IDs of the reviewers for a resource.
- operationId: get_resource_reviewers
+ - groups
+ /groups/{group_id}/reviewers:
+ get:
+ deprecated: true
+ description: Gets the list of owner IDs of the reviewers for a group.
+ operationId: get_group_reviewers
parameters:
- - description: The ID of the resource.
+ - description: The ID of the group.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
- name: resource_id
+ name: group_id
required: true
schema:
format: uuid
@@ -565,20 +708,21 @@ paths:
format: uuid
type: string
type: array
- description: The IDs of teams that are reviewers for this resource.
+ description: The IDs of owners that are reviewers for this group.
security:
- BearerAuth: []
tags:
- - resources
+ - groups
put:
- description: Sets the list of reviewers for a resource.
- operationId: set_resource_reviewers
+ deprecated: true
+ description: Sets the list of reviewers for a group.
+ operationId: set_group_reviewers
parameters:
- - description: The ID of the resource.
+ - description: The ID of the group.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
- name: resource_id
+ name: group_id
required: true
schema:
format: uuid
@@ -600,139 +744,110 @@ paths:
format: uuid
type: string
type: array
- description: The updated IDs of teams that are reviewers for this resource
+ description: The updated IDs of owners that are reviewers for this group
security:
- BearerAuth: []
tags:
- - resources
- /resource-users:
+ - groups
+ /groups/{group_id}/reviewer-stages:
get:
- description: Returns a list of `ResourceUser` objects.
- operationId: resource_users
+ description: Gets the list of reviewer stages for a group.
+ operationId: get_group_reviewer_stages
parameters:
- - description: The ID of the resource.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- explode: true
- in: query
- name: resource_id
+ - 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: form
- - description: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.
- example: arn:aws:iam::590304332660:role/AdministratorAccess
- explode: true
- in: query
- name: access_level_remote_id
- required: false
- schema:
- type: string
- style: form
- - 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
+ style: simple
responses:
"200":
content:
application/json:
schema:
- $ref: "#/components/schemas/PaginatedResourceUserList"
- description: One page worth of users with access to this resource.
+ description: A list of reviewer stages.
+ items:
+ $ref: "#/components/schemas/ReviewerStage"
+ type: array
+ description: The reviewer stages for this group.
security:
- BearerAuth: []
tags:
- - resources
- /resource-user-access-status/{resource_id}/{user_id}:
- get:
- description: Get user's access status to a resource.
- operationId: resource_user_access_status_retrieve
+ - groups
+ put:
+ description: Sets the list of reviewer stages for a group.
+ operationId: set_group_reviewer_stages
parameters:
- - description: The ID of the resource.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ - description: The ID of the group.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
- name: resource_id
+ name: group_id
required: true
schema:
format: uuid
type: string
style: simple
- - description: The ID of the user.
- example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ReviewerStageList"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ description: A list of reviewer stages.
+ items:
+ $ref: "#/components/schemas/ReviewerStage"
+ type: array
+ description: The updated reviewer stages for this group.
+ security:
+ - BearerAuth: []
+ tags:
+ - groups
+ /groups/{group_id}/tags:
+ get:
+ description: Returns all tags applied to the group.
+ operationId: get_group_tags
+ parameters:
+ - description: The ID of the group whose tags to return.
+ name: group_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
explode: false
in: path
- name: user_id
required: true
schema:
format: uuid
type: string
style: simple
- - description: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.
- example: arn:aws:iam::590304332660:role/AdministratorAccess
- explode: true
- in: query
- name: access_level_remote_id
- required: false
- schema:
- type: string
- style: form
- - 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/ResourceUserAccessStatus"
- description: The access status reflecting the user's access to the resource.
+ $ref: "#/components/schemas/TagsList"
+ description: The tags applied to the group.
security:
- BearerAuth: []
tags:
- - resources
- /resources/{resource_id}/tags:
+ - groups
+ /groups/{group_id}/users:
get:
- description: Returns all tags applied to the resource.
- operationId: get_resource_tags
+ description: Gets the list of users for this group.
+ operationId: get_group_users
parameters:
- - description: The ID of the resource whose tags to return.
- name: resource_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ - description: The ID of the group.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
+ name: group_id
required: true
schema:
format: uuid
@@ -741,94 +856,203 @@ paths:
responses:
"200":
content:
- application/json:
- schema:
- $ref: "#/components/schemas/TagsList"
- description: The tags applied to the resource.
+ application/json:
+ schema:
+ $ref: "#/components/schemas/GroupUserList"
+ description: List of users with access to this group.
security:
- BearerAuth: []
tags:
- - resources
- /sessions:
- get:
- description: Returns a list of `Session` objects.
- operationId: sessions
+ - groups
+ /groups/{group_id}/users/{user_id}:
+ post:
+ description: Adds a user to this group.
+ operationId: add_group_user
parameters:
- - description: The ID of the resource.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- explode: true
- in: query
- name: resource_id
+ - 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
+ - description: The ID of the user to add.
+ example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06
+ explode: false
+ in: path
+ name: user_id
required: true
schema:
format: uuid
type: string
+ style: simple
+ - description: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.
+ example: 60
+ explode: true
+ in: query
+ name: duration_minutes
+ required: false
+ schema:
+ type: integer
+ maximum: 525960 # One year
style: form
- - description: The ID of the user you wish to query sessions for.
- example: 32acc112-21ff-4669-91c2-21e27683eaa1
+ deprecated: true
+ - 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
explode: true
in: query
- name: user_id
+ name: access_level_remote_id
required: false
schema:
type: string
style: form
+ deprecated: true
+ requestBody:
+ required: false
+ content:
+ application/json:
+ schema:
+ example:
+ duration_minutes: 60
+ access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess
+ properties:
+ duration_minutes:
+ description: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.
+ example: 60
+ type: integer
+ 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
+ required:
+ - duration_minutes
+ type: object
responses:
"200":
content:
application/json:
schema:
- $ref: "#/components/schemas/SessionsList"
- description: The sessions associated with a resource.
+ $ref: "#/components/schemas/GroupUser"
+ description: The GroupUser that was created.
security:
- BearerAuth: []
tags:
- - sessions
- /user:
- get:
- description: Returns a `User` object.
- operationId: user
+ - groups
+ delete:
+ description: Removes a user's access from this group.
+ operationId: delete_group_user
parameters:
- - description: The user ID of the user.
- example: 32acc112-21ff-4669-91c2-21e27683eaa1
- explode: true
- in: query
- name: user_id
- required: false
+ - 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: form
- - description: The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.
- example: johndoe@domain.org
+ style: simple
+ - description: The ID of a user to remove from this group.
+ example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06
+ explode: false
+ in: path
+ name: user_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: This user's access was successfully removed from this group.
+ security:
+ - BearerAuth: []
+ tags:
+ - groups
+ /group-bindings:
+ get:
+ description: Returns a list of `GroupBinding` objects.
+ operationId: getGroupBindings
+ parameters:
+ - description: The pagination cursor value.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
explode: true
in: query
- name: email
+ 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
+ schema:
+ type: integer
+ maximum: 1000
+ style: form
responses:
"200":
content:
application/json:
schema:
- $ref: "#/components/schemas/User"
- description: The user object associated with the passed-in email or ID.
+ $ref: "#/components/schemas/PaginatedGroupBindingsList"
+ description: One page worth of group bindings for your organization.
security:
- BearerAuth: []
tags:
- - users
- /users/{user_id}/tags:
+ - group-bindings
+ post:
+ description: Creates a group binding.
+ operationId: createGroupBinding
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateGroupBindingInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/GroupBinding"
+ description: The group binding just created.
+ security:
+ - BearerAuth: []
+ tags:
+ - group-bindings
+ put:
+ description: Bulk updates a list of group bindings.
+ operationId: updateGroupBindings
+ requestBody:
+ description: Group bindings to be updated
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UpdateGroupBindingInfoList"
+ responses:
+ "200":
+ description: The group bindings were successfully updated.
+ security:
+ - BearerAuth: []
+ tags:
+ - group-bindings
+ /group-bindings/{group_binding_id}:
get:
- description: Returns all tags applied to the user.
- operationId: get_user_tags
+ description: Returns a `GroupBinding` object.
+ operationId: getGroupBinding
parameters:
- - description: The ID of the user whose tags to return.
- name: user_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- explode: false
+ - description: The ID of the group binding.
+ example: 32acc112-21ff-4669-91c2-21e27683eaa1
+ explode: true
in: path
+ name: group_binding_id
required: true
schema:
format: uuid
@@ -837,78 +1061,66 @@ paths:
responses:
"200":
content:
- application/json:
- schema:
- $ref: "#/components/schemas/TagsList"
- description: The tags applied to the user.
+ application/json:
+ schema:
+ $ref: "#/components/schemas/GroupBinding"
+ description: The requested `GroupBinding`.
security:
- BearerAuth: []
tags:
- - users
- /tag:
- get:
- description: Gets a tag with the given key and value.
- operationId: get_tag
+ - group-bindings
+ delete:
+ description: Deletes a group binding.
+ operationId: deleteGroupBinding
parameters:
- - description: The key of the tag to get.
- example: api-scope
- explode: false
- in: query
- name: tag_key
- required: true
- schema:
- type: string
- style: form
- - description: The value of the tag to get.
- example: production
+ - description: The ID of the group binding.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
- in: query
- name: tag_value
+ in: path
+ name: group_binding_id
required: true
schema:
+ format: uuid
type: string
- style: form
+ style: simple
responses:
"200":
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Tag"
- description: The tag requested.
+ description: The group binding was successfully deleted.
security:
- BearerAuth: []
tags:
- - tags
- post:
- description: Creates a tag with the given key and value.
- operationId: create_tag
+ - group-bindings
+ /owners:
+ get:
+ description: Returns a list of `Owner` objects.
+ operationId: get_owners
parameters:
- - description: The key of the tag to create.
- example: api-scope
- explode: false
+ - description: The pagination cursor value.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ explode: true
in: query
- name: tag_key
- required: true
+ name: cursor
+ required: false
schema:
type: string
style: form
- - description: The value of the tag to create.
- example: production
- explode: false
+ - description: Number of results to return per page. Default is 200.
+ example: 200
+ explode: true
in: query
- name: tag_value
- required: true
+ name: page_size
+ required: false
schema:
- type: string
+ type: integer
+ maximum: 1000
style: form
- - description: The ID of the team that owns the tag.
- example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06
- explode: false
+ - description: Owner name to filter by.
+ example: 200
+ explode: true
in: query
- name: tag_owner_team_id
- required: true
+ name: name
+ required: false
schema:
- format: uuid
type: string
style: form
responses:
@@ -916,32 +1128,63 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/Tag"
- description: The tag that was created.
+ $ref: "#/components/schemas/PaginatedOwnersList"
+ description: One page worth of owners in your organization.
security:
- BearerAuth: []
tags:
- - tags
- /tags/{tag_id}/users/{user_id}:
+ - owners
post:
- description: Applies a tag to a user.
- operationId: add_user_tag
+ description: Creates an owner.
+ operationId: createOwner
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateOwnerInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Owner"
+ description: The owner just created.
+ security:
+ - BearerAuth: []
+ tags:
+ - owners
+ put:
+ description: Bulk updates a list of owners.
+ operationId: updateOwners
+ requestBody:
+ description: Owners to be updated
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UpdateOwnerInfoList"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UpdateOwnerInfoList"
+ description: The resulting updated owner infos.
+ security:
+ - BearerAuth: []
+ tags:
+ - owners
+ /owners/{owner_id}:
+ get:
+ description: Returns an `Owner` object.
+ operationId: getOwner
parameters:
- - description: The ID of the tag to apply.
- name: tag_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- explode: false
- in: path
- required: true
- schema:
- format: uuid
- type: string
- style: simple
- - description: The ID of the user to apply the tag to.
- name: user_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- explode: false
+ - description: The ID of the owner.
+ example: 32acc112-21ff-4669-91c2-21e27683eaa1
+ explode: true
in: path
+ name: owner_id
required: true
schema:
format: uuid
@@ -949,30 +1192,24 @@ paths:
style: simple
responses:
"200":
- description: Tag applied to user successfully.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Owner"
+ description: The owner object associated with the passed-in ID.
security:
- BearerAuth: []
tags:
- - tags
+ - owners
delete:
- description: Removes a tag from a user.
- operationId: remove_user_tag
+ description: Deletes an owner.
+ operationId: delete_owner
parameters:
- - description: The ID of the tag to remove.
- name: tag_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- explode: false
- in: path
- required: true
- schema:
- format: uuid
- type: string
- style: simple
- - description: The ID of the user to remove the tag from.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ - description: The ID of the owner.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
- name: user_id
+ name: owner_id
required: true
schema:
format: uuid
@@ -980,31 +1217,46 @@ paths:
style: simple
responses:
"200":
- description: Tag removed from user successfully.
+ description: The owner was successfully deleted.
security:
- BearerAuth: []
tags:
- - tags
- /tags/{tag_id}/groups/{group_id}:
- post:
- description: Applies a tag to a group.
- operationId: add_group_tag
+ - owners
+ /owners/name/{owner_name}:
+ get:
+ description: Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead.
+ operationId: getOwnerFromName
parameters:
- - description: The ID of the tag to apply.
- name: tag_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- explode: false
+ - description: The name of the owner.
+ example: MyOwner
+ explode: true
in: path
+ name: owner_name
required: true
schema:
- format: uuid
type: string
style: simple
- - description: The ID of the group to apply the tag to.
- name: group_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Owner"
+ description: The owner object associated with the passed-in name.
+ security:
+ - BearerAuth: []
+ tags:
+ - owners
+ /owners/{owner_id}/users:
+ get:
+ description: Gets the list of users for this owner, in escalation priority order if applicable.
+ operationId: get_owner_users
+ parameters:
+ - description: The ID of the owner.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
+ name: owner_id
required: true
schema:
format: uuid
@@ -1012,30 +1264,219 @@ paths:
style: simple
responses:
"200":
- description: Tag applied to group successfully.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UserList"
+ description: The users for this owner.
security:
- BearerAuth: []
tags:
- - tags
- delete:
- description: Removes a tag from a group.
- operationId: remove_group_tag
+ - owners
+ put:
+ description: Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible.
+ operationId: set_owner_users
parameters:
- - description: The ID of the tag to remove.
- name: tag_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ - description: The ID of the owner.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
+ name: owner_id
required: true
schema:
format: uuid
type: string
style: simple
- - description: The ID of the group to remove the tag from.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UserIDList"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UserList"
+ description: The updated users for the owner.
+ security:
+ - BearerAuth: []
+ tags:
+ - owners
+ /requests:
+ get:
+ description: Returns a list of requests for your organization that is visible by the admin.
+ operationId: getRequests
+ 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
+ - description: Boolean toggle for if it should only show pending requests.
+ explode: true
+ in: query
+ name: show_pending_only
+ required: false
+ schema:
+ type: boolean
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/RequestList"
+ description: The list of requests.
+ security:
+ - BearerAuth: []
+ tags:
+ - requests
+ /resources:
+ get:
+ description: Returns a list of resources for your organization.
+ operationId: getResources
+ 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
+ - description: The resource type to filter by.
+ example: AWS_IAM_ROLE
+ explode: true
+ in: query
+ name: resource_type_filter
+ required: false
+ schema:
+ $ref: "#/components/schemas/ResourceTypeEnum"
+ style: form
+ - description: The resource ids to filter by.
+ example:
+ - 4baf8423-db0a-4037-a4cf-f79c60cb67a5
+ - 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: query
+ name: resource_ids
+ required: false
+ schema:
+ items:
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ type: array
+ style: form
+ - description: Resource name.
+ example: example-name
+ explode: true
+ in: query
+ name: resource_name
+ required: false
+ schema:
+ type: string
+ style: form
+ - description: The parent resource id to filter by.
+ example:
+ - 4baf8423-db0a-4037-a4cf-f79c60cb67a5
+ explode: false
+ in: query
+ name: parent_resource_id
+ required: false
+ schema:
+ format: uuid
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/PaginatedResourcesList"
+ description: One page worth resources associated with your organization.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ put:
+ description: Bulk updates a list of resources.
+ operationId: updateResources
+ requestBody:
+ description: Resources to be updated
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UpdateResourceInfoList"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UpdateResourceInfoList"
+ description: The resulting updated resource infos.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ post:
+ description: Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources.
+ operationId: createResource
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateResourceInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Resource"
+ description: The resource just created.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}:
+ get:
+ description: Retrieves a resource.
+ operationId: get_resource
+ parameters:
+ - description: The ID of the resource.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
- name: group_id
+ name: resource_id
required: true
schema:
format: uuid
@@ -1043,31 +1484,46 @@ paths:
style: simple
responses:
"200":
- description: Tag removed from group successfully.
+ description: The requested resource.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Resource"
security:
- BearerAuth: []
tags:
- - tags
- /tags/{tag_id}/resources/{resource_id}:
- post:
- description: Applies a tag to a resource.
- operationId: add_resource_tag
+ - resources
+ delete:
+ description: Deletes a resource.
+ operationId: delete_resource
parameters:
- - description: The ID of the tag to apply.
- name: tag_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ - 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 ID of the resource to apply the tag to.
- name: resource_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ responses:
+ "200":
+ description: The resource was successfully deleted.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}/message-channels:
+ get:
+ description: Gets the list of audit message channels attached to a resource.
+ operationId: get_resource_message_channels
+ 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
@@ -1075,27 +1531,57 @@ paths:
style: simple
responses:
"200":
- description: Tag applied to resource successfully.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/MessageChannelList"
+ description: The audit message channels attached to the resource.
security:
- BearerAuth: []
tags:
- - tags
- delete:
- description: Removes a tag from a resource.
- operationId: remove_resource_tag
+ - resources
+ put:
+ description: Sets the list of audit message channels attached to a resource.
+ operationId: set_resource_message_channels
parameters:
- - description: The ID of the tag to remove.
- name: tag_id
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ - 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 ID of the resource to remove the tag from.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/MessageChannelIDList"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ items:
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ type: array
+ description: The updated audit message channel IDs for the resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}/visibility:
+ get:
+ description: Gets the visibility of this resource.
+ operationId: get_resource_visibility
+ parameters:
+ - description: The ID of the resource.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: path
name: resource_id
@@ -1106,260 +1592,3592 @@ paths:
style: simple
responses:
"200":
- description: Tag removed from resource successfully.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/VisibilityInfo"
+ description: The visibility info of this resource.
security:
- BearerAuth: []
tags:
- - tags
-components:
- schemas:
- EntityTypeEnum:
- description: The type of an entity.
- enum:
- - GROUP
- - RESOURCE
- - USER
- example: GROUP
- type: string
- Event:
- description: |-
- # Event Object
- ### Description
- The `Event` object is used to represent an event.
-
- ### Usage Example
- Fetch from the `LIST Events` endpoint.
+ - resources
+ put:
+ description: Sets the visibility of this resource.
+ operationId: set_resource_visibility
+ 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
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/VisibilityInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/VisibilityInfo"
+ description: The visibility info of this resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}/reviewers:
+ get:
+ description: Gets the list of owner IDs of the reviewers for a resource.
+ operationId: get_resource_reviewers
+ 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
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ items:
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ type: array
+ description: The IDs of owners that are reviewers for this resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ put:
+ description: Sets the list of reviewers for a resource.
+ operationId: set_resource_reviewers
+ 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
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ReviewerIDList"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ items:
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ type: array
+ description: The updated IDs of owners that are reviewers for this resource
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}/reviewer-stages:
+ get:
+ description: Gets the list reviewer stages for a resource.
+ operationId: get_resource_reviewer_stages
+ 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
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ description: A list of reviewer stages.
+ items:
+ $ref: "#/components/schemas/ReviewerStage"
+ type: array
+ description: The reviewer stages for this resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ put:
+ description: Sets the list of reviewer stages for a resource.
+ operationId: set_resource_reviewer_stages
+ 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
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ReviewerStageList"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ description: A list of reviewer stages.
+ items:
+ $ref: "#/components/schemas/ReviewerStage"
+ type: array
+ description: The updated reviewer stages for this resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}/users:
+ get:
+ description: Gets the list of users for this resource.
+ operationId: get_resource_users
+ 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/ResourceAccessUserList"
+ description: List of users with access to this resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}/users/{user_id}:
+ post:
+ description: Adds a user to this resource.
+ operationId: add_resource_user
+ 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 ID of the user to add.
+ example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06
+ explode: false
+ in: path
+ name: user_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.
+ example: 60
+ explode: true
+ in: query
+ name: duration_minutes
+ required: false
+ schema:
+ type: integer
+ maximum: 525960 # One year
+ style: form
+ deprecated: true
+ - 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
+ explode: true
+ in: query
+ name: access_level_remote_id
+ required: false
+ schema:
+ type: string
+ style: form
+ deprecated: true
+ requestBody:
+ required: false
+ content:
+ application/json:
+ schema:
+ example:
+ duration_minutes: 60
+ access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess
+ 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 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
+ required:
+ - duration_minutes
+ type: object
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ResourceUser"
+ description: The ResourceUser that was created.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ delete:
+ description: Removes a user's direct access from this resource.
+ operationId: delete_resource_user
+ 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 ID of a user to remove from this resource.
+ example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06
+ explode: false
+ in: path
+ name: user_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - 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.
+ example: arn:aws:iam::590304332660:role/AdministratorAccess
+ explode: true
+ in: query
+ name: access_level_remote_id
+ required: false
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ description: This user's access was successfully removed from this resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resource-user-access-status/{resource_id}/{user_id}:
+ get:
+ description: Get user's access status to a resource.
+ operationId: resource_user_access_status_retrieve
+ parameters:
+ - description: The ID of the resource.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ name: resource_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The ID of the user.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ explode: false
+ in: path
+ name: user_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.
+ example: arn:aws:iam::590304332660:role/AdministratorAccess
+ explode: true
+ in: query
+ name: access_level_remote_id
+ required: false
+ schema:
+ type: string
+ style: form
+ - 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/ResourceUserAccessStatus"
+ description: The access status reflecting the user's access to the resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /resources/{resource_id}/tags:
+ get:
+ description: Returns all tags applied to the resource.
+ operationId: get_resource_tags
+ parameters:
+ - description: The ID of the resource whose tags to return.
+ name: resource_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 resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - resources
+ /sessions:
+ get:
+ description: Returns a list of `Session` objects.
+ operationId: sessions
+ parameters:
+ - description: The ID of the resource.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: true
+ in: query
+ name: resource_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: form
+ - description: The ID of the user you wish to query sessions for.
+ example: 32acc112-21ff-4669-91c2-21e27683eaa1
+ explode: true
+ in: query
+ name: user_id
+ required: false
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/SessionsList"
+ description: The sessions associated with a resource.
+ security:
+ - BearerAuth: []
+ tags:
+ - sessions
+ /user:
+ get:
+ description: Returns a `User` object.
+ operationId: user
+ parameters:
+ - description: The user ID of the user.
+ example: 32acc112-21ff-4669-91c2-21e27683eaa1
+ explode: true
+ in: query
+ name: user_id
+ required: false
+ schema:
+ format: uuid
+ type: string
+ style: form
+ - description: The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.
+ example: johndoe@domain.org
+ explode: true
+ in: query
+ name: email
+ required: false
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/User"
+ description: The user object associated with the passed-in email or ID.
+ security:
+ - BearerAuth: []
+ tags:
+ - users
+ /users:
+ get:
+ description: Returns a list of users for your organization.
+ operationId: getUsers
+ 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/PaginatedUsersList"
+ description: One page worth users in your organization.
+ security:
+ - BearerAuth: []
+ 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:
+ get:
+ description: Gets a tag with the given key and value.
+ operationId: get_tag
+ parameters:
+ - description: The key of the tag to get.
+ example: api-scope
+ explode: false
+ in: query
+ name: tag_key
+ required: true
+ schema:
+ type: string
+ style: form
+ - description: The value of the tag to get.
+ example: production
+ explode: false
+ in: query
+ name: tag_value
+ required: false
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Tag"
+ description: The tag requested.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ post:
+ description: Creates a tag with the given key and value.
+ operationId: create_tag
+ parameters:
+ - description: The key of the tag to create.
+ example: api-scope
+ explode: false
+ in: query
+ name: tag_key
+ required: false
+ schema:
+ type: string
+ style: form
+ deprecated: true
+ - description: The value of the tag to create.
+ example: production
+ explode: false
+ in: query
+ name: tag_value
+ required: false
+ schema:
+ type: string
+ style: form
+ deprecated: true
+ - description: The ID of the owner that manages the tag.
+ example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06
+ explode: false
+ in: query
+ name: admin_owner_id
+ schema:
+ format: uuid
+ type: string
+ style: form
+ deprecated: true
+ requestBody:
+ required: false
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateTagInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Tag"
+ description: The tag that was created.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ /tags:
+ get:
+ description: Returns a list of tags created by your organization.
+ operationId: getTags
+ 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/PaginatedTagsList"
+ description: A list of tags created by your organization.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ /tags/{tag_id}/users/{user_id}:
+ post:
+ description: Applies a tag to a user.
+ operationId: add_user_tag
+ parameters:
+ - description: The ID of the tag to apply.
+ name: tag_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The ID of the user to apply the tag to.
+ name: user_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: Tag applied to user successfully.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ delete:
+ description: Removes a tag from a user.
+ operationId: remove_user_tag
+ parameters:
+ - description: The ID of the tag to remove.
+ name: tag_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The ID of the user to remove the tag from.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ name: user_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: Tag removed from user successfully.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ /tags/{tag_id}/groups/{group_id}:
+ post:
+ description: Applies a tag to a group.
+ operationId: add_group_tag
+ parameters:
+ - description: The ID of the tag to apply.
+ name: tag_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The ID of the group to apply the tag to.
+ name: group_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: Tag applied to group successfully.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ delete:
+ description: Removes a tag from a group.
+ operationId: remove_group_tag
+ parameters:
+ - description: The ID of the tag to remove.
+ name: tag_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The ID of the group to remove the tag from.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ name: group_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: Tag removed from group successfully.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ /tags/{tag_id}/resources/{resource_id}:
+ post:
+ description: Applies a tag to a resource.
+ operationId: add_resource_tag
+ parameters:
+ - description: The ID of the tag to apply.
+ name: tag_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The ID of the resource to apply the tag to.
+ name: resource_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: Tag applied to resource successfully.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ delete:
+ description: Removes a tag from a resource.
+ operationId: remove_resource_tag
+ parameters:
+ - description: The ID of the tag to remove.
+ name: tag_id
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ - description: The ID of the resource to remove the tag from.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ explode: false
+ in: path
+ name: resource_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: Tag removed from resource successfully.
+ security:
+ - BearerAuth: []
+ tags:
+ - tags
+ /message-channels:
+ get:
+ description: Returns a list of `MessageChannel` objects.
+ operationId: get_message_channels
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/MessageChannelList"
+ description: A list of message channels for your organization.
+ security:
+ - BearerAuth: []
+ tags:
+ - message-channels
+ post:
+ description: Creates a `MessageChannel` objects.
+ operationId: create_message_channel
+ requestBody:
+ description: The `MessageChannel` object to be created.
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateMessageChannelInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/MessageChannel"
+ description: The message channel that was created.
+ security:
+ - BearerAuth: []
+ tags:
+ - message-channels
+ /message-channels/{message_channel_id}:
+ get:
+ description: Gets a `MessageChannel` object.
+ operationId: get_message_channel
+ parameters:
+ - description: The ID of the message_channel.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
+ explode: false
+ in: path
+ name: message_channel_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/MessageChannel"
+ description: The requested message channel.
+ security:
+ - BearerAuth: []
+ tags:
+ - message-channels
+ /on-call-schedules:
+ get:
+ description: Returns a list of `OnCallSchedule` objects.
+ operationId: get_on_call_schedules
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OnCallScheduleList"
+ description: A list of on call schedules for your organization.
+ security:
+ - BearerAuth: []
+ tags:
+ - on-call-schedules
+ post:
+ description: Creates a `OnCallSchedule` objects.
+ operationId: create_on_call_schedule
+ requestBody:
+ description: The `OnCallSchedule` object to be created.
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateOnCallScheduleInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OnCallSchedule"
+ description: The on call schedule that was created.
+ security:
+ - BearerAuth: []
+ tags:
+ - on-call-schedules
+ /on-call-schedules/{on_call_schedule_id}:
+ get:
+ description: Gets a `OnCallSchedule` object.
+ operationId: get_on_call_schedule
+ parameters:
+ - description: The ID of the on_call_schedule.
+ example: 9546209c-42c2-4801-96d7-9ec42df0f59c
+ explode: false
+ in: path
+ name: on_call_schedule_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OnCallSchedule"
+ description: The requested on call schedule.
+ security:
+ - BearerAuth: []
+ tags:
+ - on-call-schedules
+ /uars:
+ get:
+ description: Returns a list of `UAR` objects.
+ operationId: getUARs
+ 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/PaginatedUARsList"
+ description: A list of UARs for your organization.
+ security:
+ - BearerAuth: []
+ tags:
+ - uars
+ /uar:
+ post:
+ description: Starts a User Access Review.
+ operationId: create_uar
+ requestBody:
+ description: The settings of the UAR.
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateUARInfo"
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UAR"
+ description: The UAR that was started.
+ security:
+ - BearerAuth: []
+ tags:
+ - uars
+ /uar/{uar_id}:
+ get:
+ description: Retrieves a specific UAR.
+ operationId: get_uar
+ parameters:
+ - description: The ID of the UAR.
+ example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
+ explode: false
+ in: path
+ name: uar_id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UAR"
+ description: The UAR that was requested.
+ security:
+ - BearerAuth: []
+ tags:
+ - uars
+components:
+ schemas:
+ UARScope:
+ description: If set, the access review will only contain resources and groups that match at least one of the filters in scope.
+ example:
+ tags:
+ - key: uar_scope
+ value: high_priority
+ names:
+ - demo
+ - api
+ admins:
+ - f454d283-ca87-4a8a-bdbb-df212eca5353
+ - 8763d283-ca87-4a8a-bdbb-df212ecab139
+ properties:
+ 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
+ admins:
+ description: This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs.
+ items:
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ type: string
+ format: uuid
+ type: array
+ type: object
+ PaginatedUARsList:
+ description: A list of UARs.
+ example:
+ next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ results:
+ - uar_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: Monthly UAR (July)
+ send_reviewer_assignment_notification: False
+ deadline: 2022-07-14 06:59:59
+ time_zone: America/Los_Angeles
+ self_review_allowed: False
+ uar_scope:
+ tags:
+ - key: uar_scope
+ value: high_priority
+ names:
+ - demo
+ - api
+ admins:
+ - f454d283-ca87-4a8a-bdbb-df212eca5353
+ - 8763d283-ca87-4a8a-bdbb-df212ecab139
+ - uar_id: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb
+ name: Monthly UAR (August)
+ send_reviewer_assignment_notification: True
+ deadline: 2022-08-14 06:59:59
+ time_zone: America/Los_Angeles
+ self_review_allowed: False
+ uar_scope:
+ tags:
+ - key: uar_scope
+ value: high_priority
+ names:
+ - demo
+ - api
+ admins:
+ - f454d283-ca87-4a8a-bdbb-df212eca5353
+ - 8763d283-ca87-4a8a-bdbb-df212ecab139
+ properties:
+ next:
+ description:
+ The cursor with which to continue pagination if additional
+ result pages exist.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ nullable: true
+ type: string
+ previous:
+ description: The cursor used to obtain the current result page.
+ example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ nullable: true
+ type: string
+ results:
+ items:
+ $ref: "#/components/schemas/UAR"
+ type: array
+ required:
+ - results
+ type: object
+ UAR:
+ description: A user access review.
+ example:
+ uar_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: Monthly UAR (July)
+ send_reviewer_assignment_notification: False
+ deadline: 2022-07-14 06:59:59
+ time_zone: America/Los_Angeles
+ self_review_allowed: False
+ uar_scope:
+ tags:
+ - key: uar_scope
+ value: high_priority
+ names:
+ - demo
+ - api
+ admins:
+ - f454d283-ca87-4a8a-bdbb-df212eca5353
+ - 8763d283-ca87-4a8a-bdbb-df212ecab139
+ properties:
+ uar_id:
+ description: The ID of the UAR.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ name:
+ description: The name of the UAR.
+ example: Monthly UAR (July)
+ type: string
+ reviewer_assignment_policy:
+ $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum"
+ send_reviewer_assignment_notification:
+ description: A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False.
+ example: False
+ type: boolean
+ deadline:
+ description: The last day for reviewers to complete their access reviews.
+ example: 2022-07-14 06:59:59
+ type: string
+ format: date-time
+ time_zone:
+ 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.
+ example: America/Los_Angeles
+ type: string
+ self_review_allowed:
+ 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
+ uar_scope:
+ $ref: "#/components/schemas/UARScope"
+ required:
+ - uar_id
+ - name
+ - deadline
+ - reviewer_assignment_policy
+ - send_reviewer_assignment_notification
+ - time_zone
+ - self_review_allowed
+ type: object
+ CreateUARInfo:
+ description: Information needed to start a user access review.
+ example:
+ name: Monthly UAR (July)
+ send_reviewer_assignment_notification: False
+ deadline: 2022-07-14 06:59:59
+ time_zone: America/Los_Angeles
+ self_review_allowed: False
+ uar_scope:
+ tags:
+ - key: uar_scope
+ value: high_priority
+ names:
+ - demo
+ - api
+ admins:
+ - f454d283-ca87-4a8a-bdbb-df212eca5353
+ - 8763d283-ca87-4a8a-bdbb-df212ecab139
+ properties:
+ name:
+ description: The name of the UAR.
+ example: Monthly UAR (July)
+ type: string
+ reviewer_assignment_policy:
+ $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum"
+ send_reviewer_assignment_notification:
+ description: A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False.
+ example: False
+ type: boolean
+ deadline:
+ description: The last day for reviewers to complete their access reviews.
+ example: 2022-07-14 06:59:59
+ type: string
+ format: date-time
+ time_zone:
+ 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.
+ example: America/Los_Angeles
+ type: string
+ self_review_allowed:
+ 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
+ uar_scope:
+ $ref: "#/components/schemas/UARScope"
+ required:
+ - name
+ - deadline
+ - reviewer_assignment_policy
+ - send_reviewer_assignment_notification
+ - time_zone
+ - self_review_allowed
+ type: object
+ UARReviewerAssignmentPolicyEnum:
+ description: 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.
+ enum:
+ - MANUALLY
+ - BY_OWNING_TEAM_ADMIN
+ - BY_MANAGER
+ example: MANUALLY
+ type: string
+ TagFilter:
+ description: A tag filter defined by the tags key and value.
+ example:
+ key: uar_scope
+ value: high_priority
+ properties:
+ key:
+ description: The key of the tag.
+ example: uar_scope
+ type: string
+ value:
+ description: The value of the tag.
+ example: high_priority
+ type: string
+ required:
+ - key
+ type: object
+ AppsList:
+ description: A list of apps.
+ example:
+ - app_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: Okta Org
+ description: Okta directory for the engineering team.
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ app_type: OKTA_DIRECTORY
+ - app_id: 5247d283-ca87-4a8a-bdbb-df212eca1243
+ name: Prod AWS Account
+ description: Our production engineering account for AWS.
+ admin_owner_id: aab485d-0651-43e2-a748-d69d6584123af
+ app_type: AWS
+ properties:
+ apps:
+ items:
+ $ref: "#/components/schemas/App"
+ type: array
+ required:
+ - apps
+ type: object
+ App:
+ description: |-
+ # App Object
+ ### Description
+ The `App` object is used to represent an app to an application.
+
+ ### Usage Example
+ List from the `GET Apps` endpoint.
+ example:
+ app_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: Okta Org
+ description: Okta directory for the engineering team.
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ app_type: OKTA_DIRECTORY
+ properties:
+ app_id:
+ description: The ID of the app.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ name:
+ description: The name of the app.
+ example: Okta Org
+ type: string
+ description:
+ description: A description of the app.
+ example: Okta directory for the engineering team.
+ type: string
+ admin_owner_id:
+ description: The ID of the owner of the app.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
+ format: uuid
+ type: string
+ app_type:
+ $ref: "#/components/schemas/AppTypeEnum"
+ required:
+ - app_id
+ - name
+ - description
+ - admin_owner_id
+ - app_type
+ type: object
+ AppTypeEnum:
+ description: The type of an app.
+ enum:
+ - ACTIVE_DIRECTORY
+ - AZURE_AD
+ - AWS
+ - AWS_SSO
+ - CUSTOM
+ - DUO
+ - GCP
+ - GIT_HUB
+ - GIT_LAB
+ - GOOGLE_GROUPS
+ - GOOGLE_WORKSPACE
+ - LDAP
+ - MARIADB
+ - MONGO
+ - MONGO_ATLAS
+ - MYSQL
+ - OKTA_DIRECTORY
+ - OPAL
+ - PAGERDUTY
+ - SALESFORCE
+ - TAILSCALE
+ - TELEPORT
+ - WORKDAY
+ example: OKTA_DIRECTORY
+ type: string
+ EntityTypeEnum:
+ description: The type of an entity.
+ enum:
+ - GROUP
+ - RESOURCE
+ - USER
+ example: GROUP
+ type: string
+ Event:
+ description: |-
+ # Event Object
+ ### Description
+ The `Event` object is used to represent an event.
+
+ ### Usage Example
+ Fetch from the `LIST Events` endpoint.
+ example:
+ event_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ actor_user_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ created_at: 2022-01-23T04:56:07Z
+ event_type: USERS_CREATED
+ properties:
+ event_id:
+ description: The ID of the event.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ actor_user_id:
+ description: The ID of the actor user.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ format: uuid
+ type: string
+ actor_name:
+ description: The name of the actor user.
+ example: John Smith
+ format: string
+ actor_email:
+ description: The email of the actor user.
+ example: john@acmecorp.com
+ type: string
+ event_type:
+ description: The event type.
+ example: USERS_CREATED
+ type: string
+ created_at:
+ description: The day and time the event was created.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
+ type: string
+ actor_ip_address:
+ description: The IP address of the event actor.
+ example: 255.255.255.0
+ type: string
+ api_token_name:
+ description: The name of the API token used to create the event.
+ example: My API Token
+ type: string
+ api_token_preview:
+ description: The preview of the API token used to create the event.
+ example: "**************************M_g=="
+ type: string
+ sub_events:
+ items:
+ $ref: "#/components/schemas/SubEvent"
+ type: array
+ required:
+ - event_id
+ - actor_user_id
+ - actor_name
+ - event_type
+ - created_at
+ type: object
+ SubEvent:
+ description: |-
+ # Sub event Object
+ ### Description
+ The `SubEvent` object is used to represent a subevent.
+
+ ### Usage Example
+ Fetch from the `LIST Events` endpoint.
+ example:
+ sub_event_type: USERS_CREATED
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ user_name: John Smith
+ resource_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ resource_name: Figma
+ properties:
+ sub_event_type:
+ description: The subevent type.
+ example: USERS_CREATED
+ type: string
+ required:
+ - sub_event_type
+ type: object
+ additionalProperties: true
+ PaginatedEventList:
+ example:
+ next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ results:
+ - event_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ actor_user_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ created_at: 2022-01-23T04:56:07Z
+ event_type: USERS_CREATED
+ - event_id: 7646aa9a-e2ee-4eb5-8c62-91f29038a373
+ actor_user_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ created_at: 2022-02-03T12:33:02Z
+ event_type: USER_TEAM_UPDATED
+ properties:
+ next:
+ description:
+ The cursor with which to continue pagination if additional
+ result pages exist.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ nullable: true
+ type: string
+ previous:
+ description: The cursor used to obtain the current result page.
+ example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ nullable: true
+ type: string
+ results:
+ items:
+ $ref: "#/components/schemas/Event"
+ type: array
+ type: object
+ ResourceAccessUserList:
+ example:
+ results:
+ - full_name: Jake Barnes
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ email: jake@company.dev
+ has_direct_access: true
+ num_access_paths: 2
+ - full_name: Brett Ashley
+ user_id: 7646aa9a-e2ee-4eb5-8c62-91f29038a373
+ resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-02-03T12:33:02Z
+ email: brett@company.dev
+ has_direct_access: true
+ num_access_paths: 3
+ properties:
+ results:
+ items:
+ $ref: "#/components/schemas/ResourceAccessUser"
+ type: array
+ type: object
+ ResourceAccessLevel:
+ 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.
+
+ ### Usage Example
+ View the `ResourceAccessLevel` 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
+ properties:
+ access_level_name:
+ description: The human-readable name of the access level.
+ example: AdminRole
+ type: string
+ access_level_remote_id:
+ description: The machine-readable identifier of the access level.
+ example: arn:aws:iam::590304332660:role/AdministratorAccess
+ type: string
+ required:
+ - access_level_name
+ - access_level_remote_id
+ type: object
+ ResourceUserAccessStatus:
+ description: |-
+ # AccessStatus Object
+ ### Description
+ The `AccessStatus` object is used to represent the user's access to the resource.
+
+ ### Usage Example
+ View the `AccessStatus` for a resource/user pair to determine if the user has access to the resource.
+ example:
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ status: AUTHORIZED
+ properties:
+ resource_id:
+ description: The ID of the resource.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ user_id:
+ description: The ID of the user.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ format: uuid
+ type: string
+ access_level:
+ $ref: "#/components/schemas/ResourceAccessLevel"
+ status:
+ $ref: "#/components/schemas/ResourceUserAccessStatusEnum"
+ expiration_date:
+ description: The day and time the user's access will expire.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
+ nullable: true
+ type: string
+ required:
+ - expiration_date
+ - resource_id
+ - status
+ - user_id
+ type: object
+ ResourceUserAccessStatusEnum:
+ description: The status of the user's access to the resource.
+ enum:
+ - AUTHORIZED
+ - REQUESTED
+ - UNAUTHORIZED
+ example: AUTHORIZED
+ type: string
+ ResourceUser:
+ description: |-
+ # Resource User Object
+ ### Description
+ The `ResourceUser` object is used to represent a user with direct access to a resource.
+ example:
+ full_name: Jake Barnes
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ email: jake@company.dev
+ properties:
+ resource_id:
+ description: The ID of the resource.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ user_id:
+ description: The ID of the user.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ format: uuid
+ type: string
+ access_level:
+ $ref: "#/components/schemas/ResourceAccessLevel"
+ full_name:
+ description: The user's full name.
+ example: Jake Barnes
+ type: string
+ email:
+ description: The user's email.
+ example: jake@company.dev
+ type: string
+ expiration_date:
+ description: The day and time the user's access will expire.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
+ nullable: true
+ type: string
+ required:
+ - email
+ - expiration_date
+ - full_name
+ - resource_id
+ - user_id
+ - access_level
+ type: object
+ ResourceAccessUser:
+ description: |-
+ # Resource Access User Object
+ ### Description
+ The `ResourceAccessUser` object is used to represent a user with access to a resource, either directly or indirectly through group(s).
+
+ ### Usage Example
+ Fetch from the `LIST ResourceUsers` endpoint.
+ example:
+ full_name: Jake Barnes
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ email: jake@company.dev
+ properties:
+ resource_id:
+ description: The ID of the resource.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ user_id:
+ description: The ID of the user.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ format: uuid
+ type: string
+ access_level:
+ $ref: "#/components/schemas/ResourceAccessLevel"
+ full_name:
+ description: The user's full name.
+ example: Jake Barnes
+ type: string
+ email:
+ description: The user's email.
+ example: jake@company.dev
+ type: string
+ expiration_date:
+ description: The day and time the user's access will expire.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
+ nullable: true
+ type: string
+ has_direct_access:
+ description: The user has direct access to this resources (vs. indirectly, like through a group).
+ example: true
+ type: boolean
+ num_access_paths:
+ description: The number of ways in which the user has access through this resource (directly and indirectly).
+ example: 3
+ format: int32
+ type: integer
+ required:
+ - email
+ - expiration_date
+ - full_name
+ - resource_id
+ - user_id
+ - access_level
+ - has_direct_access
+ - num_access_paths
+ type: object
+ SessionsList:
+ example:
+ next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ results:
+ - connection_id: h0z968412-2451-4bbd-42h4-057l715d917m
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ - connection_id: 6e6b5597-bd36-4f4c-a629-01e3fa791932
+ user_id: b031c922-b84f-4424-9f4f-c49c05871bfe
+ resource_id: 77eb1ab7-2c27-4fc4-afdb-137e1265cddd
+ expiration_date: 2022-03-12T07:22:18Z
+ properties:
+ next:
+ description:
+ The cursor with which to continue pagination if additional
+ result pages exist.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ nullable: true
+ type: string
+ previous:
+ description: The cursor used to obtain the current result page.
+ example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ nullable: true
+ type: string
+ results:
+ items:
+ $ref: "#/components/schemas/Session"
+ type: array
+ type: object
+ Session:
+ description: |-
+ # Session Object
+ ### Description
+ The `Session` object is used to represent an access session. Some resources can be accessed temporarily via a time-bounded session.
+
+ ### Usage Example
+ Fetch from the `LIST Sessions` endpoint.
+ example:
+ connection_id: h0z968412-2451-4bbd-42h4-057l715d917m
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ properties:
+ connection_id:
+ description: The ID of the connection.
+ example: h0z968412-2451-4bbd-42h4-057l715d917m
+ format: uuid
+ type: string
+ user_id:
+ description: The ID of the user.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ format: uuid
+ type: string
+ resource_id:
+ description: The ID of the resource.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ access_level:
+ $ref: "#/components/schemas/ResourceAccessLevel"
+ expiration_date:
+ description: The day and time the user's access will expire.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
+ nullable: false
+ type: string
+ required:
+ - connection_id
+ - user_id
+ - resource_id
+ - access_level
+ - expiration_date
+ type: object
+ PaginatedUsersList:
+ example:
+ next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ results:
+ - user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ email: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ full_name: John Doe
+ position: Senior Engineer
+ - user_id: e8581682-04f7-473a-a419-472f0fb26d46
+ email: 186511e5-5b5a-4ad7-a4ad-b6c8694a544a
+ full_name: Jane Smith
+ position: Product Marketing Lead
+ properties:
+ next:
+ description:
+ The cursor with which to continue pagination if additional
+ result pages exist.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ nullable: true
+ type: string
+ previous:
+ description: The cursor used to obtain the current result page.
+ example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ nullable: true
+ type: string
+ results:
+ items:
+ $ref: "#/components/schemas/User"
+ type: array
+ type: object
+ required:
+ - results
+ User:
+ description: |-
+ # User Object
+ ### Description
+ The `User` object is used to represent a user.
+
+ ### Usage Example
+ Fetch from the `LIST Sessions` endpoint.
+ example:
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ email: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ full_name: John Doe
+ first_name: John
+ last_name: Doe
+ position: Engineer
+ properties:
+ user_id:
+ description: The ID of the user.
+ example: h0z968412-2451-4bbd-42h4-057l715d917m
+ format: uuid
+ type: string
+ email:
+ description: The email of the user.
+ example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ type: string
+ full_name:
+ description: The full name of the user.
+ example: John Doe
+ type: string
+ first_name:
+ description: The first name of the user.
+ example: John
+ type: string
+ last_name:
+ description: The last name of the user.
+ example: Doe
+ type: string
+ position:
+ description: The user's position.
+ example: Senior Engineer
+ type: string
+ hr_idp_status:
+ $ref: "#/components/schemas/UserHrIdpStatusEnum"
+ required:
+ - user_id
+ - email
+ - full_name
+ - first_name
+ - last_name
+ - position
+ type: object
+ UserList:
+ description: A list of users.
+ properties:
+ users:
+ items:
+ $ref: "#/components/schemas/User"
+ type: array
+ type: object
+ required:
+ - users
+ UserIDList:
+ description: A list of user IDs.
+ example:
+ user_ids:
+ - 7870617d-e72a-47f5-a84c-693817ab4567
+ - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ properties:
+ user_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ type: object
+ required:
+ - user_ids
+ UserHrIdpStatusEnum:
+ description: User status pulled from an HR/IDP provider.
+ enum:
+ - ACTIVE
+ - SUSPENDED
+ - DEPROVISIONED
+ - DELETED
+ - NOT_FOUND
+ example: ACTIVE
+ type: string
+ PaginatedGroupsList:
+ example:
+ next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ results:
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ max_duration: 120
+ require_manager_approval: False
+ require_support_ticket: False
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ description: Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.
+ admin_owner_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3
+ max_duration: 360
+ require_manager_approval: False
+ require_support_ticket: True
+ properties:
+ next:
+ description:
+ The cursor with which to continue pagination if additional
+ result pages exist.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ nullable: true
+ type: string
+ previous:
+ description: The cursor used to obtain the current result page.
+ example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ nullable: true
+ type: string
+ results:
+ items:
+ $ref: "#/components/schemas/Group"
+ type: array
+ type: object
+ required:
+ - results
+ GroupResource:
+ description: |-
+ # GroupResource Object
+ ### Description
+ The `GroupResource` object is used to represent a relationship between a group and a resource.
+ example:
+ group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ resource_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ access_level_remote_id: "write"
+ properties:
+ group_id:
+ description: The ID of the group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ resource_id:
+ description: The ID of the resource.
+ example: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ format: uuid
+ type: string
+ access_level:
+ $ref: "#/components/schemas/ResourceAccessLevel"
+ required:
+ - group_id
+ - resource_id
+ - access_level
+ type: object
+ Group:
+ description: |-
+ # Group Object
+ ### Description
+ The `Group` object is used to represent a group.
+
+ ### Usage Example
+ Update from the `UPDATE Groups` endpoint.
+ example:
+ group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ remote_id: 037m2jsg218b2wb
+ remote_name: Finance Team
+ description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ max_duration: 120
+ require_manager_approval: False
+ require_support_ticket: False
+ properties:
+ group_id:
+ description: The ID of the group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ app_id:
+ description: The ID of the group's app.
+ example: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ format: uuid
+ type: string
+ name:
+ description: The name of the group.
+ example: API Group
+ type: string
+ description:
+ description: A description of the group.
+ example: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ type: string
+ admin_owner_id:
+ description: The ID of the owner of the group.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
+ format: uuid
+ type: string
+ remote_id:
+ description: The ID of the remote.
+ example: google-group-group:037m2jsg218b2wb
+ type: string
+ remote_name:
+ description: The name of the remote.
+ example: Finance team
+ type: string
+ group_type:
+ $ref: "#/components/schemas/GroupTypeEnum"
+ max_duration:
+ description: The maximum duration for which the group can be requested (in minutes).
+ type: integer
+ example: 120
+ recommended_duration:
+ description: The recommended duration for which the group should be requested (in minutes). -1 represents an indefinite duration.
+ type: integer
+ example: 120
+ require_manager_approval:
+ description: A bool representing whether or not access requests to the group require manager approval.
+ example: False
+ type: boolean
+ deprecated: true
+ require_support_ticket:
+ description: A bool representing whether or not access requests to the group require an access ticket.
+ example: False
+ type: boolean
+ require_mfa_to_approve:
+ description: A bool representing whether or not to require MFA for reviewers to approve requests for this group.
+ example: False
+ type: boolean
+ require_mfa_to_request:
+ description: A bool representing whether or not to require MFA for requesting access to this group.
+ example: False
+ type: boolean
+ auto_approval:
+ description: A bool representing whether or not to automatically approve requests to this group.
+ example: False
+ type: boolean
+ request_template_id:
+ description: The ID of the associated request template.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ configuration_template_id:
+ description: The ID of the associated configuration template.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ group_binding_id:
+ description: The ID of the associated group binding.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ is_requestable:
+ description: A bool representing whether or not to allow access requests to this group.
+ example: False
+ type: boolean
+ request_configurations:
+ description: A list of request configurations for this group.
+ example: []
+ type: array
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ request_configuration_list:
+ description: A list of request configurations for this group. Deprecated in favor of `request_configurations`.
+ deprecated: true
+ example: []
+ type: array
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ metadata:
+ 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.
+ deprecated: true
+ example: |-
+ { "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } }
+ type: string
+ remote_info:
+ $ref: "#/components/schemas/GroupRemoteInfo"
+ required:
+ - group_id
+ type: object
+ GroupUserList:
example:
- event_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- actor_user_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- created_at: 2022-01-23T04:56:07Z
- event_type: USERS_CREATED
+ results:
+ - full_name: Jake Barnes
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ email: jake@company.dev
+ - full_name: Brett Ashley
+ user_id: 7646aa9a-e2ee-4eb5-8c62-91f29038a373
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-02-03T12:33:02Z
+ email: brett@company.dev
properties:
- event_id:
- description: The ID of the event.
+ results:
+ items:
+ $ref: "#/components/schemas/GroupUser"
+ type: array
+ type: object
+ GroupAccessLevel:
+ description: |-
+ # Access Level Object
+ ### Description
+ The `GroupAccessLevel` object is used to represent the level of access that a user has to a group or a group has to a group. The "default" access
+ level is a `GroupAccessLevel` object whose fields are all empty strings.
+
+ ### Usage Example
+ View the `GroupAccessLevel` of a group/user or group/group pair to see the level of access granted to the group.
+ example:
+ access_level_name: Developer
+ access_level_remote_id: 20
+ properties:
+ access_level_name:
+ description: The human-readable name of the access level.
+ example: Developer
+ type: string
+ access_level_remote_id:
+ description: The machine-readable identifier of the access level.
+ example: 20
+ type: string
+ required:
+ - access_level_name
+ - access_level_remote_id
+ type: object
+ GroupUser:
+ description: |-
+ # Group Access User Object
+ ### Description
+ The `GroupAccessUser` object is used to represent a user with access to a group.
+
+ ### Usage Example
+ Fetch from the `LIST GroupUsers` endpoint.
+ example:
+ full_name: Jake Barnes
+ user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ expiration_date: 2022-01-23T04:56:07Z
+ email: jake@company.dev
+ properties:
+ group_id:
+ description: The ID of the group.
example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
format: uuid
type: string
- actor_user_id:
- description: The ID of the actor user.
+ user_id:
+ description: The ID of the user.
example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
format: uuid
type: string
- event_type:
- description: The event type.
- example: USERS_CREATED
+ access_level:
+ $ref: "#/components/schemas/GroupAccessLevel"
+ nullable: true
+ full_name:
+ description: The user's full name.
+ example: Jake Barnes
+ type: string
+ email:
+ description: The user's email.
+ example: jake@company.dev
+ type: string
+ expiration_date:
+ description: The day and time the user's access will expire.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
+ nullable: true
+ type: string
+ required:
+ - email
+ - expiration_date
+ - full_name
+ - group_id
+ - user_id
+ type: object
+ UpdateGroupInfoList:
+ example:
+ groups:
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ name: api-group
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ max_duration: 120
+ require_manager_approval: False
+ require_support_ticket: False
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ description: Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.
+ name: on-call-integrations
+ admin_owner_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3
+ max_duration: 360
+ require_manager_approval: False
+ require_support_ticket: True
+ properties:
+ groups:
+ description: A list of groups with information to update.
+ items:
+ $ref: "#/components/schemas/UpdateGroupInfo"
+ type: array
+ type: object
+ required:
+ - groups
+ UpdateGroupInfo:
+ description: |-
+ # UpdateGroupInfo Object
+ ### Description
+ The `UpdateGroupInfo` object is used as an input to the UpdateGroup API.
+ example:
+ group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ name: api-group
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ max_duration: 120
+ require_manager_approval: False
+ require_support_ticket: False
+ properties:
+ group_id:
+ description: The ID of the group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ name:
+ description: The name of the group.
+ example: api-group
+ type: string
+ description:
+ description: A description of the group.
+ example: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ type: string
+ admin_owner_id:
+ description: The ID of the owner of the group.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
+ format: uuid
+ type: string
+ max_duration:
+ description: The maximum duration for which the group can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`.
+ type: integer
+ example: 120
+ deprecated: true
+ recommended_duration:
+ description: The recommended duration for which the group should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`.
+ type: integer
+ example: 120
+ deprecated: true
+ require_manager_approval:
+ description: A bool representing whether or not access requests to the group require manager approval. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ require_support_ticket:
+ description: A bool representing whether or not access requests to the group require an access ticket. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ folder_id:
+ description: The ID of the folder that the group is located in.
+ example: e27cb7b0-98e2-4555-9916-9e6d8ca6b079
+ format: uuid
+ type: string
+ deprecated: true
+ require_mfa_to_approve:
+ description: A bool representing whether or not to require MFA for reviewers to approve requests for this group.
+ example: False
+ type: boolean
+ require_mfa_to_request:
+ description: A bool representing whether or not to require MFA for requesting access to this group. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ auto_approval:
+ description: A bool representing whether or not to automatically approve requests to this group. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ configuration_template_id:
+ description: The ID of the associated configuration template.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ request_template_id:
+ description: The ID of the associated request template. Deprecated in favor of `request_configurations`.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ deprecated: true
+ is_requestable:
+ description: A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ request_configurations:
+ type: array
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ description: The request configuration list of the configuration template. If not provided, the default request configuration will be used.
+ request_configuration_list:
+ 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`.
+ $ref: "#/components/schemas/CreateRequestConfigurationInfoList"
+ deprecated: true
+ example:
+ request_configurations:
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition: null
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 0
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e9
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition:
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b4
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 1
+ required:
+ - group_id
+ type: object
+ GroupTypeEnum:
+ description: The type of the group.
+ enum:
+ - ACTIVE_DIRECTORY_GROUP
+ - AWS_SSO_GROUP
+ - DUO_GROUP
+ - GIT_HUB_TEAM
+ - GIT_LAB_GROUP
+ - GOOGLE_GROUPS_GROUP
+ - LDAP_GROUP
+ - OKTA_GROUP
+ - OPAL_GROUP
+ - AZURE_AD_SECURITY_GROUP
+ - AZURE_AD_MICROSOFT_365_GROUP
+ example: OPAL_GROUP
+ type: string
+ ResourceTypeEnum:
+ description: The type of the resource.
+ enum:
+ - AWS_IAM_ROLE
+ - AWS_EC2_INSTANCE
+ - AWS_EKS_CLUSTER
+ - AWS_RDS_POSTGRES_INSTANCE
+ - AWS_RDS_MYSQL_INSTANCE
+ - AWS_ACCOUNT
+ - AWS_SSO_PERMISSION_SET
+ - CUSTOM
+ - GCP_BUCKET
+ - GCP_COMPUTE_INSTANCE
+ - GCP_FOLDER
+ - GCP_GKE_CLUSTER
+ - GCP_PROJECT
+ - GCP_CLOUD_SQL_POSTGRES_INSTANCE
+ - GCP_CLOUD_SQL_MYSQL_INSTANCE
+ - GIT_HUB_REPO
+ - GIT_LAB_PROJECT
+ - GOOGLE_WORKSPACE_ROLE
+ - MONGO_INSTANCE
+ - MONGO_ATLAS_INSTANCE
+ - OKTA_APP
+ - OKTA_ROLE
+ - OPAL_ROLE
+ - PAGERDUTY_ROLE
+ - TAILSCALE_SSH
+ - SALESFORCE_PERMISSION_SET
+ - SALESFORCE_PROFILE
+ - SALESFORCE_ROLE
+ - WORKDAY_ROLE
+ - MYSQL_INSTANCE
+ - MARIADB_INSTANCE
+ - TELEPORT_ROLE
+ example: AWS_IAM_ROLE
+ type: string
+ VisibilityTypeEnum:
+ description: The visibility level of the entity.
+ enum:
+ - GLOBAL
+ - LIMITED
+ example: GLOBAL
+ type: string
+ UpdateGroupResourcesInfo:
+ example:
+ group_resources:
+ - resource_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
+ access_level_remote_id: ""
+ - resource_id: 6f99639b-7928-4043-8184-47cbc6766145
+ access_level_remote_id: "write"
+ properties:
+ resources:
+ items:
+ $ref: "#/components/schemas/ResourceWithAccessLevel"
+ type: array
+ type: object
+ required:
+ - resources
+ ResourceWithAccessLevel:
+ description: Information about a resource and corresponding access level
+ example:
+ resource_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ access_level_remote_id: "write"
+ properties:
+ resource_id:
+ description: The ID of the resource.
+ example: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ format: uuid
type: string
- created_at:
- description: The day and time the event was created.
- example: 2022-01-23T04:56:07Z
- format: date-time
+ access_level_remote_id:
+ description: The ID of the resource.
+ example: write
type: string
required:
- - event_id
- - actor_user_id
- - event_type
- - created_at
+ - resource_id
type: object
- PaginatedEventList:
+ GroupResourceList:
example:
- next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
- previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
- results:
- - event_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- actor_user_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- created_at: 2022-01-23T04:56:07Z
- event_type: USERS_CREATED
- - event_id: 7646aa9a-e2ee-4eb5-8c62-91f29038a373
- actor_user_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- created_at: 2022-02-03T12:33:02Z
- event_type: USER_TEAM_UPDATED
+ group_resources:
+ - group_id: 7870617d-e72a-47f5-a84c-693817ab4567
+ resource_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
+ access_level_remote_id: ""
+ - group_id: 50333e67-73ce-47ab-b049-d8abcd45f7a1
+ resource_id: 6f99639b-7928-4043-8184-47cbc6766145
+ access_level_remote_id: "write"
properties:
- next:
- description:
- The cursor with which to continue pagination if additional
- result pages exist.
- example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
- nullable: true
- type: string
- previous:
- description: The cursor used to obtain the current result page.
- example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
- nullable: true
- type: string
- results:
+ group_resources:
items:
- $ref: "#/components/schemas/Event"
+ $ref: "#/components/schemas/GroupResource"
type: array
type: object
- PaginatedResourceUserList:
+ required:
+ - group_resources
+ MessageChannelList:
example:
- next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
- previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
- results:
- - full_name: Jake Barnes
- user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- expiration_date: 2022-01-23T04:56:07Z
- email: jake@company.dev
- - full_name: Brett Ashley
- user_id: 7646aa9a-e2ee-4eb5-8c62-91f29038a373
- resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- expiration_date: 2022-02-03T12:33:02Z
- email: brett@company.dev
+ channels:
+ - message_channel_id: 7870617d-e72a-47f5-a84c-693817ab4567
+ third_party_provider: SLACK
+ remote_id: C03FJR97276
+ name: api-team-audit-channel
+ is_private: False
+ - message_channel_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
+ third_party_provider: SLACK
+ remote_id: A4FJR97365D
+ name: api-team-monitor-channel
+ is_private: False
properties:
- next:
- description:
- The cursor with which to continue pagination if additional
- result pages exist.
- example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
- nullable: true
- type: string
- previous:
- description: The cursor used to obtain the current result page.
- example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
- nullable: true
+ channels:
+ items:
+ $ref: "#/components/schemas/MessageChannel"
+ type: array
+ type: object
+ required:
+ - channels
+ OnCallScheduleList:
+ example:
+ on_call_schedules:
+ - on_call_schedule_id: 50d5e9f6-f23f-4d5a-ae91-b2640cf3975e
+ third_party_provider: PAGER_DUTY
+ remote_id: P7OWH2R
+ name: Customer Support On-Call
+ - on_call_schedule_id: 4d61592c-ed61-4b13-8f22-2fac1c49f574
+ third_party_provider: OPSGENIE
+ remote_id: 72a8cb04-9e25-465d-a932-992f72077c61
+ name: Opal Backend On-Call
+ properties:
+ on_call_schedules:
+ items:
+ $ref: "#/components/schemas/OnCallSchedule"
+ type: array
+ type: object
+ required:
+ - on_call_schedules
+ VisibilityInfo:
+ description: Visibility infomation of an entity.
+ example:
+ visibility: LIMITED
+ visibility_group_ids:
+ - 7870617d-e72a-47f5-a84c-693817ab4567
+ - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ properties:
+ visibility:
+ $ref: "#/components/schemas/VisibilityTypeEnum"
+ visibility_group_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ type: object
+ required:
+ - visibility
+ MessageChannelIDList:
+ description: A list of message channel IDs.
+ example:
+ message_channel_ids:
+ - 7870617d-e72a-47f5-a84c-693817ab4567
+ - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ properties:
+ message_channel_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ type: object
+ required:
+ - message_channel_ids
+ OnCallScheduleIDList:
+ description: A list of on call schedule Opal UUIDs. To get the matching remote IDs, use the /on-call-schedules endpoints.
+ example:
+ on_call_schedule_ids:
+ - 9546209c-42c2-4801-96d7-9ec42df0f59c
+ - bb0197c0-5ea5-45d9-b3b7-b6c439be6435
+ properties:
+ on_call_schedule_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ type: object
+ required:
+ - on_call_schedule_ids
+ ReviewerIDList:
+ description: A list of reviewer IDs.
+ example:
+ reviewer_ids:
+ - 7870617d-e72a-47f5-a84c-693817ab4567
+ - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ properties:
+ reviewer_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ type: object
+ required:
+ - reviewer_ids
+ ReviewerStageList:
+ properties:
+ stages:
+ description: A list of reviewer stages.
+ items:
+ $ref: "#/components/schemas/ReviewerStage"
+ type: array
+ type: object
+ required:
+ - stages
+ ReviewerStage:
+ description: A reviewer stage.
+ example:
+ owner_ids:
+ - 7870617d-e72a-47f5-a84c-693817ab4567
+ - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ properties:
+ require_manager_approval:
+ description: Whether this reviewer stage should require manager approval.
+ example: False
+ type: boolean
+ operator:
+ description: The operator of the reviewer stage.
+ enum:
+ - AND
+ - OR
+ example: AND
type: string
- results:
+ owner_ids:
items:
- $ref: "#/components/schemas/ResourceUser"
+ type: string
+ format: uuid
type: array
type: object
- ResourceAccessLevel:
+ required:
+ - operator
+ - require_manager_approval
+ - owner_ids
+ - stage
+ MessageChannel:
description: |-
- # Access Level Object
+ # MessageChannel 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 `MessageChannel` object is used to represent a message channel.
### Usage Example
- View the `ResourceAccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource.
+ Update a groups message channel from the `UPDATE Groups` endpoint.
example:
- access_level_name: AdminRole
- access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess
+ message_channel_id: 6670617d-e72a-47f5-a84c-693817ab4860
+ third_party_provider: SLACK
+ remote_id: C03FJR97276
+ name: api-team-audit-channel
+ is_private: False
properties:
- access_level_name:
- description: The human-readable name of the access level.
- example: AdminRole
+ message_channel_id:
+ description: The ID of the message channel.
+ example: 6670617d-e72a-47f5-a84c-693817ab4860
+ format: uuid
type: string
- access_level_remote_id:
- description: The machine-readable identifier of the access level.
- example: arn:aws:iam::590304332660:role/AdministratorAccess
+ third_party_provider:
+ $ref: "#/components/schemas/MessageChannelProviderEnum"
+ remote_id:
+ description: The remote ID of the message channel
+ example: C03FJR97276
+ type: string
+ name:
+ description: The name of the message channel.
+ example: api-team-audit-channel
type: string
+ is_private:
+ description: A bool representing whether or not the message channel is private.
+ example: False
+ type: boolean
+ type: object
required:
- - access_level_name
- - access_level_remote_id
+ - message_channel_id
+ CreateMessageChannelInfo:
+ description: |-
+ # CreateMessageChannelInfo Object
+ ### Description
+ The `CreateMessageChannelInfo` object is used to describe the message channel object to be created.
+ example:
+ third_party_provider: SLACK
+ remote_id: C03FJR97276
+ properties:
+ third_party_provider:
+ $ref: "#/components/schemas/MessageChannelProviderEnum"
+ remote_id:
+ description: The remote ID of the message channel
+ example: C03FJR97276
+ type: string
type: object
- ResourceUserAccessStatus:
+ required:
+ - third_party_provider
+ - remote_id
+ MessageChannelProviderEnum:
+ description: The third party provider of the message channel.
+ enum:
+ - SLACK
+ example: SLACK
+ type: string
+ OnCallSchedule:
description: |-
- # AccessStatus Object
+ # OnCallSchedule Object
### Description
- The `AccessStatus` object is used to represent the user's access to the resource.
+ The `OnCallSchedule` object is used to represent an on call schedule.
### Usage Example
- View the `AccessStatus` for a resource/user pair to determine if the user has access to the resource.
+ Update a groups on call schedule from the `UPDATE Groups` endpoint.
example:
- user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- expiration_date: 2022-01-23T04:56:07Z
- status: AUTHORIZED
+ on_call_schedule_id: 50d5e9f6-f23f-4d5a-ae91-b2640cf3975e
+ third_party_provider: PAGER_DUTY
+ remote_id: P7OWH2R
+ name: Customer Support On-Call
properties:
- resource_id:
- description: The ID of the resource.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ on_call_schedule_id:
+ description: The ID of the on-call schedule.
+ example: 50d5e9f6-f23f-4d5a-ae91-b2640cf3975e
format: uuid
type: string
- user_id:
- description: The ID of the user.
- example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ third_party_provider:
+ $ref: "#/components/schemas/OnCallScheduleProviderEnum"
+ remote_id:
+ description: The remote ID of the on call schedule
+ example: P7OWH2R
+ type: string
+ name:
+ description: The name of the on call schedule.
+ example: Customer Support On-Call
+ type: string
+ type: object
+ required:
+ - message_channel_id
+ CreateOnCallScheduleInfo:
+ description: |-
+ # CreateOnCallScheduleInfo Object
+ ### Description
+ The `CreateOnCallScheduleInfo` object is used to describe the on call schedule object to be created.
+ example:
+ third_party_provider: PAGER_DUTY
+ remote_id: PNZNINN
+ properties:
+ third_party_provider:
+ $ref: "#/components/schemas/OnCallScheduleProviderEnum"
+ remote_id:
+ description: The remote ID of the on call schedule
+ example: PNZNINN
+ type: string
+ type: object
+ required:
+ - third_party_provider
+ - remote_id
+ OnCallScheduleProviderEnum:
+ description: The third party provider of the on call schedule.
+ enum:
+ - OPSGENIE
+ - PAGER_DUTY
+ example: PAGER_DUTY
+ type: string
+ GroupRemoteInfo:
+ description: Information that defines the remote group. This replaces the deprecated remote_id and metadata fields.
+ properties:
+ active_directory_group:
+ description: Remote info for Active Directory group.
+ properties:
+ group_id:
+ description: The id of the Google group.
+ example: 01fa7402-01d8-103b-8deb-5f3a0ab7884
+ type: string
+ type: object
+ required:
+ - group_id
+ github_team:
+ description: Remote info for GitHub team.
+ properties:
+ team_id:
+ deprecated: true
+ description: The id of the GitHub team.
+ example: 898931321
+ type: string
+ team_slug:
+ description: The slug of the GitHub team.
+ example: opal-security
+ type: string
+ type: object
+ required:
+ - team_slug
+ gitlab_group:
+ description: Remote info for Gitlab group.
+ properties:
+ group_id:
+ description: The id of the Gitlab group.
+ example: 898931321
+ type: string
+ type: object
+ required:
+ - group_id
+ google_group:
+ description: Remote info for Google group.
+ properties:
+ group_id:
+ description: The id of the Google group.
+ example: 1y6w882181n7sg
+ type: string
+ type: object
+ required:
+ - group_id
+ ldap_group:
+ description: Remote info for LDAP group.
+ properties:
+ group_id:
+ description: The id of the LDAP group.
+ example: 01fa7402-01d8-103b-8deb-5f3a0ab7884
+ type: string
+ type: object
+ required:
+ - group_id
+ okta_group:
+ description: Remote info for Okta Directory group.
+ properties:
+ group_id:
+ description: The id of the Okta Directory group.
+ example: 00gjs33pe8rtmRrp3rd6
+ type: string
+ type: object
+ required:
+ - group_id
+ duo_group:
+ description: Remote info for Duo Security group.
+ properties:
+ group_id:
+ description: The id of the Duo Security group.
+ example: DSRD8W89B9DNDBY4RHAC
+ type: string
+ type: object
+ required:
+ - group_id
+ azure_ad_security_group:
+ description: Remote info for Azure AD Security group.
+ properties:
+ group_id:
+ description: The id of the Azure AD 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.
+ properties:
+ group_id:
+ description: The id of the Azure AD Microsoft 365 group.
+ example: 01fa7402-01d8-103b-8deb-5f3a0ab7884
+ type: string
+ type: object
+ required:
+ - group_id
+ type: object
+ ResourceRemoteInfo:
+ description: Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields.
+ properties:
+ aws_account:
+ description: Remote info for AWS account.
+ properties:
+ account_id:
+ description: The id of the AWS account.
+ example: 234234234234
+ type: string
+ type: object
+ required:
+ - account_id
+ aws_permission_set:
+ description: Remote info for AWS Identity Center permission set.
+ properties:
+ arn:
+ description: The ARN of the permission set.
+ example: arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9
+ type: string
+ account_id:
+ description: The ID of an AWS account to which this permission set is provisioned.
+ example: 234234234234
+ type: string
+ type: object
+ required:
+ - arn
+ - account_id
+ aws_iam_role:
+ description: Remote info for AWS IAM role.
+ properties:
+ arn:
+ description: The ARN of the IAM role.
+ example: arn:aws:iam::179308207300:role/MyRole
+ type: string
+ account_id:
+ description: The id of the AWS account. Required for AWS Organizations.
+ example: 234234234234
+ type: string
+ type: object
+ required:
+ - arn
+ aws_ec2_instance:
+ description: Remote info for AWS EC2 instance.
+ properties:
+ instance_id:
+ description: The instanceId of the EC2 instance.
+ example: i-13f1a1e2899f9e93a
+ type: string
+ region:
+ description: The region of the EC2 instance.
+ example: us-east-2
+ type: string
+ account_id:
+ description: The id of the AWS account. Required for AWS Organizations.
+ example: 234234234234
+ type: string
+ type: object
+ required:
+ - instance_id
+ - region
+ aws_rds_instance:
+ description: Remote info for AWS RDS instance.
+ properties:
+ instance_id:
+ description: The instanceId of the RDS instance.
+ example: demo-mysql-db
+ type: string
+ region:
+ description: The region of the RDS instance.
+ example: us-east-2
+ type: string
+ resource_id:
+ description: The resourceId of the RDS instance.
+ example: db-AOO8V0XUCNU13XLZXQDQRSN0NQ
+ type: string
+ account_id:
+ description: The id of the AWS account. Required for AWS Organizations.
+ example: 234234234234
+ type: string
+ type: object
+ required:
+ - instance_id
+ - region
+ - resource_id
+ aws_eks_cluster:
+ description: Remote info for AWS EKS cluster.
+ properties:
+ arn:
+ description: The ARN of the EKS cluster.
+ example: arn:aws:eks:us-east-2:234234234234:cluster/testcluster
+ type: string
+ account_id:
+ description: The id of the AWS account. Required for AWS Organizations.
+ example: 234234234234
+ type: string
+ type: object
+ required:
+ - arn
+ gcp_organization:
+ description: Remote info for GCP organization.
+ properties:
+ organization_id:
+ description: The id of the organization.
+ example: organizations/898931321
+ type: string
+ type: object
+ required:
+ - organization_id
+ gcp_bucket:
+ description: Remote info for GCP bucket.
+ properties:
+ bucket_id:
+ description: The id of the bucket.
+ example: example-bucket-898931321
+ type: string
+ type: object
+ required:
+ - bucket_id
+ gcp_compute_instance:
+ description: Remote info for GCP compute instance.
+ properties:
+ instance_id:
+ description: The id of the instance.
+ example: example-instance-898931321
+ type: string
+ project_id:
+ description: The id of the project the instance is in.
+ example: example-project-898931321
+ type: string
+ zone:
+ description: The zone the instance is in.
+ example: us-central1-a
+ type: string
+ type: object
+ required:
+ - instance_id
+ - project_id
+ - zone
+ gcp_big_query_dataset:
+ description: Remote info for GCP BigQuery Dataset.
+ properties:
+ project_id:
+ description: The id of the project the dataset is in.
+ example: example-project-898931321
+ type: string
+ dataset_id:
+ description: The id of the dataset.
+ example: example-dataset-898931321
+ type: string
+ type: object
+ required:
+ - project_id
+ - dataset_id
+ gcp_big_query_table:
+ description: Remote info for GCP BigQuery Table.
+ properties:
+ project_id:
+ description: The id of the project the table is in.
+ example: example-project-898931321
+ type: string
+ dataset_id:
+ description: The id of the dataset the table is in.
+ example: example-dataset-898931321
+ type: string
+ table_id:
+ description: The id of the table.
+ example: example-table-898931321
+ type: string
+ type: object
+ required:
+ - project_id
+ - dataset_id
+ - table_id
+ gcp_folder:
+ description: Remote info for GCP folder.
+ properties:
+ folder_id:
+ description: The id of the folder.
+ example: folder/898931321
+ type: string
+ type: object
+ required:
+ - folder_id
+ gcp_gke_cluster:
+ description: Remote info for GCP GKE cluster.
+ properties:
+ cluster_name:
+ description: The name of the GKE cluster.
+ example: example-cluster-898931321
+ type: string
+ type: object
+ required:
+ - cluster_name
+ gcp_project:
+ description: Remote info for GCP project.
+ properties:
+ project_id:
+ description: The id of the project.
+ example: example-project-898931321
+ type: string
+ type: object
+ required:
+ - project_id
+ gcp_sql_instance:
+ description: Remote info for GCP SQL instance.
+ properties:
+ instance_id:
+ description: The id of the SQL instance.
+ example: example-sql-898931321
+ type: string
+ project_id:
+ description: The id of the project the instance is in.
+ example: example-project-898931321
+ type: string
+ type: object
+ required:
+ - instance_id
+ - project_id
+ github_repo:
+ description: Remote info for GitHub repository.
+ properties:
+ repo_id:
+ deprecated: true
+ description: The id of the repository.
+ example: 898931321
+ type: string
+ repo_name:
+ description: The name of the repository.
+ example: Opal Security
+ type: string
+ type: object
+ required:
+ - repo_name
+ gitlab_project:
+ description: Remote info for Gitlab project.
+ properties:
+ project_id:
+ description: The id of the project.
+ example: 898931321
+ type: string
+ type: object
+ required:
+ - project_id
+ okta_app:
+ description: Remote info for Okta directory app.
+ properties:
+ app_id:
+ description: The id of the app.
+ example: a9dfas0f678asdf67867
+ type: string
+ type: object
+ required:
+ - app_id
+ okta_standard_role:
+ description: Remote info for Okta directory standard role.
+ properties:
+ role_type:
+ description: The type of the standard role.
+ example: ORG_ADMIN
+ type: string
+ type: object
+ required:
+ - role_type
+ okta_custom_role:
+ description: Remote info for Okta directory custom role.
+ properties:
+ role_id:
+ description: The id of the custom role.
+ example: a9dfas0f678asdf67867
+ type: string
+ type: object
+ required:
+ - role_id
+ pagerduty_role:
+ description: Remote info for Pagerduty role.
+ properties:
+ role_name:
+ description: The name of the role.
+ example: owner
+ type: string
+ type: object
+ required:
+ - role_name
+ salesforce_permission_set:
+ description: Remote info for Salesforce permission set.
+ properties:
+ permission_set_id:
+ description: The id of the permission set.
+ example: 0PS5Y090202wOV7WAM
+ type: string
+ type: object
+ required:
+ - permission_set_id
+ salesforce_profile:
+ description: Remote info for Salesforce profile.
+ properties:
+ profile_id:
+ description: The id of the permission set.
+ example: 0PS5Y090202wOV7WAM
+ type: string
+ user_license_id:
+ description: The id of the user license.
+ example: 1005Y030081Qb5XJHS
+ type: string
+ type: object
+ required:
+ - profile_id
+ - user_license_id
+ salesforce_role:
+ description: Remote info for Salesforce role.
+ properties:
+ role_id:
+ description: The id of the role.
+ example: 0PS5Y090202wOV7WAM
+ type: string
+ type: object
+ required:
+ - role_id
+ teleport_role:
+ description: Remote info for Teleport role.
+ properties:
+ role_name:
+ description: The name role.
+ example: admin_role
+ type: string
+ type: object
+ required:
+ - role_name
+ type: object
+ CreateResourceInfo:
+ description: |-
+ # CreateResourceInfo Object
+ ### Description
+ The `CreateResourceInfo` object is used to store creation info for a resource.
+
+ ### Usage Example
+ Use in the `POST Resources` endpoint.
+ example:
+ remote_resource_id: API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345
+ name: Okta Engineering Super Admin
+ description: Okta super admin role.
+ resource_type: OKTA_ROLE
+ metadata: |-
+ {
+ "okta_directory_role":
+ {
+ "role_id": "SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345",
+ "role_type": "SUPER_ADMIN",
+ },
+ }
+ app_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ properties:
+ name:
+ description: The name of the remote resource.
+ example: mongo-db-prod
+ type: string
+ description:
+ description: A description of the remote resource.
+ example: Engineering team Okta role.
+ type: string
+ resource_type:
+ $ref: "#/components/schemas/ResourceTypeEnum"
+ app_id:
+ description: The ID of the app for the resource.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
format: uuid
type: string
- access_level:
- $ref: "#/components/schemas/ResourceAccessLevel"
- status:
- $ref: "#/components/schemas/ResourceUserAccessStatusEnum"
- expiration_date:
- description: The day and time the user's access will expire.
- example: 2022-01-23T04:56:07Z
- format: date-time
- nullable: true
+ remote_info:
+ $ref: "#/components/schemas/ResourceRemoteInfo"
+ remote_resource_id:
+ deprecated: true
+ 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.
+ example: API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345
+ type: string
+ metadata:
+ deprecated: true
+ 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"
+ }
+ ```
+ example: |-
+ {
+ "okta_directory_role":
+ {
+ "role_id": "SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345",
+ "role_type": "SUPER_ADMIN",
+ },
+ }
type: string
required:
- - expiration_date
- - resource_id
- - status
- - user_id
+ - name
+ - resource_type
+ - app_id
type: object
- ResourceUserAccessStatusEnum:
- description: The status of the user's access to the resource.
- enum:
- - UNAUTHORIZED
- - REQUESTED
- - AUTHORIZED
- example: AUTHORIZED
- type: string
- ResourceUser:
+ CreateGroupInfo:
description: |-
- # Resource User Object
+ # CreateGroupInfo Object
### Description
- The `ResourceUser` object is used to represent a user with access to a resource.
+ The `CreateGroupInfo` object is used to store creation info for a group.
### Usage Example
- Fetch from the `LIST ResourceUsers` endpoint.
+ Use in the `POST Groups` endpoint.
example:
- full_name: Jake Barnes
- user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- expiration_date: 2022-01-23T04:56:07Z
- email: jake@company.dev
+ remote_group_id: 00g4fixjd6Bc9w0TT5d7
+ name: Engineering Team
+ description: Engineering team Okta group.
+ group_type: OKTA_GROUP
+ metadata: |-
+ { "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } }
+ app_id: f454d283-ca87-4a8a-bdbb-df212eca5353
properties:
- resource_id:
- description: The ID of the resource.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- format: uuid
+ name:
+ description: The name of the remote group.
+ example: mongo-db-prod
type: string
- user_id:
- description: The ID of the user.
- example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- format: uuid
+ description:
+ description: A description of the remote group.
+ example: Engineering team Okta group.
type: string
- access_level:
- $ref: "#/components/schemas/ResourceAccessLevel"
- full_name:
- description: The user's full name.
- example: Jake Barnes
+ group_type:
+ $ref: "#/components/schemas/GroupTypeEnum"
+ app_id:
+ description: The ID of the app for the group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
type: string
- email:
- description: The user's email.
- example: jake@company.dev
- format: email
+ remote_info:
+ $ref: "#/components/schemas/GroupRemoteInfo"
+ remote_group_id:
+ deprecated: true
+ 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.
+ example: 00g4fixjd6Bc9w012345
type: string
- expiration_date:
- description: The day and time the user's access will expire.
- example: 2022-01-23T04:56:07Z
- format: date-time
- nullable: true
+ metadata:
+ deprecated: true
+ 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"
+ }
+ ```
+ example: |-
+ { "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } }
type: string
required:
- - email
- - expiration_date
- - full_name
- - resource_id
- - user_id
- - access_level
+ - name
+ - group_type
+ - app_id
type: object
- SessionsList:
+ PaginatedResourcesList:
example:
next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
results:
- - connection_id: h0z968412-2451-4bbd-42h4-057l715d917m
- user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- expiration_date: 2022-01-23T04:56:07Z
- - connection_id: 6e6b5597-bd36-4f4c-a629-01e3fa791932
- user_id: b031c922-b84f-4424-9f4f-c49c05871bfe
- resource_id: 77eb1ab7-2c27-4fc4-afdb-137e1265cddd
- expiration_date: 2022-03-12T07:22:18Z
+ - resource_id: f454d283-ca67-4a8a-bdbb-df212eca5353
+ description: This resource represents AWS IAM role "SupportUser".
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ remote_id: arn:aws:iam::490306337630:role/SupportUser
+ remote_name: SupportUser
+ max_duration: 120
+ require_manager_approval: False
+ require_support_ticket: False
+ parent_resource_id: f454d283-ca67-4a8a-bdbb-df212eca5345
+ - resource_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ description: This resource represents GCP project "app-demo".
+ remote_id: app-demo-307223
+ remote_name: app-demo
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ max_duration: 360
+ require_manager_approval: False
+ require_support_ticket: True
properties:
next:
description:
@@ -1375,500 +5193,876 @@ components:
type: string
results:
items:
- $ref: "#/components/schemas/Session"
+ $ref: "#/components/schemas/Resource"
type: array
type: object
- Session:
+ required:
+ - results
+ RequestStatusEnum:
description: |-
- # Session Object
+ # Request Status
### Description
- The `Session` object is used to represent an access session. Some resources can be accessed temporarily via a time-bounded session.
+ The `RequestStatus` enum is used to represent the status of a request.
### Usage Example
- Fetch from the `LIST Sessions` endpoint.
+ Returned from the `GET Requests` endpoint.
+ enum:
+ - pending
+ - approved
+ - denied
+ - canceled
+ type: string
+ Request:
+ description: |-
+ # Request Object
+ ### Description
+ The `Request` object is used to represent a request.
+
+ ### Usage Example
+ Returned from the `GET Requests` endpoint.
example:
- connection_id: h0z968412-2451-4bbd-42h4-057l715d917m
- user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- expiration_date: 2022-01-23T04:56:07Z
+ id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ created_at: 2021-01-06T20:00:00Z
+ updated_at: 2021-01-06T20:00:00Z
+ requester_id: c86c85d-0651-43e2-a748-d69d658418e8
+ target_user_id: r86c85d-0651-43e2-a748-d69d658418e8
+ status: pending
+ reason: I need this resource.
+ duration_minutes: 1440
+ request_comments:
+ - id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ created_at: 2021-01-06T20:00:00Z
+ updated_at: 2021-01-06T20:00:00Z
+ request_id: 4c86c85d-0651-43e2-a748-d69d658418e8
+ user_id: c86c85d-0651-43e2-a748-d69d658418e8
+ comment: This is a comment.
properties:
- connection_id:
- description: The ID of the connection.
- example: h0z968412-2451-4bbd-42h4-057l715d917m
+ id:
+ description: The unique identifier of the request.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- user_id:
- description: The ID of the user.
- example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ created_at:
+ description: The date and time the request was created.
+ example: 2021-01-06T20:00:00Z
+ format: date-time
+ type: string
+ updated_at:
+ description: The date and time the request was last updated.
+ example: 2021-01-06T20:00:00Z
+ format: date-time
+ type: string
+ requester_id:
+ description: The unique identifier of the user who created the request.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- resource_id:
- description: The ID of the resource.
- example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ target_user_id:
+ description: The unique identifier of the user who is the target of the request.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- access_level:
- $ref: "#/components/schemas/ResourceAccessLevel"
- expiration_date:
- description: The day and time the user's access will expire.
- example: 2022-01-23T04:56:07Z
- format: date-time
- nullable: false
+ status:
+ description: The status of the request.
+ example: pending
+ $ref: "#/components/schemas/RequestStatusEnum"
+ reason:
+ description: The reason for the request.
+ example: I need access to the AWS account.
type: string
- required:
- - connection_id
- - user_id
- - resource_id
- - access_level
- - expiration_date
- type: object
- UsersList:
- example:
- results:
- - user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- email: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- full_name: John Doe
- team_id: 659eeec6-7d77-42c1-add2-b41243c618fd
- position: Senior Engineer
- - user_id: e8581682-04f7-473a-a419-472f0fb26d46
- email: 186511e5-5b5a-4ad7-a4ad-b6c8694a544a
- full_name: Jane Smith
- team_id: 02cc7531-ebce-4cc1-88a3-35ce8bfadf39
- position: Product Marketing Lead
- properties:
- results:
+ duration_minutes:
+ description: The duration of the request in minutes.
+ example: 120
+ type: integer
+ requested_items_list:
+ description: The list of targets for the request.
+ type: array
items:
- $ref: "#/components/schemas/User"
+ $ref: "#/components/schemas/RequestedItem"
+ custom_fields_responses:
+ description: The responses given to the custom fields associated to the request
type: array
- type: object
- User:
+ items:
+ $ref: "#/components/schemas/RequestCustomFieldResponse"
+ required:
+ - id
+ - created_at
+ - updated_at
+ - requester_id
+ - target_user_id
+ - status
+ - reason
+ RequestedItem:
description: |-
- # User Object
+ # Requested Item Object
### Description
- The `User` object is used to represent a user.
+ The `RequestedItem` object is used to represent a request target item.
### Usage Example
- Fetch from the `LIST Sessions` endpoint.
- example:
- user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac
- email: 1b978423-db0a-4037-a4cf-f79c60cb67b3
- full_name: John Doe
- team_id: 659eeec6-7d77-42c1-add2-b41243c618fd
- position: Engineer
+ Returned from the `GET Requests` endpoint.
properties:
- user_id:
- description: The ID of the user.
- example: h0z968412-2451-4bbd-42h4-057l715d917m
+ resource_id:
+ description: The ID of the resource requested.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
format: uuid
type: string
- email:
- description: The email of the user.
- example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
+ group_id:
+ description: The ID of the group requested.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
format: uuid
type: string
- full_name:
- description: The full name of the user.
- example: John Doe
+ access_level_name:
+ description: The name of the access level requested.
+ example: admin
type: string
- team_id:
- description: The ID of the user's team.
- example: 659eeec6-7d77-42c1-add2-b41243c618fd
- nullable: true
- format: uuid
+ 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
- position:
- description: The user's position.
- example: Senior Engineer
+ name:
+ description: The name of the target.
+ example: Engineering Team
type: string
- required:
- - user_id
- - email
- - full_name
- - team_id
- - position
- type: object
- PaginatedGroupsList:
example:
- next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
- previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
- results:
- - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
- description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
- max_duration: 120
- require_manager_approval: False
- require_support_ticket: False
- - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
- description: Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.
- owner_team_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3
- visibility: Team
- max_duration: 360
- require_manager_approval: False
- require_support_ticket: True
+ resource_id: null
+ group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ access_level_name: admin
+ access_level_remote_id: arn:aws:iam::490306337630:role/SupportUser
+ name: Engineering Team
+ RequestCustomFieldResponse:
properties:
- next:
- description:
- The cursor with which to continue pagination if additional
- result pages exist.
- example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
- nullable: true
- type: string
- previous:
- description: The cursor used to obtain the current result page.
- example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
- nullable: true
+ field_name:
type: string
- results:
- items:
- $ref: "#/components/schemas/Group"
- type: array
- type: object
+ field_type:
+ example: SHORT_TEXT
+ $ref: "#/components/schemas/RequestTemplateCustomFieldTypeEnum"
+ field_value:
+ oneOf:
+ - type: string
+ example: "This is a response to a long text or short text or multi choice"
+ - type: boolean
+ example: true
required:
- - results
- Group:
+ - field_name
+ - field_type
+ - field_value
+ RequestTemplateCustomFieldTypeEnum:
+ description: The type of the custom request field.
+ enum:
+ - SHORT_TEXT
+ - LONG_TEXT
+ - BOOLEAN
+ - MULTI_CHOICE
+ RequestList:
description: |-
- # Group Object
+ # Request List
### Description
- The `Group` object is used to represent a group.
+ The `RequestList` object is used to represent a list of requests.
### Usage Example
- Update from the `UPDATE Groups` endpoint.
+ Returned from the `GET Requests` endpoint.
example:
- group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
- description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
+ requests:
+ - id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ created_at: 2021-01-06T20:00:00Z
+ updated_at: 2021-01-06T20:00:00Z
+ requester_id: c86c85d-0651-43e2-a748-d69d658418e8
+ target_user_id: r86c85d-0651-43e2-a748-d69d658418e8
+ status: pending
+ reason: I need this resource.
+ duration_minutes: 1440
+ request_comments:
+ - id: 4c86c85d-0651-43e2-a748-d69d658418e8
+ created_at: 2021-01-06T20:00:00Z
+ updated_at: 2021-01-06T20:00:00Z
+ request_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ user_id: c86c85d-0651-43e2-a748-d69d658418e8
+ comment: This is a comment.
+ cursor: eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0=
+ properties:
+ requests:
+ description: The list of requests.
+ type: array
+ items:
+ $ref: "#/components/schemas/Request"
+ cursor:
+ description: The cursor to use in the next request to get the next page of results.
+ type: string
+ example: eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0=
+ Resource:
+ description: |-
+ # Resource Object
+ ### Description
+ The `Resource` object is used to represent a resource.
+
+ ### Usage Example
+ Update from the `UPDATE Resources` endpoint.
+ example:
+ resource_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ description: This resource represents AWS IAM role "SupportUser".
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ remote_id: 318038399
+ remote_name: repo-name
max_duration: 120
require_manager_approval: False
require_support_ticket: False
+ parent_resource_id: f454d283-ca67-4a8a-bdbb-df212eca5345
properties:
- group_id:
- description: The ID of the group.
+ resource_id:
+ description: The ID of the resource.
example: f454d283-ca87-4a8a-bdbb-df212eca5353
format: uuid
type: string
+ app_id:
+ description: The ID of the app.
+ example: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
+ format: uuid
+ type: string
name:
- description: The name of the group.
- example: API Group
+ description: The name of the resource.
+ example: mongo-db-prod
type: string
description:
- description: A description of the group.
- example: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ description: A description of the resource.
+ example: This resource represents AWS IAM role "SupportUser".
type: string
- owner_team_id:
- description: The ID of the owning team of the group.
+ admin_owner_id:
+ description: The ID of the owner of the resource.
example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- group_function:
- $ref: "#/components/schemas/GroupFunctionEnum"
- group_type:
- $ref: "#/components/schemas/GroupTypeEnum"
- visibility:
- $ref: "#/components/schemas/VisibilityEnum"
+ remote_resource_id:
+ description: The ID of the resource on the remote system.
+ example: 318038399
+ type: string
+ remote_resource_name:
+ description: The name of the resource on the remote system.
+ example: repo-name
+ type: string
+ resource_type:
+ $ref: "#/components/schemas/ResourceTypeEnum"
max_duration:
- description: The maximum duration access to the group can be requested for (in minutes).
+ description: The maximum duration for which the resource can be requested (in minutes).
+ type: integer
+ example: 120
+ recommended_duration:
+ description: The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration.
type: integer
example: 120
require_manager_approval:
- description: A bool representing whether or not access requests to the group require manager approval.
+ description: A bool representing whether or not access requests to the resource require manager approval.
example: False
type: boolean
+ deprecated: true
require_support_ticket:
- description: A bool representing whether or not access requests to the group require a support ticket.
+ description: A bool representing whether or not access requests to the resource require an access ticket.
example: False
type: boolean
- folder_id:
- description: The ID of the folder that the group is located in.
- example: e27cb7b0-98e2-4555-9916-9e6d8ca6b079
+ require_mfa_to_approve:
+ description: A bool representing whether or not to require MFA for reviewers to approve requests for this resource.
+ example: False
+ type: boolean
+ require_mfa_to_request:
+ description: A bool representing whether or not to require MFA for requesting access to this resource.
+ example: False
+ type: boolean
+ require_mfa_to_connect:
+ description: A bool representing whether or not to require MFA to connect to this resource.
+ example: False
+ type: boolean
+ auto_approval:
+ description: A bool representing whether or not to automatically approve requests to this resource.
+ example: False
+ type: boolean
+ request_template_id:
+ description: The ID of the associated request template.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ is_requestable:
+ description: A bool representing whether or not to allow access requests to this resource.
+ example: False
+ type: boolean
+ parent_resource_id:
+ description: The ID of the parent resource.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4305
+ format: uuid
+ type: string
+ configuration_template_id:
+ description: The ID of the associated configuration template.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
format: uuid
type: string
+ request_configurations:
+ type: array
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ description: A list of configurations for requests to this resource.
+ request_configuration_list:
+ description: A list of configurations for requests to this resource. Deprecated in favor of `request_configurations`.
+ deprecated: true
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ type: array
+ 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
+ example: |-
+ {
+ "okta_directory_role":
+ {
+ "role_id": "SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345",
+ "role_type": "SUPER_ADMIN",
+ },
+ }
+ type: string
+ remote_info:
+ $ref: "#/components/schemas/ResourceRemoteInfo"
required:
- - group_id
+ - resource_id
type: object
- UpdateGroupInfoList:
+ AwsPermissionSetMetadata:
+ description: Metadata for AWS Identity Center permission set.
+ properties:
+ aws_permission_set:
+ type: object
+ properties:
+ arn:
+ description: The ARN of the permission set.
+ example: arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9
+ type: string
+ account_id:
+ description: The ID of an AWS account to which this permission set is provisioned.
+ example: 234234234234
+ type: string
+ required:
+ - arn
+ - account_id
+ type: object
+ required:
+ - aws_permission_set
+ UpdateResourceInfoList:
example:
- groups:
- - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
- description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
- name: api-group
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
+ resources:
+ - resource_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: my-mongo-db
+ description: This resource represents AWS IAM role "SupportUser".
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
max_duration: 120
require_manager_approval: False
require_support_ticket: False
- - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
- description: Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.
- name: on-call-integrations
- owner_team_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3
- visibility: Team
+ - resource_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ name: Admin Role
+ description: This resource represents GCP project "app-demo".
+ admin_owner_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3
max_duration: 360
require_manager_approval: False
require_support_ticket: True
properties:
- groups:
- description: A list of groups with information to update.
+ resources:
+ description: A list of resources with information to update.
items:
- $ref: "#/components/schemas/UpdateGroupInfo"
+ $ref: "#/components/schemas/UpdateResourceInfo"
type: array
type: object
required:
- - groups
- UpdateGroupInfo:
+ - resources
+ UpdateResourceInfo:
description: |-
- # UpdateGroupInfo Object
+ # UpdateResourceInfo Object
### Description
- The `UpdateGroupInfo` object is used as an input to the UpdateGroup API.
+ The `UpdateResourceInfo` object is used as an input to the UpdateResource API.
example:
- group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
- description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
- name: api-group
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
+ resource_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: my-mongo-db
+ description: This resource represents AWS IAM role "SupportUser".
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
max_duration: 120
require_manager_approval: False
require_support_ticket: False
properties:
- group_id:
- description: The ID of the group.
+ resource_id:
+ description: The ID of the resource.
example: f454d283-ca87-4a8a-bdbb-df212eca5353
format: uuid
type: string
name:
- description: The name of the group.
- example: api-group
+ description: The name of the resource.
+ example: my-mongo-db
type: string
description:
- description: A description of the group.
- example: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.
+ description: A description of the resource.
+ example: This resource represents AWS IAM role "SupportUser".
type: string
- owner_team_id:
- description: The ID of the owning team of the group. Use empty string to remove owner. Required when converting from Team to Group.
+ admin_owner_id:
+ description: The ID of the owner of the resource.
example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- visibility:
- $ref: "#/components/schemas/VisibilityEnum"
max_duration:
- description: The maximum duration access to the group can be requested for (in minutes). Use 0 to set to indefinite.
+ description: The maximum duration for which the resource can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`.
type: integer
example: 120
+ deprecated: true
+ recommended_duration:
+ description: The recommended duration for which the resource should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`.
+ type: integer
+ example: 120
+ deprecated: true
require_manager_approval:
- description: A bool representing whether or not access requests to the group require manager approval.
+ description: A bool representing whether or not access requests to the resource require manager approval.
example: False
type: boolean
+ deprecated: true
require_support_ticket:
- description: A bool representing whether or not access requests to the group require a support ticket.
+ description: A bool representing whether or not access requests to the resource require an access ticket. Deprecated in favor of `request_configurations`.
example: False
type: boolean
+ deprecated: true
folder_id:
- description: The ID of the folder that the group is located in.
+ description: The ID of the folder that the resource is located in.
example: e27cb7b0-98e2-4555-9916-9e6d8ca6b079
format: uuid
type: string
+ deprecated: true
+ require_mfa_to_approve:
+ description: A bool representing whether or not to require MFA for reviewers to approve requests for this resource.
+ example: False
+ type: boolean
+ require_mfa_to_request:
+ description: A bool representing whether or not to require MFA for requesting access to this resource. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ require_mfa_to_connect:
+ description: A bool representing whether or not to require MFA to connect to this resource.
+ example: False
+ type: boolean
+ auto_approval:
+ description: A bool representing whether or not to automatically approve requests to this resource. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ configuration_template_id:
+ description: The ID of the associated configuration template.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ request_template_id:
+ description: The ID of the associated request template. Deprecated in favor of `request_configurations`.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
+ format: uuid
+ type: string
+ deprecated: true
+ is_requestable:
+ description: A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`.
+ example: False
+ type: boolean
+ deprecated: true
+ request_configurations:
+ type: array
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ description: A list of configurations for requests to this resource. If not provided, the default request configuration will be used.
+ request_configuration_list:
+ 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`.
+ $ref: "#/components/schemas/CreateRequestConfigurationInfoList"
+ deprecated: true
+ example:
+ request_configurations:
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition: null
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 0
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e9
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition:
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b4
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 1
required:
- - group_id
+ - resource_id
type: object
- GroupTypeEnum:
- description: The type of the group.
- enum:
- - ACTIVE_DIRECTORY_GROUP
- - DUO_GROUP
- - GIT_HUB_TEAM
- - GOOGLE_GROUPS_GROUP
- - LDAP_GROUP
- - OKTA_GROUP
- - OPAL_GROUP
- example: OPAL_GROUP
- type: string
- GroupFunctionEnum:
- description: The function type of the group.
- enum:
- - REGULAR
- - ON_CALL
- - TEAM
- - UNKNOWN
- example: REGULAR
- type: string
- ResourceTypeEnum:
- description: The type of the resource.
- enum:
- - AWS_IAM_ROLE
- - AWS_EC2_INSTANCE
- - AWS_EKS_CLUSTER
- - AWS_RDS_POSTGRES_INSTANCE
- - AWS_RDS_MYSQL_INSTANCE
- - CUSTOM
- - GCP_BUCKET
- - GCP_COMPUTE_INSTANCE
- - GCP_FOLDER
- - GCP_GKE_CLUSTER
- - GCP_PROJECT
- - GCP_CLOUD_SQL_POSTGRES_INSTANCE
- - GCP_CLOUD_SQL_MYSQL_INSTANCE
- - GIT_HUB_REPO
- - GOOGLE_WORKSPACE_ROLE
- - MONGO_INSTANCE
- - MONGO_ATLAS_INSTANCE
- - OKTA_APP
- - OKTA_ROLE
- - OPAL_ROLE
- - PAGERDUTY_ROLE
- - SALESFORCE_PERMISSION_SET
- - SALESFORCE_PROFILE
- - SALESFORCE_ROLE
- - WORKDAY_ROLE
- - MYSQL_INSTANCE
- - MARIADB_INSTANCE
- example: AWS_IAM_ROLE
- type: string
- VisibilityEnum:
- description: The visibility level of the entity.
- enum:
- - GLOBAL
- - TEAM
- example: GLOBAL
- type: string
- MessageChannelList:
+ PaginatedTagsList:
+ example:
+ next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ results:
+ - tag_id: f290a738-5f9f-43c2-ad67-fa31ff0eb946
+ created_at: 2022-01-23T04:56:07Z
+ updated_at: 2022-02-23T01:34:07Z
+ user_creator_id: d4a7d928-783e-4599-8ec6-088d635a5bcc
+ admin_owner_id: bfb518b1-3f5b-4e3b-8eb8-3b3fabd4ea2b
+ key: database-name
+ value: redis_db
+ - tag_id: 92f0a738-5f9f-43c2-ad67-fa31ff0eb052
+ created_at: 2022-03-23T04:56:07Z
+ updated_at: 2022-04-23T01:34:07Z
+ user_creator_id: a4d7d928-783e-4599-8ec6-088d635af4ac
+ admin_owner_id: gtg418b1-3f5b-4e3b-8eb8-3b3fabd4eaa1
+ key: database-type
+ value: sql
+ properties:
+ next:
+ description:
+ The cursor with which to continue pagination if additional
+ result pages exist.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ nullable: true
+ type: string
+ previous:
+ description: The cursor used to obtain the current result page.
+ example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
+ nullable: true
+ type: string
+ results:
+ items:
+ $ref: "#/components/schemas/Tag"
+ type: array
+ required:
+ - results
+ type: object
+ TagsList:
+ example:
+ results:
+ - tag_id: f290a738-5f9f-43c2-ad67-fa31ff0eb946
+ created_at: 2022-01-23T04:56:07Z
+ updated_at: 2022-02-23T01:34:07Z
+ user_creator_id: d4a7d928-783e-4599-8ec6-088d635a5bcc
+ admin_owner_id: bfb518b1-3f5b-4e3b-8eb8-3b3fabd4ea2b
+ key: database-name
+ value: redis_db
+ - tag_id: 92f0a738-5f9f-43c2-ad67-fa31ff0eb052
+ created_at: 2022-03-23T04:56:07Z
+ updated_at: 2022-04-23T01:34:07Z
+ user_creator_id: a4d7d928-783e-4599-8ec6-088d635af4ac
+ admin_owner_id: gtg418b1-3f5b-4e3b-8eb8-3b3fabd4eaa1
+ key: database-type
+ value: sql
+ properties:
+ tags:
+ items:
+ $ref: "#/components/schemas/Tag"
+ type: array
+ required:
+ - tags
+ type: object
+ Tag:
+ description: |-
+ # Tag Object
+ ### Description
+ The `Tag` object is used to represent a tag.
+
+ ### Usage Example
+ Get tags from the `GET Tag` endpoint.
+ example:
+ tag_id: f290a738-5f9f-43c2-ad67-fa31ff0eb946
+ created_at: 2022-01-23T04:56:07Z
+ updated_at: 2022-02-23T01:34:07Z
+ user_creator_id: d4a7d928-783e-4599-8ec6-088d635a5bcc
+ key: database-name
+ value: redis_db
+ properties:
+ tag_id:
+ description: The ID of the tag.
+ example: f290a738-5f9f-43c2-ad67-fa31ff0eb946
+ format: uuid
+ type: string
+ created_at:
+ description: The date the tag was created.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
+ type: string
+ updated_at:
+ description: The date the tag was last updated.
+ example: 2022-02-23T01:34:07Z
+ format: date-time
+ type: string
+ user_creator_id:
+ description: The ID of the user that created the tag.
+ example: d4a7d928-783e-4599-8ec6-088d635a5bcc
+ format: uuid
+ type: string
+ key:
+ description: The key of the tag.
+ example: database-name
+ type: string
+ value:
+ description: The value of the tag.
+ example: redis_db
+ type: string
+ type: object
+ required:
+ - tag_id
+ CreateTagInfo:
+ description: |-
+ # CreateTagInfo Object
+ ### Description
+ The `CreateTagInfo` object is used to represent configuration for a new tag.
+
+ ### Usage Example
+ Use in the `POST Tag` endpoint.
example:
- channels:
- - message_channel_id: 7870617d-e72a-47f5-a84c-693817ab4567
- third_party_provider: SLACK
- remote_id: C03FJR97276
- name: api-team-audit-channel
- message_channel_type: AUDIT
- is_private: False
- - message_channel_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
- third_party_provider: SLACK
- remote_id: A4FJR97365D
- name: api-team-monitor-channel
- message_channel_type: MONITOR
- is_private: False
+ tag_key: api-scope
+ tag_value: production
properties:
- channels:
+ tag_key:
+ description: The key of the tag to create.
+ example: api-scope
+ type: string
+ tag_value:
+ description: The value of the tag to create.
+ example: production
+ type: string
+ required:
+ - tag_key
+ type: object
+ PaginatedGroupBindingsList:
+ example:
+ next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ previous: cj1sZXdwd2VycWtJ
+ results:
+ - group_binding_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ created_by_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ created_at: 2022-01-23T04:56:07Z
+ source_group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ groups:
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ group_type: OKTA_GROUP
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ group_type: AWS_SSO_GROUP
+ - group_binding_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ created_by_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ source_group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ created_at: 2022-01-23T04:56:07Z
+ groups:
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ group_type: AWS_SSO_GROUP
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ group_type: OKTA_GROUP
+ properties:
+ next:
+ description:
+ The cursor with which to continue pagination if additional
+ result pages exist.
+ example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
+ nullable: true
+ type: string
+ previous:
+ description: The cursor used to obtain the current result page.
+ example: cj1sZXdwd2VycWtJ
+ nullable: true
+ type: string
+ results:
items:
- $ref: "#/components/schemas/MessageChannel"
+ $ref: "#/components/schemas/GroupBinding"
type: array
- type: object
required:
- - channels
- MessageChannelIDList:
- description: A list of message channel IDs.
+ - results
+ CreateGroupBindingInfo:
+ description: |-
+ # CreateGroupBindingInfo Object
+ ### Description
+ The `CreateGroupBindingInfo` object is used as an input to the CreateGroupBinding API.
example:
- message_channel_ids:
- - 7870617d-e72a-47f5-a84c-693817ab4567
- - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ source_group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ groups:
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
properties:
- message_channel_ids:
+ source_group_id:
+ description: The ID of the source group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ groups:
+ description: The list of groups.
items:
- type: string
- format: uuid
+ properties:
+ group_id:
+ description: The ID of the group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ required:
+ - group_id
type: array
- type: object
required:
- - message_channel_ids
- ReviewerIDList:
- description: A list of reviewer IDs.
+ - source_group_id
+ - groups
+ type: object
+ UpdateGroupBindingInfoList:
example:
- reviewer_ids:
- - 7870617d-e72a-47f5-a84c-693817ab4567
- - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ group_bindings:
+ - group_binding_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ source_group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ groups:
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ - group_binding_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ source_group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ groups:
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
properties:
- reviewer_ids:
+ group_bindings:
+ description: A list of group bindings with information to update.
items:
- type: string
- format: uuid
+ $ref: "#/components/schemas/UpdateGroupBindingInfo"
type: array
type: object
required:
- - reviewer_ids
- NewAdminIDList:
+ - group_bindings
+ UpdateGroupBindingInfo:
+ description: |-
+ # UpdateGroupBindingInfo Object
+ ### Description
+ The `UpdateGroupBindingInfo` object is used as an input to the UpdateGroupBinding API.
example:
- admin_ids:
- - 7870617d-e72a-47f5-a84c-693817ab4567
- - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ group_binding_id: 0ae19dbf-324d-4216-999c-574d46182c7e
+ source_group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ groups:
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
properties:
- admin_ids:
- description: The IDs of admins to set for the group if converting to a team. Required when converting from Group to Team.
+ group_binding_id:
+ description: The ID of the group binding.
+ example: 0ae19dbf-324d-4216-999c-574d46182c7e
+ format: uuid
+ type: string
+ source_group_id:
+ description: The ID of the source group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ groups:
+ description: The list of groups.
items:
- type: string
- format: uuid
+ properties:
+ group_id:
+ description: The ID of the group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ required:
+ - group_id
type: array
+ required:
+ - group_binding_id
+ - source_group_id
+ - groups
type: object
- MessageChannel:
+ GroupBinding:
description: |-
- # MessageChannel Object
+ # Group Binding Object
### Description
- The `MessageChannel` object is used to represent a message channel.
+ The `GroupBinding` object is used to represent a group binding.
### Usage Example
- Update a groups message channel from the `UPDATE Groups` endpoint.
+ Get group bindings from the `GET Group Bindings` endpoint.
example:
- message_channel_id: 6670617d-e72a-47f5-a84c-693817ab4860
- third_party_provider: SLACK
- remote_id: C03FJR97276
- name: api-team-audit-channel
- message_channel_type: AUDIT
- is_private: False
+ group_binding_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ created_by_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ created_at: 2022-01-23T04:56:07Z
+ source_group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ groups:
+ - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ group_type: OKTA_GROUP
+ - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ group_type: AWS_SSO_GROUP
properties:
- message_channel_id:
- description: The ID of the message channel.
- example: 6670617d-e72a-47f5-a84c-693817ab4860
+ group_binding_id:
+ description: The ID of the group binding.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
format: uuid
type: string
- third_party_provider:
- $ref: "#/components/schemas/MessageChannelProviderEnum"
- remote_id:
- description: The remote ID of the message channel
- example: C03FJR97276
+ created_by_id:
+ description: The ID of the user that created the group binding.
+ example: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ format: uuid
type: string
- name:
- description: The name of the message channel.
- example: api-team-audit-channel
+ created_at:
+ description: The date the group binding was created.
+ example: 2022-01-23T04:56:07Z
+ format: date-time
type: string
- message_channel_type:
- $ref: "#/components/schemas/MessageChannelTypeEnum"
- is_private:
- description: A bool representing whether or not the message channel is private.
- example: False
- type: boolean
- type: object
+ source_group_id:
+ description: The ID of the source group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ groups:
+ description: The list of groups.
+ items:
+ $ref: "#/components/schemas/GroupBindingGroup"
+ type: array
required:
- - message_channel_id
- MessageChannelTypeEnum:
- description: The type of the message channel.
- enum:
- - AUDIT
- - REVIEWER
- - MONITOR
- example: AUDIT
- type: string
- MessageChannelProviderEnum:
- description: The third party provider of the message channel.
- enum:
- - SLACK
- example: SLACK
- type: string
- PaginatedResourcesList:
+ - group_binding_id
+ - created_by_id
+ - created_at
+ - source_group_id
+ - groups
+ GroupBindingGroup:
+ description: |-
+ # Group Binding Group Object
+ ### Description
+ The `GroupBindingGroup` object is used to represent a group binding group.
+
+ ### Usage Example
+ Get group binding groups from the `GET Group Bindings` endpoint.
+ example:
+ group_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ group_type: OKTA_GROUP
+ properties:
+ group_id:
+ description: The ID of the group.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ group_type:
+ $ref: "#/components/schemas/GroupTypeEnum"
+ required:
+ - group_id
+ - group_type
+ type: object
+ PaginatedOwnersList:
example:
next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ
results:
- - resource_id: f454d283-ca67-4a8a-bdbb-df212eca5353
- description: This resource represents AWS IAM role "SupportUser".
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
- max_duration: 120
- require_manager_approval: False
- require_support_ticket: False
- - resource_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
- description: This resource represents GCP project "app-demo".
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Team
- max_duration: 360
- require_manager_approval: False
- require_support_ticket: True
+ - owner_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: API Owner
+ description: This owner represents the API team owners.
+ access_request_escalation_period: 120
+ - owner_id: e8581682-04f7-473a-a419-472f0fb26d46
+ name: Finance Owner
+ description: This owner represents the Finance team owners.
+ access_request_escalation_period: 120
properties:
next:
description:
@@ -1884,231 +6078,694 @@ components:
type: string
results:
items:
- $ref: "#/components/schemas/Resource"
+ $ref: "#/components/schemas/Owner"
type: array
type: object
required:
- results
- Resource:
+ Owner:
description: |-
- # Resource Object
+ # Owner Object
### Description
- The `Resource` object is used to represent a resource.
+ The `Owner` object is used to represent an owner.
+ example:
+ owner_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: API Owner
+ description: This owner represents the API team owners.
+ access_request_escalation_period: 120
+ properties:
+ owner_id:
+ description: The ID of the owner.
+ example: f454d283-ca87-4a8a-bdbb-df212eca5353
+ format: uuid
+ type: string
+ name:
+ description: The name of the owner.
+ example: API Owner
+ type: string
+ description:
+ description: A description of the owner.
+ example: This owner represents the API team owners.
+ type: string
+ access_request_escalation_period:
+ description: The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy.
+ type: integer
+ example: 120
+ reviewer_message_channel_id:
+ example: 37cb7e41-12ba-46da-92ff-030abe0450b1
+ format: uuid
+ type: string
+ nullable: true
+ source_group_id:
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ nullable: true
+ required:
+ - owner_id
+ type: object
+ CreateOwnerInfo:
+ description: |-
+ # CreateOwnerInfo Object
+ ### Description
+ The `CreateOwnerInfo` object is used to store creation info for an owner.
### Usage Example
- Update from the `UPDATE Resources` endpoint.
+ Use in the `POST Owners` endpoint.
example:
- resource_id: f454d283-ca87-4a8a-bdbb-df212eca5353
- description: This resource represents AWS IAM role "SupportUser".
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
- max_duration: 120
- require_manager_approval: False
- require_support_ticket: False
+ name: API Owner
+ description: This owner represents the API team owners.
+ access_request_escalation_period: 120
+ properties:
+ name:
+ description: The name of the owner.
+ example: API Owner
+ type: string
+ description:
+ description: A description of the owner.
+ example: This owner represents the API team owners.
+ type: string
+ access_request_escalation_period:
+ description: The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy.
+ type: integer
+ example: 120
+ user_ids:
+ description: Users to add to the created owner. If setting a source_group_id this list must be empty.
+ example:
+ - 7870617d-e72a-47f5-a84c-693817ab4567
+ - 1520617d-e72a-47f5-a84c-693817ab48ad2
+ items:
+ type: string
+ format: uuid
+ type: array
+ 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.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ required:
+ - name
+ - user_ids
+ type: object
+ UpdateOwnerInfoList:
+ example:
+ owners:
+ - owner_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: API Owner
+ description: This owner represents the API team owners.
+ access_request_escalation_period: 120
+ - owner_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
+ name: Finance Owner
+ description: This owner represents the Finance team owners.
+ access_request_escalation_period: 15
+ properties:
+ owners:
+ description: A list of owners with information to update.
+ items:
+ $ref: "#/components/schemas/UpdateOwnerInfo"
+ type: array
+ type: object
+ required:
+ - owners
+ UpdateOwnerInfo:
+ description: |-
+ # UpdateOwnerInfo Object
+ ### Description
+ The `UpdateOwnerInfo` object is used as an input to the UpdateOwner API.
+ example:
+ owner_id: f454d283-ca87-4a8a-bdbb-df212eca5353
+ name: API Owner
+ description: This owner represents the API team owners.
+ access_request_escalation_period: 120
properties:
- resource_id:
- description: The ID of the resource.
+ owner_id:
+ description: The ID of the owner.
example: f454d283-ca87-4a8a-bdbb-df212eca5353
format: uuid
type: string
name:
- description: The name of the resource.
- example: mongo-db-prod
+ description: The name of the owner.
+ example: API Owner
type: string
description:
- description: A description of the resource.
- example: This resource represents AWS IAM role "SupportUser".
+ description: A description of the owner.
+ example: This owner represents the API team owners.
type: string
- owner_team_id:
- description: The ID of the owning team of the resource.
- example: 7c86c85d-0651-43e2-a748-d69d658418e8
+ access_request_escalation_period:
+ description: The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy.
+ example: 120
+ type: integer
+ 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
- visibility:
- $ref: "#/components/schemas/VisibilityEnum"
- resource_type:
- $ref: "#/components/schemas/ResourceTypeEnum"
- max_duration:
- description: The maximum duration access to the resource can be requested for (in minutes).
- type: integer
- example: 120
- require_manager_approval:
- description: A bool representing whether or not access requests to the resource require manager approval.
+ source_group_id:
+ description: Sync this owner's user list with a source group. Use "" to remove an existing source group.
+ example: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ format: uuid
+ type: string
+ required:
+ - owner_id
+ type: object
+ Condition:
+ description: |-
+ # Condition Object
+ ### Description
+ The `Condition` object is used to represent a condition.
+
+ ### Usage Example
+ Used to match request configurations to users in `RequestConfiguration`
+ example:
+ group_ids:
+ - 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ type: object
+ properties:
+ group_ids:
+ description: The list of group IDs to match.
+ example:
+ - 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ items:
+ type: string
+ format: uuid
+ type: array
+ role_remote_ids:
+ description: The list of role remote IDs to match.
+ example:
+ - arn:aws:iam::590304332660:role/AdministratorAccess
+ type: array
+ items:
+ type: string
+ RequestConfiguration:
+ description: |-
+ # Request Configuration Object
+ ### Description
+ The `RequestConfiguration` object is used to represent a request configuration.
+
+ ### Usage Example
+ Returned from the `GET Request Configurations` endpoint.
+ example:
+ request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ created_at: 2021-01-06T20:00:00Z
+ updated_at: 2021-01-06T20:00:00Z
+ condition:
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 1
+ type: object
+ properties:
+ condition:
+ description: The condition for the request configuration.
+ $ref: "#/components/schemas/Condition"
+ allow_requests:
+ description: A bool representing whether or not to allow requests for this resource.
+ example: True
+ type: boolean
+ auto_approval:
+ description: A bool representing whether or not to automatically approve requests for this resource.
example: False
type: boolean
+ require_mfa_to_request:
+ description: A bool representing whether or not to require MFA for requesting access to this resource.
+ example: False
+ type: boolean
+ max_duration_minutes:
+ description: The maximum duration for which the resource can be requested (in minutes).
+ type: integer
+ example: 120
+ recommended_duration_minutes:
+ description: The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration.
+ type: integer
+ example: 120
require_support_ticket:
- description: A bool representing whether or not access requests to the resource require a support ticket.
+ description: A bool representing whether or not access requests to the resource require an access ticket.
example: False
type: boolean
- folder_id:
- description: The ID of the folder that the resource is located in.
- example: e27cb7b0-98e2-4555-9916-9e6d8ca6b079
+ request_template_id:
+ description: The ID of the associated request template.
+ example: 06851574-e50d-40ca-8c78-f72ae6ab4304
format: uuid
type: string
+ reviewer_stages:
+ description: The list of reviewer stages for the request configuration.
+ items:
+ $ref: "#/components/schemas/ReviewerStage"
+ type: array
+ priority:
+ description: The priority of the request configuration.
+ example: 1
+ type: integer
required:
- - resource_id
- type: object
- UpdateResourceInfoList:
+ - organization_id
+ - allow_requests
+ - auto_approval
+ - require_mfa_to_request
+ - require_support_ticket
+ - reviewer_stages
+ - priority
+ CreateRequestConfigurationInfoList:
+ description: |-
+ # CreateRequestConfigurationInfoList Object
+ ### Description
+ The `CreateRequestConfigurationInfoList` object is used as an input to the CreateRequestConfigurations API.
+
+ ### Formatting Requirements
+ The `CreateRequestConfigurationInfoList` object must contain a list of `RequestConfiguration` objects.
+ Exactly one default `RequestConfiguration` must be provided. A default `RequestConfiguration` is one with a `condition` of `null`
+ and a `priority` of `0`. The default `RequestConfiguration` will be used when no other `RequestConfiguration` matches the request.
+
+ Only one `RequestConfiguration` may be provided for each priority, and the priorities must be contiguous. For example, if there are
+ two `RequestConfigurations` with priorities 0 and 2, there must be a `RequestConfiguration` with priority 1.
+
+ To use the `condition` field, the `condition` must be a valid JSON object.
+
+ The `condition` must be a JSON object with the key `group_ids` (more options may be added in the future), whose value is a list of
+ group IDs.
+ The `condition` will match if the user requesting access is a member of any of the groups in the list. Currently, we only support
+ using a single group as a condition.
example:
- resources:
- - resource_id: f454d283-ca87-4a8a-bdbb-df212eca5353
- name: my-mongo-db
- description: This resource represents AWS IAM role "SupportUser".
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
- max_duration: 120
- require_manager_approval: False
+ request_configurations:
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition: null
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
require_support_ticket: False
- - resource_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b
- name: Admin Role
- description: This resource represents GCP project "app-demo".
- owner_team_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3
- visibility: Team
- max_duration: 360
- require_manager_approval: False
- require_support_ticket: True
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 0
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e9
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition:
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b4
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 1
properties:
- resources:
- description: A list of resources with information to update.
+ request_configurations:
+ description: A list of request configurations to create.
items:
- $ref: "#/components/schemas/UpdateResourceInfo"
+ $ref: "#/components/schemas/RequestConfiguration"
type: array
type: object
required:
- - resources
- UpdateResourceInfo:
+ - request_configurations
+ CreateConfigurationTemplateInfo:
description: |-
- # UpdateResourceInfo Object
+ # CreateConfigurationTemplateInfo Object
### Description
- The `UpdateResourceInfo` object is used as an input to the UpdateResource API.
+ The `CreateConfigurationTemplateInfo` object is used to store creation info for a configuration template.
+
+ ### Usage Example
+ Use in the `POST Configuration Templates` endpoint.
example:
- resource_id: f454d283-ca87-4a8a-bdbb-df212eca5353
- name: my-mongo-db
- description: This resource represents AWS IAM role "SupportUser".
- owner_team_id: 7c86c85d-0651-43e2-a748-d69d658418e8
- visibility: Global
- max_duration: 120
- require_manager_approval: False
- require_support_ticket: False
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ visibility: private
+ linked_audit_message_channel_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ member_oncall_schedule_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ break_glass_user_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ require_mfa_to_approve: False
+ require_mfa_to_connect: False
+ name: Prod AWS Template
+ required:
+ - admin_owner_id
+ - visibility
+ - name
+ - require_mfa_to_approve
+ - require_mfa_to_connect
properties:
- resource_id:
- description: The ID of the resource.
- example: f454d283-ca87-4a8a-bdbb-df212eca5353
- format: uuid
- type: string
- name:
- description: The name of the resource.
- example: my-mongo-db
- type: string
- description:
- description: A description of the resource.
- example: This resource represents AWS IAM role "SupportUser".
- type: string
- owner_team_id:
- description: The ID of the owning team of the resource.
+ admin_owner_id:
+ description: The ID of the owner of the configuration template.
example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
visibility:
- $ref: "#/components/schemas/VisibilityEnum"
- max_duration:
- description: The maximum duration access to the resource can be requested for (in minutes). Use 0 to set to indefinite.
- type: integer
- example: 120
- require_manager_approval:
- description: A bool representing whether or not access requests to the resource require manager approval.
+ description: The visibility info of the configuration template.
+ example: private
+ $ref: "#/components/schemas/VisibilityInfo"
+ linked_audit_message_channel_ids:
+ description: The IDs of the audit message channels linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ member_oncall_schedule_ids:
+ description: The IDs of the on-call schedules linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ break_glass_user_ids:
+ description: The IDs of the break glass users linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ require_mfa_to_approve:
+ description: A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.
example: False
type: boolean
- require_support_ticket:
- description: A bool representing whether or not access requests to the resource require a support ticket.
+ require_mfa_to_connect:
+ description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template.
example: False
type: boolean
- folder_id:
- description: The ID of the folder that the resource is located in.
- example: e27cb7b0-98e2-4555-9916-9e6d8ca6b079
- format: uuid
+ name:
+ description: The name of the configuration template.
+ example: Prod AWS Template
type: string
- required:
- - resource_id
- type: object
- TagsList:
- example:
- results:
- - tag_id: f290a738-5f9f-43c2-ad67-fa31ff0eb946
- created_at: 2022-01-23T04:56:07Z
- updated_at: 2022-02-23T01:34:07Z
- user_creator_id: d4a7d928-783e-4599-8ec6-088d635a5bcc
- owner_team_id: bfb518b1-3f5b-4e3b-8eb8-3b3fabd4ea2b
- key: database-name
- value: redis_db
- - tag_id: 92f0a738-5f9f-43c2-ad67-fa31ff0eb052
- created_at: 2022-03-23T04:56:07Z
- updated_at: 2022-04-23T01:34:07Z
- user_creator_id: a4d7d928-783e-4599-8ec6-088d635af4ac
- owner_team_id: gtg418b1-3f5b-4e3b-8eb8-3b3fabd4eaa1
- key: database-type
- value: sql
- properties:
- tags:
- items:
- $ref: "#/components/schemas/Tag"
+ request_configurations:
type: array
- required:
- - tags
- type: object
- Tag:
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ description: The request configuration list of the configuration template. If not provided, the default request configuration will be used.
+ request_configuration_list:
+ 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`.
+ $ref: "#/components/schemas/CreateRequestConfigurationInfoList"
+ deprecated: true
+ example:
+ request_configurations:
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition: null
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 0
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e9
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition:
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b4
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 1
+ ConfigurationTemplate:
description: |-
- # Tag Object
+ # Configuration Template Object
### Description
- The `Tag` object is used to represent a tag.
+ The `ConfigurationTemplate` object is used to represent a configuration template.
### Usage Example
- Get tags from the `GET Tag` endpoint.
+ Returned from the `GET Configuration Templates` endpoint.
example:
- tag_id: f290a738-5f9f-43c2-ad67-fa31ff0eb946
- created_at: 2022-01-23T04:56:07Z
- updated_at: 2022-02-23T01:34:07Z
- user_creator_id: d4a7d928-783e-4599-8ec6-088d635a5bcc
- owner_team_id: bfb518b1-3f5b-4e3b-8eb8-3b3fabd4ea2b
- key: database-name
- value: redis_db
+ configuration_template_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ visibility: private
+ linked_audit_message_channel_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ member_oncall_schedule_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ break_glass_user_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ require_mfa_to_approve: False
+ require_mfa_to_connect: False
+ name: Prod AWS Template
properties:
- tag_id:
- description: The ID of the tag.
- example: f290a738-5f9f-43c2-ad67-fa31ff0eb946
+ configuration_template_id:
+ description: The ID of the configuration template.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- created_at:
- description: The date the tag was created.
- example: 2022-01-23T04:56:07Z
- format: date-time
+ name:
+ description: The name of the configuration template.
+ example: Prod AWS Template
type: string
- updated_at:
- description: The date the tag was last updated.
- example: 2022-02-23T01:34:07Z
- format: date-time
+ admin_owner_id:
+ description: The ID of the owner of the configuration template.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
+ format: uuid
type: string
- user_creator_id:
- description: The ID of the user that created the tag.
- example: d4a7d928-783e-4599-8ec6-088d635a5bcc
+ visibility:
+ description: The visibility info of the configuration template.
+ example: private
+ $ref: "#/components/schemas/VisibilityInfo"
+ linked_audit_message_channel_ids:
+ description: The IDs of the audit message channels linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ request_configuration_id:
+ description: The ID of the request configuration linked to the configuration template.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- owner_team_id:
- description: The ID of the team that owns the tag.
- example: bfb518b1-3f5b-4e3b-8eb8-3b3fabd4ea2b
+ member_oncall_schedule_ids:
+ description: The IDs of the on-call schedules linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ break_glass_user_ids:
+ description: The IDs of the break glass users linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ require_mfa_to_approve:
+ description: A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.
+ example: False
+ type: boolean
+ require_mfa_to_connect:
+ description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template.
+ example: False
+ type: boolean
+ UpdateConfigurationTemplateInfo:
+ description: |-
+ # UpdateConfigurationTemplateInfo Object
+ ### Description
+ The `ConfigurationTemplate` object is used to represent an update to a configuration template.
+
+ ### Usage Example
+ Use in the `PUT Configuration Templates` endpoint.
+ example:
+ configuration_template_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ visibility: private
+ linked_audit_message_channel_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ member_oncall_schedule_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ break_glass_user_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ require_mfa_to_approve: False
+ require_mfa_to_connect: False
+ name: Prod AWS Template
+ required:
+ - configuration_template_id
+ properties:
+ configuration_template_id:
+ description: The ID of the configuration template.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
format: uuid
type: string
- key:
- description: The key of the tag.
- example: database-name
+ name:
+ description: The name of the configuration template.
+ example: Prod AWS Template
type: string
- value:
- description: The value of the tag.
- example: redis_db
- type: string
- type: object
- required:
- - tag_id
+ admin_owner_id:
+ description: The ID of the owner of the configuration template.
+ example: 7c86c85d-0651-43e2-a748-d69d658418e8
+ format: uuid
+ type: string
+ visibility:
+ description: The visibility info of the configuration template.
+ example: private
+ $ref: "#/components/schemas/VisibilityInfo"
+ linked_audit_message_channel_ids:
+ description: The IDs of the audit message channels linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ request_configurations:
+ type: array
+ items:
+ $ref: "#/components/schemas/RequestConfiguration"
+ description: The request configuration list linked to the configuration template.
+ request_configuration_list:
+ description: The request configuration list linked to the configuration template. Deprecated in favor of `request_configurations`.
+ $ref: "#/components/schemas/CreateRequestConfigurationInfoList"
+ deprecated: true
+ example:
+ request_configurations:
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition: null
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 0
+ - request_configuration_id: 7c86c85d-0651-43e2-a748-d69d658418e9
+ organization_id: w86c85d-0651-43e2-a748-d69d658418e8
+ condition:
+ group_id: 1b978423-db0a-4037-a4cf-f79c60cb67b4
+ allow_requests: True
+ auto_approval: False
+ require_mfa_to_request: False
+ max_duration_minutes: 120
+ recommended_duration_minutes: 120
+ require_support_ticket: False
+ reviewer_stages:
+ - reviewer_stage_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ owner_ids:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ stage: 1
+ priority: 1
+ member_oncall_schedule_ids:
+ description: The IDs of the on-call schedules linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 7c86c85d-0651-43e2-a748-d69d658418e8
+ items:
+ type: string
+ format: uuid
+ type: array
+ break_glass_user_ids:
+ description: The IDs of the break glass users linked to the configuration template.
+ example:
+ - 37cb7e41-12ba-46da-92ff-030abe0450b1
+ - 37cb7e41-12ba-46da-92ff-030abe0450b2
+ items:
+ type: string
+ format: uuid
+ type: array
+ require_mfa_to_approve:
+ description: A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.
+ example: False
+ type: boolean
+ require_mfa_to_connect:
+ description: A bool representing whether or not to require MFA to connect to resources associated with this configuration template.
+ example: False
+ type: boolean
+ PaginatedConfigurationTemplateList:
+ description: |-
+ # PaginatedConfigurationTemplateList Object
+ ### Description
+ The `PaginatedConfigurationTemplateList` object is used to store a list of configuration templates.
+
+ ### Usage Example
+ Returned from the `GET Configuration Templates` endpoint.
+ example:
+ results:
+ - configuration_template_id: 7c86c85d-0651-43e2-a748-d69d658418e8
+ admin_owner_id: a4d7d928-783e-4599-8ec6-088d635af4ac
+ visibility: private
+ linked_audit_message_channel_ids:
+ - l3cb7e41-12ba-46da-92ff-030abe0450b1
+ - f3cb7e41-12ba-46da-92ff-030abe0450b2
+ request_configuration_id: r3cb7e41-12ba-46da-92ff-030abe0450b1
+ member_oncall_schedule_ids:
+ - 23cb7e41-12ba-46da-92ff-030abe0450b1
+ - m3cb7e41-12ba-46da-92ff-030abe0450b2
+ break_glass_user_ids:
+ - 63cb7e41-12ba-46da-92ff-030abe0450b1
+ - b3cb7e41-12ba-46da-92ff-030abe0450b2
+ require_mfa_to_approve: False
+ require_mfa_to_connect: False
+ properties:
+ results:
+ items:
+ $ref: "#/components/schemas/ConfigurationTemplate"
+ type: array
securitySchemes:
BearerAuth:
scheme: bearer
diff --git a/config.json b/config.json
index ef1dee5..f1715c3 100644
--- a/config.json
+++ b/config.json
@@ -1 +1 @@
-{"enumClassPrefix": true, "packageName": "opal", "gitHost": "github.com", "gitUserId": "opalsecurity", "gitRepoId": "opal-go"}
+{"enumClassPrefix": true, "packageName": "opal", "gitHost": "github.com", "gitUserId": "opalsecurity", "gitRepoId": "opal-python", "disallowAdditionalPropertiesIfNotPresent":false}
diff --git a/docs/AddGroupResourceRequest.md b/docs/AddGroupResourceRequest.md
new file mode 100644
index 0000000..4125cd9
--- /dev/null
+++ b/docs/AddGroupResourceRequest.md
@@ -0,0 +1,29 @@
+# AddGroupResourceRequest
+
+
+## Properties
+
+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]
+
+## Example
+
+```python
+from opal.models.add_group_resource_request import AddGroupResourceRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AddGroupResourceRequest from a JSON string
+add_group_resource_request_instance = AddGroupResourceRequest.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..9bb5ebc
--- /dev/null
+++ b/docs/AddGroupUserRequest.md
@@ -0,0 +1,30 @@
+# AddGroupUserRequest
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**duration_minutes** | **int** | The duration for which the group 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 to this user. If omitted, the default access level remote ID value (empty string) is used. | [optional]
+
+## Example
+
+```python
+from opal.models.add_group_user_request import AddGroupUserRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AddGroupUserRequest from a JSON string
+add_group_user_request_instance = AddGroupUserRequest.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..caa8852
--- /dev/null
+++ b/docs/AddResourceUserRequest.md
@@ -0,0 +1,30 @@
+# AddResourceUserRequest
+
+
+## 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 to this user. If omitted, the default access level remote ID value (empty string) is used. | [optional]
+
+## Example
+
+```python
+from opal.models.add_resource_user_request import AddResourceUserRequest
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AddResourceUserRequest from a JSON string
+add_resource_user_request_instance = AddResourceUserRequest.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..26b823c
--- /dev/null
+++ b/docs/App.md
@@ -0,0 +1,34 @@
+# App
+
+# App Object ### Description The `App` object is used to represent an app to an application. ### Usage Example List from the `GET Apps` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**app_id** | **str** | The ID of the app. |
+**name** | **str** | The name of the app. |
+**description** | **str** | A description of the app. |
+**admin_owner_id** | **str** | The ID of the owner of the app. |
+**app_type** | [**AppTypeEnum**](AppTypeEnum.md) | |
+
+## Example
+
+```python
+from opal.models.app import App
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of App from a JSON string
+app_instance = App.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..57541fe
--- /dev/null
+++ b/docs/AppTypeEnum.md
@@ -0,0 +1,12 @@
+# AppTypeEnum
+
+The type of an app.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[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/AppsApi.md b/docs/AppsApi.md
new file mode 100644
index 0000000..a87626f
--- /dev/null
+++ b/docs/AppsApi.md
@@ -0,0 +1,167 @@
+# opal.AppsApi
+
+All URIs are relative to *https://api.opal.dev/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_app**](AppsApi.md#get_app) | **GET** /apps/{app_id} |
+[**get_apps**](AppsApi.md#get_apps) | **GET** /apps |
+
+
+# **get_app**
+> App get_app(app_id)
+
+
+
+Returns an `App` object.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.app import App
+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.AppsApi(api_client)
+ app_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the app.
+
+ try:
+ api_response = api_instance.get_app(app_id)
+ print("The response of AppsApi->get_app:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AppsApi->get_app: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **app_id** | **str**| The ID of the app. |
+
+### Return type
+
+[**App**](App.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 requested `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)
+
+# **get_apps**
+> AppsList get_apps(app_type_filter=app_type_filter, owner_filter=owner_filter)
+
+
+
+Returns a list of `App` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.app_type_enum import AppTypeEnum
+from opal.models.apps_list import AppsList
+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.AppsApi(api_client)
+ app_type_filter = [opal.AppTypeEnum()] # List[AppTypeEnum] | A list of app types to filter by. (optional)
+ owner_filter = '29827fb8-f2dd-4e80-9576-28e31e9934ac' # str | An owner ID to filter by. (optional)
+
+ try:
+ api_response = api_instance.get_apps(app_type_filter=app_type_filter, owner_filter=owner_filter)
+ print("The response of AppsApi->get_apps:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling AppsApi->get_apps: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **app_type_filter** | [**List[AppTypeEnum]**](AppTypeEnum.md)| A list of app types to filter by. | [optional]
+ **owner_filter** | **str**| An owner ID to filter by. | [optional]
+
+### Return type
+
+[**AppsList**](AppsList.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** | A list of apps for 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/AppsList.md b/docs/AppsList.md
new file mode 100644
index 0000000..1de7b85
--- /dev/null
+++ b/docs/AppsList.md
@@ -0,0 +1,30 @@
+# AppsList
+
+A list of apps.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**apps** | [**List[App]**](App.md) | |
+
+## Example
+
+```python
+from opal.models.apps_list import AppsList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AppsList from a JSON string
+apps_list_instance = AppsList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..1ed5fa1
--- /dev/null
+++ b/docs/AwsPermissionSetMetadata.md
@@ -0,0 +1,30 @@
+# AwsPermissionSetMetadata
+
+Metadata for AWS Identity Center permission set.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**aws_permission_set** | [**AwsPermissionSetMetadataAwsPermissionSet**](AwsPermissionSetMetadataAwsPermissionSet.md) | |
+
+## Example
+
+```python
+from opal.models.aws_permission_set_metadata import AwsPermissionSetMetadata
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AwsPermissionSetMetadata from a JSON string
+aws_permission_set_metadata_instance = AwsPermissionSetMetadata.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..c393d4a
--- /dev/null
+++ b/docs/AwsPermissionSetMetadataAwsPermissionSet.md
@@ -0,0 +1,30 @@
+# AwsPermissionSetMetadataAwsPermissionSet
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arn** | **str** | The ARN of the permission set. |
+**account_id** | **str** | The ID of an AWS account to which this permission set is provisioned. |
+
+## Example
+
+```python
+from opal.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of AwsPermissionSetMetadataAwsPermissionSet from a JSON string
+aws_permission_set_metadata_aws_permission_set_instance = AwsPermissionSetMetadataAwsPermissionSet.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..c955800
--- /dev/null
+++ b/docs/Condition.md
@@ -0,0 +1,31 @@
+# Condition
+
+# Condition Object ### Description The `Condition` object is used to represent a condition. ### Usage Example Used to match request configurations to users in `RequestConfiguration`
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_ids** | **List[str]** | The list of group IDs to match. | [optional]
+**role_remote_ids** | **List[str]** | The list of role remote IDs to match. | [optional]
+
+## Example
+
+```python
+from opal.models.condition import Condition
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Condition from a JSON string
+condition_instance = Condition.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..7e15659
--- /dev/null
+++ b/docs/ConfigurationTemplate.md
@@ -0,0 +1,39 @@
+# ConfigurationTemplate
+
+# Configuration Template Object ### Description The `ConfigurationTemplate` object is used to represent a configuration template. ### Usage Example Returned from the `GET Configuration Templates` endpoint.
+
+## Properties
+
+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]
+**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]
+
+## Example
+
+```python
+from opal.models.configuration_template import ConfigurationTemplate
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ConfigurationTemplate from a JSON string
+configuration_template_instance = ConfigurationTemplate.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..d996919
--- /dev/null
+++ b/docs/ConfigurationTemplatesApi.md
@@ -0,0 +1,240 @@
+# opal.ConfigurationTemplatesApi
+
+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 |
+[**get_configuration_templates**](ConfigurationTemplatesApi.md#get_configuration_templates) | **GET** /configuration-templates |
+[**update_configuration_template**](ConfigurationTemplatesApi.md#update_configuration_template) | **PUT** /configuration-templates |
+
+
+# **create_configuration_template**
+> ConfigurationTemplate create_configuration_template(create_configuration_template_info)
+
+
+
+Creates a configuration template.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.configuration_template import ConfigurationTemplate
+from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo
+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)
+ create_configuration_template_info = opal.CreateConfigurationTemplateInfo() # CreateConfigurationTemplateInfo |
+
+ try:
+ api_response = api_instance.create_configuration_template(create_configuration_template_info)
+ print("The response of ConfigurationTemplatesApi->create_configuration_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ConfigurationTemplatesApi->create_configuration_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_configuration_template_info** | [**CreateConfigurationTemplateInfo**](CreateConfigurationTemplateInfo.md)| |
+
+### Return type
+
+[**ConfigurationTemplate**](ConfigurationTemplate.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 configuration template just created. | - |
+
+[[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()
+
+
+
+Returns a list of `ConfigurationTemplate` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList
+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)
+
+ try:
+ api_response = api_instance.get_configuration_templates()
+ print("The response of ConfigurationTemplatesApi->get_configuration_templates:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ConfigurationTemplatesApi->get_configuration_templates: %s\n" % e)
+```
+
+
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**PaginatedConfigurationTemplateList**](PaginatedConfigurationTemplateList.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 of configuration templates for 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)
+
+# **update_configuration_template**
+> ConfigurationTemplate update_configuration_template(update_configuration_template_info)
+
+
+
+Update a configuration template.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.configuration_template import ConfigurationTemplate
+from opal.models.update_configuration_template_info import UpdateConfigurationTemplateInfo
+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)
+ update_configuration_template_info = opal.UpdateConfigurationTemplateInfo() # UpdateConfigurationTemplateInfo | Configuration template to be updated
+
+ try:
+ api_response = api_instance.update_configuration_template(update_configuration_template_info)
+ print("The response of ConfigurationTemplatesApi->update_configuration_template:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ConfigurationTemplatesApi->update_configuration_template: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **update_configuration_template_info** | [**UpdateConfigurationTemplateInfo**](UpdateConfigurationTemplateInfo.md)| Configuration template to be updated |
+
+### Return type
+
+[**ConfigurationTemplate**](ConfigurationTemplate.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 configuration template just updated. | - |
+
+[[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/CreateConfigurationTemplateInfo.md b/docs/CreateConfigurationTemplateInfo.md
new file mode 100644
index 0000000..aa7d6aa
--- /dev/null
+++ b/docs/CreateConfigurationTemplateInfo.md
@@ -0,0 +1,39 @@
+# CreateConfigurationTemplateInfo
+
+# 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.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**admin_owner_id** | **str** | The ID of the owner of the configuration template. |
+**visibility** | [**VisibilityInfo**](VisibilityInfo.md) | |
+**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]
+**require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template. |
+**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]
+
+## Example
+
+```python
+from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateConfigurationTemplateInfo from a JSON string
+create_configuration_template_info_instance = CreateConfigurationTemplateInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..82fd0d9
--- /dev/null
+++ b/docs/CreateGroupBindingInfo.md
@@ -0,0 +1,31 @@
+# CreateGroupBindingInfo
+
+# CreateGroupBindingInfo Object ### Description The `CreateGroupBindingInfo` object is used as an input to the CreateGroupBinding API.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**source_group_id** | **str** | The ID of the source group. |
+**groups** | [**List[CreateGroupBindingInfoGroupsInner]**](CreateGroupBindingInfoGroupsInner.md) | The list of groups. |
+
+## Example
+
+```python
+from opal.models.create_group_binding_info import CreateGroupBindingInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateGroupBindingInfo from a JSON string
+create_group_binding_info_instance = CreateGroupBindingInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..5203465
--- /dev/null
+++ b/docs/CreateGroupBindingInfoGroupsInner.md
@@ -0,0 +1,29 @@
+# CreateGroupBindingInfoGroupsInner
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The ID of the group. |
+
+## Example
+
+```python
+from opal.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateGroupBindingInfoGroupsInner from a JSON string
+create_group_binding_info_groups_inner_instance = CreateGroupBindingInfoGroupsInner.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..f982dbe
--- /dev/null
+++ b/docs/CreateGroupInfo.md
@@ -0,0 +1,36 @@
+# CreateGroupInfo
+
+# CreateGroupInfo Object ### Description The `CreateGroupInfo` object is used to store creation info for a group. ### Usage Example Use in the `POST Groups` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | The name of the remote group. |
+**description** | **str** | A description of the remote group. | [optional]
+**group_type** | [**GroupTypeEnum**](GroupTypeEnum.md) | |
+**app_id** | **str** | The ID of the app for the group. |
+**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]
+
+## Example
+
+```python
+from opal.models.create_group_info import CreateGroupInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateGroupInfo from a JSON string
+create_group_info_instance = CreateGroupInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..cec9b4d
--- /dev/null
+++ b/docs/CreateMessageChannelInfo.md
@@ -0,0 +1,31 @@
+# CreateMessageChannelInfo
+
+# CreateMessageChannelInfo Object ### Description The `CreateMessageChannelInfo` object is used to describe the message channel object to be created.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**third_party_provider** | [**MessageChannelProviderEnum**](MessageChannelProviderEnum.md) | |
+**remote_id** | **str** | The remote ID of the message channel |
+
+## Example
+
+```python
+from opal.models.create_message_channel_info import CreateMessageChannelInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateMessageChannelInfo from a JSON string
+create_message_channel_info_instance = CreateMessageChannelInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..896dcbc
--- /dev/null
+++ b/docs/CreateOnCallScheduleInfo.md
@@ -0,0 +1,31 @@
+# CreateOnCallScheduleInfo
+
+# CreateOnCallScheduleInfo Object ### Description The `CreateOnCallScheduleInfo` object is used to describe the on call schedule object to be created.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**third_party_provider** | [**OnCallScheduleProviderEnum**](OnCallScheduleProviderEnum.md) | |
+**remote_id** | **str** | The remote ID of the on call schedule |
+
+## Example
+
+```python
+from opal.models.create_on_call_schedule_info import CreateOnCallScheduleInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateOnCallScheduleInfo from a JSON string
+create_on_call_schedule_info_instance = CreateOnCallScheduleInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..cc2388b
--- /dev/null
+++ b/docs/CreateOwnerInfo.md
@@ -0,0 +1,35 @@
+# CreateOwnerInfo
+
+# CreateOwnerInfo Object ### Description The `CreateOwnerInfo` object is used to store creation info for an owner. ### Usage Example Use in the `POST Owners` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | The name of the owner. |
+**description** | **str** | A description of the owner. | [optional]
+**access_request_escalation_period** | **int** | The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy. | [optional]
+**user_ids** | **List[str]** | Users to add to the created owner. If setting a source_group_id this list must be empty. |
+**reviewer_message_channel_id** | **str** | The message channel id for the reviewer channel. | [optional]
+**source_group_id** | **str** | Sync this owner's user list with a source group. | [optional]
+
+## Example
+
+```python
+from opal.models.create_owner_info import CreateOwnerInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateOwnerInfo from a JSON string
+create_owner_info_instance = CreateOwnerInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..c4d21cd
--- /dev/null
+++ b/docs/CreateRequestConfigurationInfoList.md
@@ -0,0 +1,30 @@
+# CreateRequestConfigurationInfoList
+
+# CreateRequestConfigurationInfoList Object ### Description The `CreateRequestConfigurationInfoList` object is used as an input to the CreateRequestConfigurations API. ### Formatting Requirements The `CreateRequestConfigurationInfoList` object must contain a list of `RequestConfiguration` objects. Exactly one default `RequestConfiguration` must be provided. A default `RequestConfiguration` is one with a `condition` of `null` and a `priority` of `0`. The default `RequestConfiguration` will be used when no other `RequestConfiguration` matches the request. Only one `RequestConfiguration` may be provided for each priority, and the priorities must be contiguous. For example, if there are two `RequestConfigurations` with priorities 0 and 2, there must be a `RequestConfiguration` with priority 1. To use the `condition` field, the `condition` must be a valid JSON object. The `condition` must be a JSON object with the key `group_ids` (more options may be added in the future), whose value is a list of group IDs. The `condition` will match if the user requesting access is a member of any of the groups in the list. Currently, we only support using a single group as a condition.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of request configurations to create. |
+
+## Example
+
+```python
+from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateRequestConfigurationInfoList from a JSON string
+create_request_configuration_info_list_instance = CreateRequestConfigurationInfoList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..1309210
--- /dev/null
+++ b/docs/CreateResourceInfo.md
@@ -0,0 +1,36 @@
+# CreateResourceInfo
+
+# CreateResourceInfo Object ### Description The `CreateResourceInfo` object is used to store creation info for a resource. ### Usage Example Use in the `POST Resources` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | The name of the remote resource. |
+**description** | **str** | A description of the remote resource. | [optional]
+**resource_type** | [**ResourceTypeEnum**](ResourceTypeEnum.md) | |
+**app_id** | **str** | The ID of the app for the resource. |
+**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]
+
+## Example
+
+```python
+from opal.models.create_resource_info import CreateResourceInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateResourceInfo from a JSON string
+create_resource_info_instance = CreateResourceInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..c90232a
--- /dev/null
+++ b/docs/CreateTagInfo.md
@@ -0,0 +1,31 @@
+# CreateTagInfo
+
+# CreateTagInfo Object ### Description The `CreateTagInfo` object is used to represent configuration for a new tag. ### Usage Example Use in the `POST Tag` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tag_key** | **str** | The key of the tag to create. |
+**tag_value** | **str** | The value of the tag to create. | [optional]
+
+## Example
+
+```python
+from opal.models.create_tag_info import CreateTagInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateTagInfo from a JSON string
+create_tag_info_instance = CreateTagInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..664c2a5
--- /dev/null
+++ b/docs/CreateUARInfo.md
@@ -0,0 +1,36 @@
+# CreateUARInfo
+
+Information needed to start a user access review.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | The name of the UAR. |
+**reviewer_assignment_policy** | [**UARReviewerAssignmentPolicyEnum**](UARReviewerAssignmentPolicyEnum.md) | |
+**send_reviewer_assignment_notification** | **bool** | A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False. |
+**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. |
+**uar_scope** | [**UARScope**](UARScope.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.create_uar_info import CreateUARInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CreateUARInfo from a JSON string
+create_uar_info_instance = CreateUARInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 63bba12..836be4b 100644
--- a/docs/EntityTypeEnum.md
+++ b/docs/EntityTypeEnum.md
@@ -3,9 +3,9 @@
The type of an entity.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**value** | **str** | The type of an entity. | must be one of ["GROUP", "RESOURCE", "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 fb6cde0..3ceea73 100644
--- a/docs/Event.md
+++ b/docs/Event.md
@@ -3,14 +3,37 @@
# Event Object ### Description The `Event` object is used to represent an event. ### Usage Example Fetch from the `LIST Events` endpoint.
## Properties
+
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_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. |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**actor_ip_address** | **str** | The IP address of the event actor. | [optional]
+**api_token_name** | **str** | The name of the API token used to create the event. | [optional]
+**api_token_preview** | **str** | The preview of the API token used to create the event. | [optional]
+**sub_events** | [**List[SubEvent]**](SubEvent.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.event import Event
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Event from a JSON string
+event_instance = Event.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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/EventsApi.md b/docs/EventsApi.md
index 67b22e6..5cc3adc 100644
--- a/docs/EventsApi.md
+++ b/docs/EventsApi.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **events**
-> PaginatedEventList events()
+> PaginatedEventList events(start_date_filter=start_date_filter, end_date_filter=end_date_filter, actor_filter=actor_filter, object_filter=object_filter, event_type_filter=event_type_filter, api_token_filter=api_token_filter, cursor=cursor, page_size=page_size)
@@ -19,11 +19,11 @@ Returns a list of `Event` objects.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import events_api
-from opal.model.paginated_event_list import PaginatedEventList
+from opal.models.paginated_event_list import PaginatedEventList
+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(
@@ -37,42 +37,45 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = events_api.EventsApi(api_client)
- start_date_filter = "2021/11/01" # str | A start date filter for the events. (optional)
- end_date_filter = "2021-11-12" # str | An end date filter for the events. (optional)
- actor_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An actor filter for the events. Supply the ID of the actor. (optional)
- object_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An object filter for the events. Supply the ID of the object. (optional)
- event_type_filter = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | An event type filter for the events. (optional)
- cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional)
+ api_instance = opal.EventsApi(api_client)
+ start_date_filter = '2021-11-01' # str | A start date filter for the events. (optional)
+ end_date_filter = '2021-11-12' # str | An end date filter for the events. (optional)
+ actor_filter = '29827fb8-f2dd-4e80-9576-28e31e9934ac' # str | An actor filter for the events. Supply the ID of the actor. (optional)
+ object_filter = '29827fb8-f2dd-4e80-9576-28e31e9934ac' # str | An object filter for the events. Supply the ID of the object. (optional)
+ event_type_filter = 'USER_MFA_RESET' # str | An event type filter for the events. (optional)
+ api_token_filter = 'fullaccess:**************************M_g==' # str | An API filter for the events. Supply the name and preview of the API token. (optional)
+ cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional)
page_size = 200 # int | Number of results to return per page. Default is 200. (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
- api_response = api_instance.events(start_date_filter=start_date_filter, end_date_filter=end_date_filter, actor_filter=actor_filter, object_filter=object_filter, event_type_filter=event_type_filter, cursor=cursor, page_size=page_size)
+ api_response = api_instance.events(start_date_filter=start_date_filter, end_date_filter=end_date_filter, actor_filter=actor_filter, object_filter=object_filter, event_type_filter=event_type_filter, api_token_filter=api_token_filter, cursor=cursor, page_size=page_size)
+ print("The response of EventsApi->events:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling EventsApi->events: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **start_date_filter** | **str**| A start date filter for the events. | [optional]
- **end_date_filter** | **str**| An end date filter for the events. | [optional]
- **actor_filter** | **str**| An actor filter for the events. Supply the ID of the actor. | [optional]
- **object_filter** | **str**| An object filter for the events. Supply the ID of the object. | [optional]
- **event_type_filter** | **str**| An event type filter for the events. | [optional]
- **cursor** | **str**| The pagination cursor value. | [optional]
- **page_size** | **int**| Number of results to return per page. Default is 200. | [optional]
+ **start_date_filter** | **str**| A start date filter for the events. | [optional]
+ **end_date_filter** | **str**| An end date filter for the events. | [optional]
+ **actor_filter** | **str**| An actor filter for the events. Supply the ID of the actor. | [optional]
+ **object_filter** | **str**| An object filter for the events. Supply the ID of the object. | [optional]
+ **event_type_filter** | **str**| An event type filter for the events. | [optional]
+ **api_token_filter** | **str**| An API filter for the events. Supply the name and preview of the API token. | [optional]
+ **cursor** | **str**| The pagination cursor value. | [optional]
+ **page_size** | **int**| Number of results to return per page. Default is 200. | [optional]
### Return type
@@ -87,7 +90,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/Group.md b/docs/Group.md
index 76a3853..ec842e4 100644
--- a/docs/Group.md
+++ b/docs/Group.md
@@ -3,21 +3,50 @@
# Group Object ### Description The `Group` object is used to represent a group. ### Usage Example Update from the `UPDATE Groups` endpoint.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**group_id** | **str** | The ID of the group. |
+**app_id** | **str** | The ID of the group's app. | [optional]
**name** | **str** | The name of the group. | [optional]
**description** | **str** | A description of the group. | [optional]
-**owner_team_id** | **str** | The ID of the owning team of the group. | [optional]
-**group_function** | [**GroupFunctionEnum**](GroupFunctionEnum.md) | | [optional]
+**admin_owner_id** | **str** | The ID of the owner 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]
-**visibility** | [**VisibilityEnum**](VisibilityEnum.md) | | [optional]
-**max_duration** | **int** | The maximum duration access to the group can be requested for (in minutes). | [optional]
+**max_duration** | **int** | The maximum duration for which the group can be requested (in minutes). | [optional]
+**recommended_duration** | **int** | The recommended duration for which the group should be requested (in minutes). -1 represents an indefinite duration. | [optional]
**require_manager_approval** | **bool** | A bool representing whether or not access requests to the group require manager approval. | [optional]
-**require_support_ticket** | **bool** | A bool representing whether or not access requests to the group require a support ticket. | [optional]
-**folder_id** | **str** | The ID of the folder that the group is located in. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**require_support_ticket** | **bool** | A bool representing whether or not access requests to the group require an access ticket. | [optional]
+**require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this group. | [optional]
+**require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this group. | [optional]
+**auto_approval** | **bool** | A bool representing whether or not to automatically approve requests to this group. | [optional]
+**request_template_id** | **str** | The ID of the associated request template. | [optional]
+**configuration_template_id** | **str** | The ID of the associated configuration template. | [optional]
+**group_binding_id** | **str** | The ID of the associated group binding. | [optional]
+**is_requestable** | **bool** | A bool representing whether or not to allow access requests to this group. | [optional]
+**request_configurations** | [**List[RequestConfiguration]**](RequestConfiguration.md) | A list of request configurations for this group. | [optional]
+**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]
+
+## Example
+
+```python
+from opal.models.group import Group
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Group from a JSON string
+group_instance = Group.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..b39379d
--- /dev/null
+++ b/docs/GroupAccessLevel.md
@@ -0,0 +1,31 @@
+# GroupAccessLevel
+
+# Access Level Object ### Description The `GroupAccessLevel` object is used to represent the level of access that a user has to a group or a group has to a group. The \"default\" access level is a `GroupAccessLevel` object whose fields are all empty strings. ### Usage Example View the `GroupAccessLevel` of a group/user or group/group pair to see the level of access granted to the group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**access_level_name** | **str** | The human-readable name of the access level. |
+**access_level_remote_id** | **str** | The machine-readable identifier of the access level. |
+
+## Example
+
+```python
+from opal.models.group_access_level import GroupAccessLevel
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupAccessLevel from a JSON string
+group_access_level_instance = GroupAccessLevel.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..0fccfba
--- /dev/null
+++ b/docs/GroupBinding.md
@@ -0,0 +1,34 @@
+# GroupBinding
+
+# Group Binding Object ### Description The `GroupBinding` object is used to represent a group binding. ### Usage Example Get group bindings from the `GET Group Bindings` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_binding_id** | **str** | The ID of the group binding. |
+**created_by_id** | **str** | The ID of the user that created the group binding. |
+**created_at** | **datetime** | The date the group binding was created. |
+**source_group_id** | **str** | The ID of the source group. |
+**groups** | [**List[GroupBindingGroup]**](GroupBindingGroup.md) | The list of groups. |
+
+## Example
+
+```python
+from opal.models.group_binding import GroupBinding
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupBinding from a JSON string
+group_binding_instance = GroupBinding.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..64b4caf
--- /dev/null
+++ b/docs/GroupBindingGroup.md
@@ -0,0 +1,31 @@
+# GroupBindingGroup
+
+# Group Binding Group Object ### Description The `GroupBindingGroup` object is used to represent a group binding group. ### Usage Example Get group binding groups from the `GET Group Bindings` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The ID of the group. |
+**group_type** | [**GroupTypeEnum**](GroupTypeEnum.md) | |
+
+## Example
+
+```python
+from opal.models.group_binding_group import GroupBindingGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupBindingGroup from a JSON string
+group_binding_group_instance = GroupBindingGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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/GroupBindingsApi.md b/docs/GroupBindingsApi.md
new file mode 100644
index 0000000..d5d9103
--- /dev/null
+++ b/docs/GroupBindingsApi.md
@@ -0,0 +1,396 @@
+# opal.GroupBindingsApi
+
+All URIs are relative to *https://api.opal.dev/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_group_binding**](GroupBindingsApi.md#create_group_binding) | **POST** /group-bindings |
+[**delete_group_binding**](GroupBindingsApi.md#delete_group_binding) | **DELETE** /group-bindings/{group_binding_id} |
+[**get_group_binding**](GroupBindingsApi.md#get_group_binding) | **GET** /group-bindings/{group_binding_id} |
+[**get_group_bindings**](GroupBindingsApi.md#get_group_bindings) | **GET** /group-bindings |
+[**update_group_bindings**](GroupBindingsApi.md#update_group_bindings) | **PUT** /group-bindings |
+
+
+# **create_group_binding**
+> GroupBinding create_group_binding(create_group_binding_info)
+
+
+
+Creates a group binding.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.create_group_binding_info import CreateGroupBindingInfo
+from opal.models.group_binding import GroupBinding
+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.GroupBindingsApi(api_client)
+ create_group_binding_info = opal.CreateGroupBindingInfo() # CreateGroupBindingInfo |
+
+ try:
+ api_response = api_instance.create_group_binding(create_group_binding_info)
+ print("The response of GroupBindingsApi->create_group_binding:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupBindingsApi->create_group_binding: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_group_binding_info** | [**CreateGroupBindingInfo**](CreateGroupBindingInfo.md)| |
+
+### Return type
+
+[**GroupBinding**](GroupBinding.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 group binding just created. | - |
+
+[[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_group_binding**
+> delete_group_binding(group_binding_id)
+
+
+
+Deletes a group binding.
+
+### 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.GroupBindingsApi(api_client)
+ group_binding_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group binding.
+
+ try:
+ api_instance.delete_group_binding(group_binding_id)
+ except Exception as e:
+ print("Exception when calling GroupBindingsApi->delete_group_binding: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_binding_id** | **str**| The ID of the group binding. |
+
+### 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 group binding 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_group_binding**
+> GroupBinding get_group_binding(group_binding_id)
+
+
+
+Returns a `GroupBinding` object.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.group_binding import GroupBinding
+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.GroupBindingsApi(api_client)
+ group_binding_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the group binding.
+
+ try:
+ api_response = api_instance.get_group_binding(group_binding_id)
+ print("The response of GroupBindingsApi->get_group_binding:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupBindingsApi->get_group_binding: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_binding_id** | **str**| The ID of the group binding. |
+
+### Return type
+
+[**GroupBinding**](GroupBinding.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 requested `GroupBinding`. | - |
+
+[[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_group_bindings**
+> PaginatedGroupBindingsList get_group_bindings(cursor=cursor, page_size=page_size)
+
+
+
+Returns a list of `GroupBinding` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList
+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.GroupBindingsApi(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_group_bindings(cursor=cursor, page_size=page_size)
+ print("The response of GroupBindingsApi->get_group_bindings:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupBindingsApi->get_group_bindings: %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
+
+[**PaginatedGroupBindingsList**](PaginatedGroupBindingsList.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 of group bindings for 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)
+
+# **update_group_bindings**
+> update_group_bindings(update_group_binding_info_list)
+
+
+
+Bulk updates a list of group bindings.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList
+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.GroupBindingsApi(api_client)
+ update_group_binding_info_list = opal.UpdateGroupBindingInfoList() # UpdateGroupBindingInfoList | Group bindings to be updated
+
+ try:
+ api_instance.update_group_bindings(update_group_binding_info_list)
+ except Exception as e:
+ print("Exception when calling GroupBindingsApi->update_group_bindings: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **update_group_binding_info_list** | [**UpdateGroupBindingInfoList**](UpdateGroupBindingInfoList.md)| Group bindings to be updated |
+
+### 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 group bindings were successfully updated. | - |
+
+[[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/GroupRemoteInfo.md b/docs/GroupRemoteInfo.md
new file mode 100644
index 0000000..f09611a
--- /dev/null
+++ b/docs/GroupRemoteInfo.md
@@ -0,0 +1,38 @@
+# GroupRemoteInfo
+
+Information that defines the remote group. This replaces the deprecated remote_id and metadata fields.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**active_directory_group** | [**GroupRemoteInfoActiveDirectoryGroup**](GroupRemoteInfoActiveDirectoryGroup.md) | | [optional]
+**github_team** | [**GroupRemoteInfoGithubTeam**](GroupRemoteInfoGithubTeam.md) | | [optional]
+**gitlab_group** | [**GroupRemoteInfoGitlabGroup**](GroupRemoteInfoGitlabGroup.md) | | [optional]
+**google_group** | [**GroupRemoteInfoGoogleGroup**](GroupRemoteInfoGoogleGroup.md) | | [optional]
+**ldap_group** | [**GroupRemoteInfoLdapGroup**](GroupRemoteInfoLdapGroup.md) | | [optional]
+**okta_group** | [**GroupRemoteInfoOktaGroup**](GroupRemoteInfoOktaGroup.md) | | [optional]
+**duo_group** | [**GroupRemoteInfoDuoGroup**](GroupRemoteInfoDuoGroup.md) | | [optional]
+**azure_ad_security_group** | [**GroupRemoteInfoAzureAdSecurityGroup**](GroupRemoteInfoAzureAdSecurityGroup.md) | | [optional]
+**azure_ad_microsoft_365_group** | [**GroupRemoteInfoAzureAdMicrosoft365Group**](GroupRemoteInfoAzureAdMicrosoft365Group.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.group_remote_info import GroupRemoteInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfo from a JSON string
+group_remote_info_instance = GroupRemoteInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..842fc2d
--- /dev/null
+++ b/docs/GroupRemoteInfoActiveDirectoryGroup.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoActiveDirectoryGroup
+
+Remote info for Active Directory group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the Google group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoActiveDirectoryGroup from a JSON string
+group_remote_info_active_directory_group_instance = GroupRemoteInfoActiveDirectoryGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..06c566f
--- /dev/null
+++ b/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoAzureAdMicrosoft365Group
+
+Remote info for Azure AD Microsoft 365 group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the Azure AD Microsoft 365 group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoAzureAdMicrosoft365Group from a JSON string
+group_remote_info_azure_ad_microsoft365_group_instance = GroupRemoteInfoAzureAdMicrosoft365Group.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..5f729c0
--- /dev/null
+++ b/docs/GroupRemoteInfoAzureAdSecurityGroup.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoAzureAdSecurityGroup
+
+Remote info for Azure AD Security group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the Azure AD Security group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoAzureAdSecurityGroup from a JSON string
+group_remote_info_azure_ad_security_group_instance = GroupRemoteInfoAzureAdSecurityGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..9147931
--- /dev/null
+++ b/docs/GroupRemoteInfoDuoGroup.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoDuoGroup
+
+Remote info for Duo Security group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the Duo Security group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoDuoGroup from a JSON string
+group_remote_info_duo_group_instance = GroupRemoteInfoDuoGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..828cfb2
--- /dev/null
+++ b/docs/GroupRemoteInfoGithubTeam.md
@@ -0,0 +1,31 @@
+# GroupRemoteInfoGithubTeam
+
+Remote info for GitHub team.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**team_id** | **str** | The id of the GitHub team. | [optional]
+**team_slug** | **str** | The slug of the GitHub team. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoGithubTeam from a JSON string
+group_remote_info_github_team_instance = GroupRemoteInfoGithubTeam.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..271ab7c
--- /dev/null
+++ b/docs/GroupRemoteInfoGitlabGroup.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoGitlabGroup
+
+Remote info for Gitlab group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the Gitlab group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoGitlabGroup from a JSON string
+group_remote_info_gitlab_group_instance = GroupRemoteInfoGitlabGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..ce61103
--- /dev/null
+++ b/docs/GroupRemoteInfoGoogleGroup.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoGoogleGroup
+
+Remote info for Google group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the Google group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoGoogleGroup from a JSON string
+group_remote_info_google_group_instance = GroupRemoteInfoGoogleGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..ae689a8
--- /dev/null
+++ b/docs/GroupRemoteInfoLdapGroup.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoLdapGroup
+
+Remote info for LDAP group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the LDAP group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoLdapGroup from a JSON string
+group_remote_info_ldap_group_instance = GroupRemoteInfoLdapGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..d9b29fd
--- /dev/null
+++ b/docs/GroupRemoteInfoOktaGroup.md
@@ -0,0 +1,30 @@
+# GroupRemoteInfoOktaGroup
+
+Remote info for Okta Directory group.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The id of the Okta Directory group. |
+
+## Example
+
+```python
+from opal.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupRemoteInfoOktaGroup from a JSON string
+group_remote_info_okta_group_instance = GroupRemoteInfoOktaGroup.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..428fabe
--- /dev/null
+++ b/docs/GroupResource.md
@@ -0,0 +1,32 @@
+# GroupResource
+
+# GroupResource Object ### Description The `GroupResource` object is used to represent a relationship between a group and a resource.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The ID of the group. |
+**resource_id** | **str** | The ID of the resource. |
+**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | |
+
+## Example
+
+```python
+from opal.models.group_resource import GroupResource
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupResource from a JSON string
+group_resource_instance = GroupResource.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..8f7acde
--- /dev/null
+++ b/docs/GroupResourceList.md
@@ -0,0 +1,29 @@
+# GroupResourceList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_resources** | [**List[GroupResource]**](GroupResource.md) | |
+
+## Example
+
+```python
+from opal.models.group_resource_list import GroupResourceList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupResourceList from a JSON string
+group_resource_list_instance = GroupResourceList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 8ecd468..8b477bd 100644
--- a/docs/GroupTypeEnum.md
+++ b/docs/GroupTypeEnum.md
@@ -3,9 +3,9 @@
The type of the group.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**value** | **str** | The type of the group. | must be one of ["ACTIVE_DIRECTORY_GROUP", "DUO_GROUP", "GIT_HUB_TEAM", "GOOGLE_GROUPS_GROUP", "LDAP_GROUP", "OKTA_GROUP", "OPAL_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
new file mode 100644
index 0000000..9c49972
--- /dev/null
+++ b/docs/GroupUser.md
@@ -0,0 +1,35 @@
+# GroupUser
+
+# Group Access User Object ### Description The `GroupAccessUser` object is used to represent a user with access to a group. ### Usage Example Fetch from the `LIST GroupUsers` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_id** | **str** | The ID of the group. |
+**user_id** | **str** | The ID of the user. |
+**access_level** | [**GroupAccessLevel**](GroupAccessLevel.md) | | [optional]
+**full_name** | **str** | The user's full name. |
+**email** | **str** | The user's email. |
+**expiration_date** | **datetime** | The day and time the user's access will expire. |
+
+## Example
+
+```python
+from opal.models.group_user import GroupUser
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupUser from a JSON string
+group_user_instance = GroupUser.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..e8ded6a
--- /dev/null
+++ b/docs/GroupUserList.md
@@ -0,0 +1,29 @@
+# GroupUserList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**results** | [**List[GroupUser]**](GroupUser.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.group_user_list import GroupUserList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GroupUserList from a JSON string
+group_user_list_instance = GroupUserList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 cdf5273..a2c380e 100644
--- a/docs/GroupsApi.md
+++ b/docs/GroupsApi.md
@@ -4,36 +4,906 @@ All URIs are relative to *https://api.opal.dev/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**convert_group**](GroupsApi.md#convert_group) | **PUT** /groups/{group_id}/convert |
+[**add_group_resource**](GroupsApi.md#add_group_resource) | **POST** /groups/{group_id}/resources/{resource_id} |
+[**add_group_user**](GroupsApi.md#add_group_user) | **POST** /groups/{group_id}/users/{user_id} |
+[**create_group**](GroupsApi.md#create_group) | **POST** /groups |
[**delete_group**](GroupsApi.md#delete_group) | **DELETE** /groups/{group_id} |
+[**delete_group_user**](GroupsApi.md#delete_group_user) | **DELETE** /groups/{group_id}/users/{user_id} |
+[**get_group**](GroupsApi.md#get_group) | **GET** /groups/{group_id} |
[**get_group_message_channels**](GroupsApi.md#get_group_message_channels) | **GET** /groups/{group_id}/message-channels |
+[**get_group_on_call_schedules**](GroupsApi.md#get_group_on_call_schedules) | **GET** /groups/{group_id}/on-call-schedules |
+[**get_group_resources**](GroupsApi.md#get_group_resources) | **GET** /groups/{group_id}/resources |
+[**get_group_reviewer_stages**](GroupsApi.md#get_group_reviewer_stages) | **GET** /groups/{group_id}/reviewer-stages |
[**get_group_reviewers**](GroupsApi.md#get_group_reviewers) | **GET** /groups/{group_id}/reviewers |
[**get_group_tags**](GroupsApi.md#get_group_tags) | **GET** /groups/{group_id}/tags |
+[**get_group_users**](GroupsApi.md#get_group_users) | **GET** /groups/{group_id}/users |
+[**get_group_visibility**](GroupsApi.md#get_group_visibility) | **GET** /groups/{group_id}/visibility |
[**get_groups**](GroupsApi.md#get_groups) | **GET** /groups |
[**set_group_message_channels**](GroupsApi.md#set_group_message_channels) | **PUT** /groups/{group_id}/message-channels |
+[**set_group_on_call_schedules**](GroupsApi.md#set_group_on_call_schedules) | **PUT** /groups/{group_id}/on-call-schedules |
+[**set_group_resources**](GroupsApi.md#set_group_resources) | **PUT** /groups/{group_id}/resources |
+[**set_group_reviewer_stages**](GroupsApi.md#set_group_reviewer_stages) | **PUT** /groups/{group_id}/reviewer-stages |
[**set_group_reviewers**](GroupsApi.md#set_group_reviewers) | **PUT** /groups/{group_id}/reviewers |
+[**set_group_visibility**](GroupsApi.md#set_group_visibility) | **PUT** /groups/{group_id}/visibility |
[**update_groups**](GroupsApi.md#update_groups) | **PUT** /groups |
-# **convert_group**
-> Group convert_group(group_id, group_function, new_admin_id_list)
+# **add_group_resource**
+> GroupResource add_group_resource(group_id, resource_id, access_level_remote_id=access_level_remote_id, add_group_resource_request=add_group_resource_request)
-Updates a groups function.
+Adds a resource to a group.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
-from opal.model.group_function_enum import GroupFunctionEnum
-from opal.model.group import Group
-from opal.model.new_admin_id_list import NewAdminIDList
+from opal.models.add_group_resource_request import AddGroupResourceRequest
+from opal.models.group_resource import GroupResource
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource.
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess' # 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)
+ add_group_resource_request = opal.AddGroupResourceRequest() # AddGroupResourceRequest | (optional)
+
+ try:
+ api_response = api_instance.add_group_resource(group_id, resource_id, access_level_remote_id=access_level_remote_id, add_group_resource_request=add_group_resource_request)
+ print("The response of GroupsApi->add_group_resource:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->add_group_resource: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+ **resource_id** | **str**| The ID of the resource. |
+ **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]
+ **add_group_resource_request** | [**AddGroupResourceRequest**](AddGroupResourceRequest.md)| | [optional]
+
+### Return type
+
+[**GroupResource**](GroupResource.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 created `GroupResource` object. | - |
+
+[[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_group_user**
+> GroupUser add_group_user(group_id, user_id, duration_minutes=duration_minutes, access_level_remote_id=access_level_remote_id, add_group_user_request=add_group_user_request)
+
+
+
+Adds a user to this group.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.add_group_user_request import AddGroupUserRequest
+from opal.models.group_user import GroupUser
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ user_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The ID of the user to add.
+ duration_minutes = 60 # int | The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. (optional)
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess' # 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)
+ add_group_user_request = opal.AddGroupUserRequest() # AddGroupUserRequest | (optional)
+
+ try:
+ api_response = api_instance.add_group_user(group_id, user_id, duration_minutes=duration_minutes, access_level_remote_id=access_level_remote_id, add_group_user_request=add_group_user_request)
+ print("The response of GroupsApi->add_group_user:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->add_group_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+ **user_id** | **str**| The ID of the user to add. |
+ **duration_minutes** | **int**| The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. | [optional]
+ **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]
+ **add_group_user_request** | [**AddGroupUserRequest**](AddGroupUserRequest.md)| | [optional]
+
+### Return type
+
+[**GroupUser**](GroupUser.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 GroupUser that was created. | - |
+
+[[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)
+
+# **create_group**
+> Group create_group(create_group_info)
+
+
+
+Creates a group. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing groups.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.create_group_info import CreateGroupInfo
+from opal.models.group import Group
+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.GroupsApi(api_client)
+ create_group_info = opal.CreateGroupInfo() # CreateGroupInfo |
+
+ try:
+ api_response = api_instance.create_group(create_group_info)
+ print("The response of GroupsApi->create_group:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->create_group: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_group_info** | [**CreateGroupInfo**](CreateGroupInfo.md)| |
+
+### Return type
+
+[**Group**](Group.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 group just created. | - |
+
+[[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_group**
+> delete_group(group_id)
+
+
+
+Deletes a group.
+
+### 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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+
+ try:
+ api_instance.delete_group(group_id)
+ except Exception as e:
+ print("Exception when calling GroupsApi->delete_group: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **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 group 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)
+
+# **delete_group_user**
+> delete_group_user(group_id, user_id)
+
+
+
+Removes a user's access from this group.
+
+### 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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ user_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The ID of a user to remove from this group.
+
+ try:
+ api_instance.delete_group_user(group_id, user_id)
+ except Exception as e:
+ print("Exception when calling GroupsApi->delete_group_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+ **user_id** | **str**| The ID of a user to remove from this 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** | This user's access was successfully removed from this group. | - |
+
+[[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_group**
+> Group get_group(group_id)
+
+
+
+Returns a `Group` object.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.group import Group
+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.GroupsApi(api_client)
+ group_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the group.
+
+ try:
+ api_response = api_instance.get_group(group_id)
+ print("The response of GroupsApi->get_group:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+
+### Return type
+
+[**Group**](Group.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 requested `Group`. | - |
+
+[[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_group_message_channels**
+> MessageChannelList get_group_message_channels(group_id)
+
+
+
+Gets the list of audit and reviewer message channels attached to a group.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.message_channel_list import MessageChannelList
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+
+ try:
+ api_response = api_instance.get_group_message_channels(group_id)
+ print("The response of GroupsApi->get_group_message_channels:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_message_channels: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+
+### Return type
+
+[**MessageChannelList**](MessageChannelList.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 audit and reviewer message channels attached to the group. | - |
+
+[[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_group_on_call_schedules**
+> OnCallScheduleList get_group_on_call_schedules(group_id)
+
+
+
+Gets the list of on call schedules attached to a group.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.on_call_schedule_list import OnCallScheduleList
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+
+ try:
+ api_response = api_instance.get_group_on_call_schedules(group_id)
+ print("The response of GroupsApi->get_group_on_call_schedules:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_on_call_schedules: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+
+### Return type
+
+[**OnCallScheduleList**](OnCallScheduleList.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 on call schedules attached to the group. | - |
+
+[[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_group_resources**
+> GroupResourceList get_group_resources(group_id)
+
+
+
+Gets the list of resources that the group gives access to.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.group_resource_list import GroupResourceList
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+
+ try:
+ api_response = api_instance.get_group_resources(group_id)
+ print("The response of GroupsApi->get_group_resources:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_resources: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+
+### Return type
+
+[**GroupResourceList**](GroupResourceList.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 resources that the group gives access to 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)
+
+# **get_group_reviewer_stages**
+> List[ReviewerStage] get_group_reviewer_stages(group_id)
+
+
+
+Gets the list of reviewer stages for a group.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.reviewer_stage import ReviewerStage
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+
+ try:
+ api_response = api_instance.get_group_reviewer_stages(group_id)
+ print("The response of GroupsApi->get_group_reviewer_stages:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_reviewer_stages: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+
+### Return type
+
+[**List[ReviewerStage]**](ReviewerStage.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 reviewer stages for this group. | - |
+
+[[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_group_reviewers**
+> List[str] get_group_reviewers(group_id)
+
+
+
+Gets the list of owner IDs of the reviewers for a group.
+
+### 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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+
+ try:
+ api_response = api_instance.get_group_reviewers(group_id)
+ print("The response of GroupsApi->get_group_reviewers:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_reviewers: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+
+### Return type
+
+**List[str]**
+
+### 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 IDs of owners that are reviewers for this group. | - |
+
+[[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_group_tags**
+> TagsList get_group_tags(group_id)
+
+
+
+Returns all tags applied to the group.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.tags_list import TagsList
+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(
@@ -47,51 +917,35 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- group_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the group.
- group_function = GroupFunctionEnum("TEAM") # GroupFunctionEnum | The group function to convert to.
- new_admin_id_list = NewAdminIDList(
- admin_ids=[
- "admin_ids_example",
- ],
- ) # NewAdminIDList |
- owner_team_id = "7c86c85d-0651-43e2-a748-d69d658418e8" # str | The ID of the owning team of the group. Required when converting from Team to Group. (optional)
-
- # example passing only required values which don't have defaults set
- try:
- api_response = api_instance.convert_group(group_id, group_function, new_admin_id_list)
- pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->convert_group: %s\n" % e)
+ api_instance = opal.GroupsApi(api_client)
+ group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the group whose tags to return.
- # example passing only required values which don't have defaults set
- # and optional values
try:
- api_response = api_instance.convert_group(group_id, group_function, new_admin_id_list, owner_team_id=owner_team_id)
+ api_response = api_instance.get_group_tags(group_id)
+ print("The response of GroupsApi->get_group_tags:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->convert_group: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_tags: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| The ID of the group. |
- **group_function** | **GroupFunctionEnum**| The group function to convert to. |
- **new_admin_id_list** | [**NewAdminIDList**](NewAdminIDList.md)| |
- **owner_team_id** | **str**| The ID of the owning team of the group. Required when converting from Team to Group. | [optional]
+ **group_id** | **str**| The ID of the group whose tags to return. |
### Return type
-[**Group**](Group.md)
+[**TagsList**](TagsList.md)
### Authorization
@@ -99,34 +953,34 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The converted group. | - |
+**200** | The tags applied to the group. | - |
[[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_group**
-> delete_group(group_id)
+# **get_group_users**
+> GroupUserList get_group_users(group_id)
-Deletes a group.
+Gets the list of users for this group.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
+from opal.models.group_user_list import GroupUserList
+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(
@@ -140,32 +994,35 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- group_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the group.
+ api_instance = opal.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
- # example passing only required values which don't have defaults set
try:
- api_instance.delete_group(group_id)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->delete_group: %s\n" % e)
+ api_response = api_instance.get_group_users(group_id)
+ print("The response of GroupsApi->get_group_users:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_users: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| The ID of the group. |
+ **group_id** | **str**| The ID of the group. |
### Return type
-void (empty response body)
+[**GroupUserList**](GroupUserList.md)
### Authorization
@@ -174,34 +1031,33 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
-
+ - **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The group was successfully deleted. | - |
+**200** | List of users with access to this group. | - |
[[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_group_message_channels**
-> MessageChannelList get_group_message_channels(group_id)
+# **get_group_visibility**
+> VisibilityInfo get_group_visibility(group_id)
-Gets the list of message channels attached to a group.
+Gets the visibility of this group.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
-from opal.model.message_channel_list import MessageChannelList
+from opal.models.visibility_info import VisibilityInfo
+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(
@@ -215,33 +1071,35 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- group_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the group.
+ api_instance = opal.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.get_group_message_channels(group_id)
+ api_response = api_instance.get_group_visibility(group_id)
+ print("The response of GroupsApi->get_group_visibility:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->get_group_message_channels: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_group_visibility: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| The ID of the group. |
+ **group_id** | **str**| The ID of the group. |
### Return type
-[**MessageChannelList**](MessageChannelList.md)
+[**VisibilityInfo**](VisibilityInfo.md)
### Authorization
@@ -252,31 +1110,32 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The message channels attached to the group. | - |
+**200** | The visibility info of this group. | - |
[[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_group_reviewers**
-> [str] get_group_reviewers(group_id)
+# **get_groups**
+> PaginatedGroupsList get_groups(cursor=cursor, page_size=page_size, group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name)
-Gets the list of team/user IDs of the reviewers for a group.
+Returns a list of groups for your organization.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
+from opal.models.group_type_enum import GroupTypeEnum
+from opal.models.paginated_groups_list import PaginatedGroupsList
+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(
@@ -290,33 +1149,43 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- group_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the group.
+ api_instance = opal.GroupsApi(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)
+ group_type_filter = opal.GroupTypeEnum() # GroupTypeEnum | The group type to filter by. (optional)
+ group_ids = ['[\"4baf8423-db0a-4037-a4cf-f79c60cb67a5\",\"1b978423-db0a-4037-a4cf-f79c60cb67b3\"]'] # List[str] | The group ids to filter by. (optional)
+ group_name = 'example-name' # str | Group name. (optional)
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.get_group_reviewers(group_id)
+ api_response = api_instance.get_groups(cursor=cursor, page_size=page_size, group_type_filter=group_type_filter, group_ids=group_ids, group_name=group_name)
+ print("The response of GroupsApi->get_groups:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->get_group_reviewers: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling GroupsApi->get_groups: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| The ID of the group. |
+ **cursor** | **str**| The pagination cursor value. | [optional]
+ **page_size** | **int**| Number of results to return per page. Default is 200. | [optional]
+ **group_type_filter** | [**GroupTypeEnum**](.md)| The group type to filter by. | [optional]
+ **group_ids** | [**List[str]**](str.md)| The group ids to filter by. | [optional]
+ **group_name** | **str**| Group name. | [optional]
### Return type
-**[str]**
+[**PaginatedGroupsList**](PaginatedGroupsList.md)
### Authorization
@@ -327,32 +1196,31 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The IDs of teams/users that are reviewers for this group. | - |
+**200** | One page worth groups associated with 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)
-# **get_group_tags**
-> TagsList get_group_tags(group_id)
+# **set_group_message_channels**
+> List[str] set_group_message_channels(group_id, message_channel_id_list)
-Returns all tags applied to the group.
+Sets the list of audit message channels attached to a group.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
-from opal.model.tags_list import TagsList
+from opal.models.message_channel_id_list import MessageChannelIDList
+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(
@@ -366,33 +1234,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- group_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the group whose tags to return.
+ api_instance = opal.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ message_channel_id_list = opal.MessageChannelIDList() # MessageChannelIDList |
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.get_group_tags(group_id)
+ api_response = api_instance.set_group_message_channels(group_id, message_channel_id_list)
+ print("The response of GroupsApi->set_group_message_channels:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->get_group_tags: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling GroupsApi->set_group_message_channels: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| The ID of the group whose tags to return. |
+ **group_id** | **str**| The ID of the group. |
+ **message_channel_id_list** | [**MessageChannelIDList**](MessageChannelIDList.md)| |
### Return type
-[**TagsList**](TagsList.md)
+**List[str]**
### Authorization
@@ -400,37 +1272,34 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The tags applied to the group. | - |
+**200** | The updated audit message channel IDs for the group. | - |
[[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_groups**
-> PaginatedGroupsList get_groups()
+# **set_group_on_call_schedules**
+> List[str] set_group_on_call_schedules(group_id, on_call_schedule_id_list)
-Returns a list of groups for your organization.
+Sets the list of on call schedules attached to a group.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
-from opal.model.group_function_enum import GroupFunctionEnum
-from opal.model.paginated_groups_list import PaginatedGroupsList
-from opal.model.group_type_enum import GroupTypeEnum
+from opal.models.on_call_schedule_id_list import OnCallScheduleIDList
+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(
@@ -444,40 +1313,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(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)
- group_function_filter = GroupFunctionEnum("REGULAR") # GroupFunctionEnum | The group function to filter by. (optional)
- group_type_filter = GroupTypeEnum("OPAL_GROUP") # GroupTypeEnum | The group type to filter by. (optional)
+ api_instance = opal.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ on_call_schedule_id_list = opal.OnCallScheduleIDList() # OnCallScheduleIDList |
- # example passing only required values which don't have defaults set
- # and optional values
try:
- api_response = api_instance.get_groups(cursor=cursor, page_size=page_size, group_function_filter=group_function_filter, group_type_filter=group_type_filter)
+ api_response = api_instance.set_group_on_call_schedules(group_id, on_call_schedule_id_list)
+ print("The response of GroupsApi->set_group_on_call_schedules:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->get_groups: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling GroupsApi->set_group_on_call_schedules: %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]
- **group_function_filter** | **GroupFunctionEnum**| The group function to filter by. | [optional]
- **group_type_filter** | **GroupTypeEnum**| The group type to filter by. | [optional]
+ **group_id** | **str**| The ID of the group. |
+ **on_call_schedule_id_list** | [**OnCallScheduleIDList**](OnCallScheduleIDList.md)| |
### Return type
-[**PaginatedGroupsList**](PaginatedGroupsList.md)
+**List[str]**
### Authorization
@@ -485,35 +1351,112 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | The updated on call schedule IDs for the group. | - |
+
+[[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)
+
+# **set_group_resources**
+> set_group_resources(group_id, update_group_resources_info)
+
+
+
+Sets the list of resources that the group gives access to.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.update_group_resources_info import UpdateGroupResourcesInfo
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ update_group_resources_info = opal.UpdateGroupResourcesInfo() # UpdateGroupResourcesInfo |
+
+ try:
+ api_instance.set_group_resources(group_id, update_group_resources_info)
+ except Exception as e:
+ print("Exception when calling GroupsApi->set_group_resources: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+ **update_group_resources_info** | [**UpdateGroupResourcesInfo**](UpdateGroupResourcesInfo.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** | One page worth groups associated with your organization. | - |
+**200** | The group resource were successfully set. | - |
[[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)
-# **set_group_message_channels**
-> [str] set_group_message_channels(group_id, message_channel_id_list)
+# **set_group_reviewer_stages**
+> List[ReviewerStage] set_group_reviewer_stages(group_id, reviewer_stage_list)
-Sets the list of message channels attached to a group.
+Sets the list of reviewer stages for a group.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
-from opal.model.message_channel_id_list import MessageChannelIDList
+from opal.models.reviewer_stage import ReviewerStage
+from opal.models.reviewer_stage_list import ReviewerStageList
+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(
@@ -527,39 +1470,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- group_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the group.
- message_channel_id_list = MessageChannelIDList(
- message_channel_ids=[
- "message_channel_ids_example",
- ],
- ) # MessageChannelIDList |
-
- # example passing only required values which don't have defaults set
+ api_instance = opal.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ reviewer_stage_list = opal.ReviewerStageList() # ReviewerStageList |
+
try:
- api_response = api_instance.set_group_message_channels(group_id, message_channel_id_list)
+ api_response = api_instance.set_group_reviewer_stages(group_id, reviewer_stage_list)
+ print("The response of GroupsApi->set_group_reviewer_stages:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling GroupsApi->set_group_message_channels: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling GroupsApi->set_group_reviewer_stages: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| The ID of the group. |
- **message_channel_id_list** | [**MessageChannelIDList**](MessageChannelIDList.md)| |
+ **group_id** | **str**| The ID of the group. |
+ **reviewer_stage_list** | [**ReviewerStageList**](ReviewerStageList.md)| |
### Return type
-**[str]**
+[**List[ReviewerStage]**](ReviewerStage.md)
### Authorization
@@ -570,17 +1511,16 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The updated message channel IDs for the group. | - |
+**200** | The updated reviewer stages for this group. | - |
[[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)
# **set_group_reviewers**
-> [str] set_group_reviewers(group_id, reviewer_id_list)
+> List[str] set_group_reviewers(group_id, reviewer_id_list)
@@ -591,11 +1531,11 @@ Sets the list of reviewers for a group.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
-from opal.model.reviewer_id_list import ReviewerIDList
+from opal.models.reviewer_id_list import ReviewerIDList
+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(
@@ -609,39 +1549,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- group_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the group.
- reviewer_id_list = ReviewerIDList(
- reviewer_ids=[
- "reviewer_ids_example",
- ],
- ) # ReviewerIDList |
-
- # example passing only required values which don't have defaults set
+ api_instance = opal.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ reviewer_id_list = opal.ReviewerIDList() # ReviewerIDList |
+
try:
api_response = api_instance.set_group_reviewers(group_id, reviewer_id_list)
+ print("The response of GroupsApi->set_group_reviewers:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling GroupsApi->set_group_reviewers: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **group_id** | **str**| The ID of the group. |
- **reviewer_id_list** | [**ReviewerIDList**](ReviewerIDList.md)| |
+ **group_id** | **str**| The ID of the group. |
+ **reviewer_id_list** | [**ReviewerIDList**](ReviewerIDList.md)| |
### Return type
-**[str]**
+**List[str]**
### Authorization
@@ -652,12 +1590,90 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | The updated IDs of owners that are reviewers for this group | - |
+
+[[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)
+
+# **set_group_visibility**
+> VisibilityInfo set_group_visibility(group_id, visibility_info)
+
+
+
+Sets the visibility of this group.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.visibility_info import VisibilityInfo
+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.GroupsApi(api_client)
+ group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group.
+ visibility_info = opal.VisibilityInfo() # VisibilityInfo |
+
+ try:
+ api_response = api_instance.set_group_visibility(group_id, visibility_info)
+ print("The response of GroupsApi->set_group_visibility:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling GroupsApi->set_group_visibility: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **group_id** | **str**| The ID of the group. |
+ **visibility_info** | [**VisibilityInfo**](VisibilityInfo.md)| |
+
+### Return type
+
+[**VisibilityInfo**](VisibilityInfo.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 updated IDs of teams/users that are reviewers for this group | - |
+**200** | The visibility info of this group. | - |
[[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)
@@ -673,11 +1689,11 @@ Bulk updates a list of groups.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import groups_api
-from opal.model.update_group_info_list import UpdateGroupInfoList
+from opal.models.update_group_info_list import UpdateGroupInfoList
+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(
@@ -691,43 +1707,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = groups_api.GroupsApi(api_client)
- update_group_info_list = UpdateGroupInfoList(
- groups=[
- UpdateGroupInfo(
- group_id="f454d283-ca87-4a8a-bdbb-df212eca5353",
- name="api-group",
- description="This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases.",
- owner_team_id="7c86c85d-0651-43e2-a748-d69d658418e8",
- visibility=VisibilityEnum("GLOBAL"),
- max_duration=120,
- require_manager_approval=False,
- require_support_ticket=False,
- folder_id="e27cb7b0-98e2-4555-9916-9e6d8ca6b079",
- ),
- ],
- ) # UpdateGroupInfoList | Groups to be updated
-
- # example passing only required values which don't have defaults set
+ api_instance = opal.GroupsApi(api_client)
+ update_group_info_list = opal.UpdateGroupInfoList() # UpdateGroupInfoList | Groups to be updated
+
try:
api_response = api_instance.update_groups(update_group_info_list)
+ print("The response of GroupsApi->update_groups:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling GroupsApi->update_groups: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **update_group_info_list** | [**UpdateGroupInfoList**](UpdateGroupInfoList.md)| Groups to be updated |
+ **update_group_info_list** | [**UpdateGroupInfoList**](UpdateGroupInfoList.md)| Groups to be updated |
### Return type
@@ -742,7 +1746,6 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/MessageChannel.md b/docs/MessageChannel.md
index ace8240..92f4dca 100644
--- a/docs/MessageChannel.md
+++ b/docs/MessageChannel.md
@@ -3,16 +3,32 @@
# MessageChannel Object ### Description The `MessageChannel` object is used to represent a message channel. ### Usage Example Update a groups message channel from the `UPDATE Groups` endpoint.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message_channel_id** | **str** | The ID of the message channel. |
**third_party_provider** | [**MessageChannelProviderEnum**](MessageChannelProviderEnum.md) | | [optional]
**remote_id** | **str** | The remote ID of the message channel | [optional]
**name** | **str** | The name of the message channel. | [optional]
-**message_channel_type** | [**MessageChannelTypeEnum**](MessageChannelTypeEnum.md) | | [optional]
**is_private** | **bool** | A bool representing whether or not the message channel is private. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+## Example
+
+```python
+from opal.models.message_channel import MessageChannel
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of MessageChannel from a JSON string
+message_channel_instance = MessageChannel.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 0d1a049..d9c68f5 100644
--- a/docs/MessageChannelIDList.md
+++ b/docs/MessageChannelIDList.md
@@ -3,11 +3,28 @@
A list of message channel IDs.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**message_channel_ids** | **[str]** | |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**message_channel_ids** | **List[str]** | |
+
+## Example
+
+```python
+from opal.models.message_channel_id_list import MessageChannelIDList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of MessageChannelIDList from a JSON string
+message_channel_id_list_instance = MessageChannelIDList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 547dfa4..3f9a5c4 100644
--- a/docs/MessageChannelList.md
+++ b/docs/MessageChannelList.md
@@ -2,11 +2,28 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**channels** | [**[MessageChannel]**](MessageChannel.md) | |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**channels** | [**List[MessageChannel]**](MessageChannel.md) | |
+
+## Example
+
+```python
+from opal.models.message_channel_list import MessageChannelList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of MessageChannelList from a JSON string
+message_channel_list_instance = MessageChannelList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 36b7e5a..d47e075 100644
--- a/docs/MessageChannelProviderEnum.md
+++ b/docs/MessageChannelProviderEnum.md
@@ -3,9 +3,9 @@
The third party provider of the message channel.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**value** | **str** | The third party provider of the message channel. | defaults to "SLACK", must be one of ["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/MessageChannelsApi.md b/docs/MessageChannelsApi.md
new file mode 100644
index 0000000..b533a3f
--- /dev/null
+++ b/docs/MessageChannelsApi.md
@@ -0,0 +1,239 @@
+# opal.MessageChannelsApi
+
+All URIs are relative to *https://api.opal.dev/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_message_channel**](MessageChannelsApi.md#create_message_channel) | **POST** /message-channels |
+[**get_message_channel**](MessageChannelsApi.md#get_message_channel) | **GET** /message-channels/{message_channel_id} |
+[**get_message_channels**](MessageChannelsApi.md#get_message_channels) | **GET** /message-channels |
+
+
+# **create_message_channel**
+> MessageChannel create_message_channel(create_message_channel_info)
+
+
+
+Creates a `MessageChannel` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.create_message_channel_info import CreateMessageChannelInfo
+from opal.models.message_channel import MessageChannel
+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.MessageChannelsApi(api_client)
+ create_message_channel_info = opal.CreateMessageChannelInfo() # CreateMessageChannelInfo | The `MessageChannel` object to be created.
+
+ try:
+ api_response = api_instance.create_message_channel(create_message_channel_info)
+ print("The response of MessageChannelsApi->create_message_channel:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MessageChannelsApi->create_message_channel: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_message_channel_info** | [**CreateMessageChannelInfo**](CreateMessageChannelInfo.md)| The `MessageChannel` object to be created. |
+
+### Return type
+
+[**MessageChannel**](MessageChannel.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 message channel that was created. | - |
+
+[[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_message_channel**
+> MessageChannel get_message_channel(message_channel_id)
+
+
+
+Gets a `MessageChannel` object.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.message_channel import MessageChannel
+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.MessageChannelsApi(api_client)
+ message_channel_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the message_channel.
+
+ try:
+ api_response = api_instance.get_message_channel(message_channel_id)
+ print("The response of MessageChannelsApi->get_message_channel:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MessageChannelsApi->get_message_channel: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **message_channel_id** | **str**| The ID of the message_channel. |
+
+### Return type
+
+[**MessageChannel**](MessageChannel.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 requested message channel. | - |
+
+[[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_message_channels**
+> MessageChannelList get_message_channels()
+
+
+
+Returns a list of `MessageChannel` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.message_channel_list import MessageChannelList
+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.MessageChannelsApi(api_client)
+
+ try:
+ api_response = api_instance.get_message_channels()
+ print("The response of MessageChannelsApi->get_message_channels:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling MessageChannelsApi->get_message_channels: %s\n" % e)
+```
+
+
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**MessageChannelList**](MessageChannelList.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** | A list of message channels for 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
new file mode 100644
index 0000000..40cc5f2
--- /dev/null
+++ b/docs/OnCallSchedule.md
@@ -0,0 +1,33 @@
+# OnCallSchedule
+
+# OnCallSchedule Object ### Description The `OnCallSchedule` object is used to represent an on call schedule. ### Usage Example Update a groups on call schedule from the `UPDATE Groups` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**on_call_schedule_id** | **str** | The ID of the on-call schedule. | [optional]
+**third_party_provider** | [**OnCallScheduleProviderEnum**](OnCallScheduleProviderEnum.md) | | [optional]
+**remote_id** | **str** | The remote ID of the on call schedule | [optional]
+**name** | **str** | The name of the on call schedule. | [optional]
+
+## Example
+
+```python
+from opal.models.on_call_schedule import OnCallSchedule
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of OnCallSchedule from a JSON string
+on_call_schedule_instance = OnCallSchedule.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..4620b35
--- /dev/null
+++ b/docs/OnCallScheduleIDList.md
@@ -0,0 +1,30 @@
+# OnCallScheduleIDList
+
+A list of on call schedule Opal UUIDs. To get the matching remote IDs, use the /on-call-schedules endpoints.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**on_call_schedule_ids** | **List[str]** | |
+
+## Example
+
+```python
+from opal.models.on_call_schedule_id_list import OnCallScheduleIDList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of OnCallScheduleIDList from a JSON string
+on_call_schedule_id_list_instance = OnCallScheduleIDList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..d48c51b
--- /dev/null
+++ b/docs/OnCallScheduleList.md
@@ -0,0 +1,29 @@
+# OnCallScheduleList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**on_call_schedules** | [**List[OnCallSchedule]**](OnCallSchedule.md) | |
+
+## Example
+
+```python
+from opal.models.on_call_schedule_list import OnCallScheduleList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of OnCallScheduleList from a JSON string
+on_call_schedule_list_instance = OnCallScheduleList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..672d3ba
--- /dev/null
+++ b/docs/OnCallScheduleProviderEnum.md
@@ -0,0 +1,12 @@
+# OnCallScheduleProviderEnum
+
+The third party provider of the on call schedule.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[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/OnCallSchedulesApi.md b/docs/OnCallSchedulesApi.md
new file mode 100644
index 0000000..5d26946
--- /dev/null
+++ b/docs/OnCallSchedulesApi.md
@@ -0,0 +1,239 @@
+# opal.OnCallSchedulesApi
+
+All URIs are relative to *https://api.opal.dev/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_on_call_schedule**](OnCallSchedulesApi.md#create_on_call_schedule) | **POST** /on-call-schedules |
+[**get_on_call_schedule**](OnCallSchedulesApi.md#get_on_call_schedule) | **GET** /on-call-schedules/{on_call_schedule_id} |
+[**get_on_call_schedules**](OnCallSchedulesApi.md#get_on_call_schedules) | **GET** /on-call-schedules |
+
+
+# **create_on_call_schedule**
+> OnCallSchedule create_on_call_schedule(create_on_call_schedule_info)
+
+
+
+Creates a `OnCallSchedule` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.create_on_call_schedule_info import CreateOnCallScheduleInfo
+from opal.models.on_call_schedule import OnCallSchedule
+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.OnCallSchedulesApi(api_client)
+ create_on_call_schedule_info = opal.CreateOnCallScheduleInfo() # CreateOnCallScheduleInfo | The `OnCallSchedule` object to be created.
+
+ try:
+ api_response = api_instance.create_on_call_schedule(create_on_call_schedule_info)
+ print("The response of OnCallSchedulesApi->create_on_call_schedule:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OnCallSchedulesApi->create_on_call_schedule: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_on_call_schedule_info** | [**CreateOnCallScheduleInfo**](CreateOnCallScheduleInfo.md)| The `OnCallSchedule` object to be created. |
+
+### Return type
+
+[**OnCallSchedule**](OnCallSchedule.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 on call schedule that was created. | - |
+
+[[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_on_call_schedule**
+> OnCallSchedule get_on_call_schedule(on_call_schedule_id)
+
+
+
+Gets a `OnCallSchedule` object.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.on_call_schedule import OnCallSchedule
+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.OnCallSchedulesApi(api_client)
+ on_call_schedule_id = '9546209c-42c2-4801-96d7-9ec42df0f59c' # str | The ID of the on_call_schedule.
+
+ try:
+ api_response = api_instance.get_on_call_schedule(on_call_schedule_id)
+ print("The response of OnCallSchedulesApi->get_on_call_schedule:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OnCallSchedulesApi->get_on_call_schedule: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **on_call_schedule_id** | **str**| The ID of the on_call_schedule. |
+
+### Return type
+
+[**OnCallSchedule**](OnCallSchedule.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 requested on call schedule. | - |
+
+[[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_on_call_schedules**
+> OnCallScheduleList get_on_call_schedules()
+
+
+
+Returns a list of `OnCallSchedule` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.on_call_schedule_list import OnCallScheduleList
+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.OnCallSchedulesApi(api_client)
+
+ try:
+ api_response = api_instance.get_on_call_schedules()
+ print("The response of OnCallSchedulesApi->get_on_call_schedules:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OnCallSchedulesApi->get_on_call_schedules: %s\n" % e)
+```
+
+
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**OnCallScheduleList**](OnCallScheduleList.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** | A list of on call schedules for 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/Owner.md b/docs/Owner.md
new file mode 100644
index 0000000..b231766
--- /dev/null
+++ b/docs/Owner.md
@@ -0,0 +1,35 @@
+# Owner
+
+# Owner Object ### Description The `Owner` object is used to represent an owner.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**owner_id** | **str** | The ID of the owner. |
+**name** | **str** | The name of the owner. | [optional]
+**description** | **str** | A description of the owner. | [optional]
+**access_request_escalation_period** | **int** | The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy. | [optional]
+**reviewer_message_channel_id** | **str** | | [optional]
+**source_group_id** | **str** | | [optional]
+
+## Example
+
+```python
+from opal.models.owner import Owner
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Owner from a JSON string
+owner_instance = Owner.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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/OwnersApi.md b/docs/OwnersApi.md
new file mode 100644
index 0000000..0cdc852
--- /dev/null
+++ b/docs/OwnersApi.md
@@ -0,0 +1,637 @@
+# opal.OwnersApi
+
+All URIs are relative to *https://api.opal.dev/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_owner**](OwnersApi.md#create_owner) | **POST** /owners |
+[**delete_owner**](OwnersApi.md#delete_owner) | **DELETE** /owners/{owner_id} |
+[**get_owner**](OwnersApi.md#get_owner) | **GET** /owners/{owner_id} |
+[**get_owner_from_name**](OwnersApi.md#get_owner_from_name) | **GET** /owners/name/{owner_name} |
+[**get_owner_users**](OwnersApi.md#get_owner_users) | **GET** /owners/{owner_id}/users |
+[**get_owners**](OwnersApi.md#get_owners) | **GET** /owners |
+[**set_owner_users**](OwnersApi.md#set_owner_users) | **PUT** /owners/{owner_id}/users |
+[**update_owners**](OwnersApi.md#update_owners) | **PUT** /owners |
+
+
+# **create_owner**
+> Owner create_owner(create_owner_info)
+
+
+
+Creates an owner.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.create_owner_info import CreateOwnerInfo
+from opal.models.owner import Owner
+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.OwnersApi(api_client)
+ create_owner_info = opal.CreateOwnerInfo() # CreateOwnerInfo |
+
+ try:
+ api_response = api_instance.create_owner(create_owner_info)
+ print("The response of OwnersApi->create_owner:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OwnersApi->create_owner: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_owner_info** | [**CreateOwnerInfo**](CreateOwnerInfo.md)| |
+
+### Return type
+
+[**Owner**](Owner.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 owner just created. | - |
+
+[[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_owner**
+> delete_owner(owner_id)
+
+
+
+Deletes an owner.
+
+### 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.OwnersApi(api_client)
+ owner_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the owner.
+
+ try:
+ api_instance.delete_owner(owner_id)
+ except Exception as e:
+ print("Exception when calling OwnersApi->delete_owner: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **owner_id** | **str**| The ID of the owner. |
+
+### 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 owner 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_owner**
+> Owner get_owner(owner_id)
+
+
+
+Returns an `Owner` object.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.owner import Owner
+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.OwnersApi(api_client)
+ owner_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the owner.
+
+ try:
+ api_response = api_instance.get_owner(owner_id)
+ print("The response of OwnersApi->get_owner:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OwnersApi->get_owner: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **owner_id** | **str**| The ID of the owner. |
+
+### Return type
+
+[**Owner**](Owner.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 owner object associated with the passed-in ID. | - |
+
+[[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_owner_from_name**
+> Owner get_owner_from_name(owner_name)
+
+
+
+Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.owner import Owner
+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.OwnersApi(api_client)
+ owner_name = 'MyOwner' # str | The name of the owner.
+
+ try:
+ api_response = api_instance.get_owner_from_name(owner_name)
+ print("The response of OwnersApi->get_owner_from_name:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OwnersApi->get_owner_from_name: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **owner_name** | **str**| The name of the owner. |
+
+### Return type
+
+[**Owner**](Owner.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 owner object associated with the passed-in name. | - |
+
+[[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_owner_users**
+> UserList get_owner_users(owner_id)
+
+
+
+Gets the list of users for this owner, in escalation priority order if applicable.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.user_list import UserList
+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.OwnersApi(api_client)
+ owner_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the owner.
+
+ try:
+ api_response = api_instance.get_owner_users(owner_id)
+ print("The response of OwnersApi->get_owner_users:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OwnersApi->get_owner_users: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **owner_id** | **str**| The ID of the owner. |
+
+### Return type
+
+[**UserList**](UserList.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 users for this owner. | - |
+
+[[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_owners**
+> PaginatedOwnersList get_owners(cursor=cursor, page_size=page_size, name=name)
+
+
+
+Returns a list of `Owner` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.paginated_owners_list import PaginatedOwnersList
+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.OwnersApi(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)
+ name = '200' # str | Owner name to filter by. (optional)
+
+ try:
+ api_response = api_instance.get_owners(cursor=cursor, page_size=page_size, name=name)
+ print("The response of OwnersApi->get_owners:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OwnersApi->get_owners: %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]
+ **name** | **str**| Owner name to filter by. | [optional]
+
+### Return type
+
+[**PaginatedOwnersList**](PaginatedOwnersList.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 of owners 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)
+
+# **set_owner_users**
+> UserList set_owner_users(owner_id, user_id_list)
+
+
+
+Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.user_id_list import UserIDList
+from opal.models.user_list import UserList
+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.OwnersApi(api_client)
+ owner_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the owner.
+ user_id_list = opal.UserIDList() # UserIDList |
+
+ try:
+ api_response = api_instance.set_owner_users(owner_id, user_id_list)
+ print("The response of OwnersApi->set_owner_users:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OwnersApi->set_owner_users: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **owner_id** | **str**| The ID of the owner. |
+ **user_id_list** | [**UserIDList**](UserIDList.md)| |
+
+### Return type
+
+[**UserList**](UserList.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 updated users for the owner. | - |
+
+[[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_owners**
+> UpdateOwnerInfoList update_owners(update_owner_info_list)
+
+
+
+Bulk updates a list of owners.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.update_owner_info_list import UpdateOwnerInfoList
+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.OwnersApi(api_client)
+ update_owner_info_list = opal.UpdateOwnerInfoList() # UpdateOwnerInfoList | Owners to be updated
+
+ try:
+ api_response = api_instance.update_owners(update_owner_info_list)
+ print("The response of OwnersApi->update_owners:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling OwnersApi->update_owners: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **update_owner_info_list** | [**UpdateOwnerInfoList**](UpdateOwnerInfoList.md)| Owners to be updated |
+
+### Return type
+
+[**UpdateOwnerInfoList**](UpdateOwnerInfoList.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 updated owner infos. | - |
+
+[[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/PaginatedConfigurationTemplateList.md b/docs/PaginatedConfigurationTemplateList.md
new file mode 100644
index 0000000..35dd643
--- /dev/null
+++ b/docs/PaginatedConfigurationTemplateList.md
@@ -0,0 +1,30 @@
+# PaginatedConfigurationTemplateList
+
+# PaginatedConfigurationTemplateList Object ### Description The `PaginatedConfigurationTemplateList` object is used to store a list of configuration templates. ### Usage Example Returned from the `GET Configuration Templates` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**results** | [**List[ConfigurationTemplate]**](ConfigurationTemplate.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedConfigurationTemplateList from a JSON string
+paginated_configuration_template_list_instance = PaginatedConfigurationTemplateList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 fcdf929..bb7cce4 100644
--- a/docs/PaginatedEventList.md
+++ b/docs/PaginatedEventList.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**next** | **str, none_type** | The cursor with which to continue pagination if additional result pages exist. | [optional]
-**previous** | **str, none_type** | The cursor used to obtain the current result page. | [optional]
-**results** | [**[Event]**](Event.md) | | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[Event]**](Event.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.paginated_event_list import PaginatedEventList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedEventList from a JSON string
+paginated_event_list_instance = PaginatedEventList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..c8b0a13
--- /dev/null
+++ b/docs/PaginatedGroupBindingsList.md
@@ -0,0 +1,31 @@
+# PaginatedGroupBindingsList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[GroupBinding]**](GroupBinding.md) | |
+
+## Example
+
+```python
+from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedGroupBindingsList from a JSON string
+paginated_group_bindings_list_instance = PaginatedGroupBindingsList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 f4138bc..8baaa15 100644
--- a/docs/PaginatedGroupsList.md
+++ b/docs/PaginatedGroupsList.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**results** | [**[Group]**](Group.md) | |
-**next** | **str, none_type** | The cursor with which to continue pagination if additional result pages exist. | [optional]
-**previous** | **str, none_type** | The cursor used to obtain the current result page. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[Group]**](Group.md) | |
+
+## Example
+
+```python
+from opal.models.paginated_groups_list import PaginatedGroupsList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedGroupsList from a JSON string
+paginated_groups_list_instance = PaginatedGroupsList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..b27d849
--- /dev/null
+++ b/docs/PaginatedOwnersList.md
@@ -0,0 +1,31 @@
+# PaginatedOwnersList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[Owner]**](Owner.md) | |
+
+## Example
+
+```python
+from opal.models.paginated_owners_list import PaginatedOwnersList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedOwnersList from a JSON string
+paginated_owners_list_instance = PaginatedOwnersList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 35419ef..64f3439 100644
--- a/docs/PaginatedResourcesList.md
+++ b/docs/PaginatedResourcesList.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**results** | [**[Resource]**](Resource.md) | |
-**next** | **str, none_type** | The cursor with which to continue pagination if additional result pages exist. | [optional]
-**previous** | **str, none_type** | The cursor used to obtain the current result page. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[Resource]**](Resource.md) | |
+
+## Example
+
+```python
+from opal.models.paginated_resources_list import PaginatedResourcesList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedResourcesList from a JSON string
+paginated_resources_list_instance = PaginatedResourcesList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..0066edc
--- /dev/null
+++ b/docs/PaginatedTagsList.md
@@ -0,0 +1,31 @@
+# PaginatedTagsList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[Tag]**](Tag.md) | |
+
+## Example
+
+```python
+from opal.models.paginated_tags_list import PaginatedTagsList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedTagsList from a JSON string
+paginated_tags_list_instance = PaginatedTagsList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..58813da
--- /dev/null
+++ b/docs/PaginatedUARsList.md
@@ -0,0 +1,32 @@
+# PaginatedUARsList
+
+A list of UARs.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[UAR]**](UAR.md) | |
+
+## Example
+
+```python
+from opal.models.paginated_uars_list import PaginatedUARsList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedUARsList from a JSON string
+paginated_uars_list_instance = PaginatedUARsList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..a601424
--- /dev/null
+++ b/docs/PaginatedUsersList.md
@@ -0,0 +1,31 @@
+# PaginatedUsersList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[User]**](User.md) | |
+
+## Example
+
+```python
+from opal.models.paginated_users_list import PaginatedUsersList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PaginatedUsersList from a JSON string
+paginated_users_list_instance = PaginatedUsersList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..b926f03
--- /dev/null
+++ b/docs/Request.md
@@ -0,0 +1,39 @@
+# Request
+
+# Request Object ### Description The `Request` object is used to represent a request. ### Usage Example Returned from the `GET Requests` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **str** | The unique identifier of the request. |
+**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) | |
+**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]
+**custom_fields_responses** | [**List[RequestCustomFieldResponse]**](RequestCustomFieldResponse.md) | The responses given to the custom fields associated to the request | [optional]
+
+## Example
+
+```python
+from opal.models.request import Request
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Request from a JSON string
+request_instance = Request.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..e88db47
--- /dev/null
+++ b/docs/RequestConfiguration.md
@@ -0,0 +1,39 @@
+# RequestConfiguration
+
+# Request Configuration Object ### Description The `RequestConfiguration` object is used to represent a request configuration. ### Usage Example Returned from the `GET Request Configurations` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**condition** | [**Condition**](Condition.md) | | [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. |
+**max_duration_minutes** | **int** | The maximum duration for which the resource can be requested (in minutes). | [optional]
+**recommended_duration_minutes** | **int** | The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. | [optional]
+**require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require an access ticket. |
+**request_template_id** | **str** | The ID of the associated request template. | [optional]
+**reviewer_stages** | [**List[ReviewerStage]**](ReviewerStage.md) | The list of reviewer stages for the request configuration. |
+**priority** | **int** | The priority of the request configuration. |
+
+## Example
+
+```python
+from opal.models.request_configuration import RequestConfiguration
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RequestConfiguration from a JSON string
+request_configuration_instance = RequestConfiguration.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..8f4d78f
--- /dev/null
+++ b/docs/RequestCustomFieldResponse.md
@@ -0,0 +1,31 @@
+# RequestCustomFieldResponse
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**field_name** | **str** | |
+**field_type** | [**RequestTemplateCustomFieldTypeEnum**](RequestTemplateCustomFieldTypeEnum.md) | |
+**field_value** | [**RequestCustomFieldResponseFieldValue**](RequestCustomFieldResponseFieldValue.md) | |
+
+## Example
+
+```python
+from opal.models.request_custom_field_response import RequestCustomFieldResponse
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RequestCustomFieldResponse from a JSON string
+request_custom_field_response_instance = RequestCustomFieldResponse.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..a3377c3
--- /dev/null
+++ b/docs/RequestCustomFieldResponseFieldValue.md
@@ -0,0 +1,28 @@
+# RequestCustomFieldResponseFieldValue
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+## Example
+
+```python
+from opal.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RequestCustomFieldResponseFieldValue from a JSON string
+request_custom_field_response_field_value_instance = RequestCustomFieldResponseFieldValue.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..d6ab8d8
--- /dev/null
+++ b/docs/RequestList.md
@@ -0,0 +1,31 @@
+# RequestList
+
+# Request List ### Description The `RequestList` object is used to represent a list of requests. ### Usage Example Returned from the `GET Requests` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**requests** | [**List[Request]**](Request.md) | The list of requests. | [optional]
+**cursor** | **str** | The cursor to use in the next request to get the next page of results. | [optional]
+
+## Example
+
+```python
+from opal.models.request_list import RequestList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RequestList from a JSON string
+request_list_instance = RequestList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..b60d5de
--- /dev/null
+++ b/docs/RequestStatusEnum.md
@@ -0,0 +1,12 @@
+# RequestStatusEnum
+
+# Request Status ### Description The `RequestStatus` enum is used to represent the status of a request. ### Usage Example Returned from the `GET Requests` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[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
new file mode 100644
index 0000000..e786fd4
--- /dev/null
+++ b/docs/RequestTemplateCustomFieldTypeEnum.md
@@ -0,0 +1,12 @@
+# RequestTemplateCustomFieldTypeEnum
+
+The type of the custom request field.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[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
new file mode 100644
index 0000000..25a147c
--- /dev/null
+++ b/docs/RequestedItem.md
@@ -0,0 +1,34 @@
+# RequestedItem
+
+# Requested Item Object ### Description The `RequestedItem` object is used to represent a request target item. ### Usage Example Returned from the `GET Requests` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**resource_id** | **str** | The ID of the resource requested. | [optional]
+**group_id** | **str** | The ID of the group requested. | [optional]
+**access_level_name** | **str** | The name of the access level requested. | [optional]
+**access_level_remote_id** | **str** | The ID of the access level requested on the remote system. | [optional]
+**name** | **str** | The name of the target. | [optional]
+
+## Example
+
+```python
+from opal.models.requested_item import RequestedItem
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RequestedItem from a JSON string
+requested_item_instance = RequestedItem.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..400536e
--- /dev/null
+++ b/docs/RequestsApi.md
@@ -0,0 +1,90 @@
+# opal.RequestsApi
+
+All URIs are relative to *https://api.opal.dev/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_requests**](RequestsApi.md#get_requests) | **GET** /requests |
+
+
+# **get_requests**
+> RequestList get_requests(cursor=cursor, page_size=page_size, show_pending_only=show_pending_only)
+
+
+
+Returns a list of requests for your organization that is visible by the admin.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.request_list import RequestList
+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)
+ cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional)
+ page_size = 200 # int | Number of results to return per page. Default is 200. (optional)
+ show_pending_only = True # bool | Boolean toggle for if it should only show pending requests. (optional)
+
+ try:
+ api_response = api_instance.get_requests(cursor=cursor, page_size=page_size, show_pending_only=show_pending_only)
+ print("The response of RequestsApi->get_requests:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling RequestsApi->get_requests: %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]
+ **show_pending_only** | **bool**| Boolean toggle for if it should only show pending requests. | [optional]
+
+### Return type
+
+[**RequestList**](RequestList.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 list of requests. | - |
+
+[[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/Resource.md b/docs/Resource.md
index 324e95a..e75bd6c 100644
--- a/docs/Resource.md
+++ b/docs/Resource.md
@@ -3,20 +3,51 @@
# Resource Object ### Description The `Resource` object is used to represent a resource. ### Usage Example Update from the `UPDATE Resources` endpoint.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**resource_id** | **str** | The ID of the resource. |
+**app_id** | **str** | The ID of the app. | [optional]
**name** | **str** | The name of the resource. | [optional]
**description** | **str** | A description of the resource. | [optional]
-**owner_team_id** | **str** | The ID of the owning team of the resource. | [optional]
-**visibility** | [**VisibilityEnum**](VisibilityEnum.md) | | [optional]
+**admin_owner_id** | **str** | The ID of the owner of the resource. | [optional]
+**remote_resource_id** | **str** | The ID of the resource on the remote system. | [optional]
+**remote_resource_name** | **str** | The name of the resource on the remote system. | [optional]
**resource_type** | [**ResourceTypeEnum**](ResourceTypeEnum.md) | | [optional]
-**max_duration** | **int** | The maximum duration access to the resource can be requested for (in minutes). | [optional]
+**max_duration** | **int** | The maximum duration for which the resource can be requested (in minutes). | [optional]
+**recommended_duration** | **int** | The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. | [optional]
**require_manager_approval** | **bool** | A bool representing whether or not access requests to the resource require manager approval. | [optional]
-**require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require a support ticket. | [optional]
-**folder_id** | **str** | The ID of the folder that the resource is located in. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require an access ticket. | [optional]
+**require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this resource. | [optional]
+**require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this resource. | [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. | [optional]
+**request_template_id** | **str** | The ID of the associated request template. | [optional]
+**is_requestable** | **bool** | A bool representing whether or not to allow access requests to this resource. | [optional]
+**parent_resource_id** | **str** | The ID of the parent resource. | [optional]
+**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]
+**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]
+
+## Example
+
+```python
+from opal.models.resource import Resource
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Resource from a JSON string
+resource_instance = Resource.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 3827ae4..d28211b 100644
--- a/docs/ResourceAccessLevel.md
+++ b/docs/ResourceAccessLevel.md
@@ -3,12 +3,29 @@
# 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.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**access_level_name** | **str** | The human-readable name of the access level. |
**access_level_remote_id** | **str** | The machine-readable identifier of the access level. |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+## Example
+
+```python
+from opal.models.resource_access_level import ResourceAccessLevel
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceAccessLevel from a JSON string
+resource_access_level_instance = ResourceAccessLevel.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..a4856bc
--- /dev/null
+++ b/docs/ResourceAccessUser.md
@@ -0,0 +1,37 @@
+# ResourceAccessUser
+
+# Resource Access User Object ### Description The `ResourceAccessUser` object is used to represent a user with access to a resource, either directly or indirectly through group(s). ### Usage Example Fetch from the `LIST ResourceUsers` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**resource_id** | **str** | The ID of the resource. |
+**user_id** | **str** | The ID of the user. |
+**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | |
+**full_name** | **str** | The user's full name. |
+**email** | **str** | The user's email. |
+**expiration_date** | **datetime** | The day and time the user's access will expire. |
+**has_direct_access** | **bool** | The user has direct access to this resources (vs. indirectly, like through a group). |
+**num_access_paths** | **int** | The number of ways in which the user has access through this resource (directly and indirectly). |
+
+## Example
+
+```python
+from opal.models.resource_access_user import ResourceAccessUser
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceAccessUser from a JSON string
+resource_access_user_instance = ResourceAccessUser.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..ac50d30
--- /dev/null
+++ b/docs/ResourceAccessUserList.md
@@ -0,0 +1,29 @@
+# ResourceAccessUserList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**results** | [**List[ResourceAccessUser]**](ResourceAccessUser.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.resource_access_user_list import ResourceAccessUserList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceAccessUserList from a JSON string
+resource_access_user_list_instance = ResourceAccessUserList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..196bdb4
--- /dev/null
+++ b/docs/ResourceRemoteInfo.md
@@ -0,0 +1,54 @@
+# ResourceRemoteInfo
+
+Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**aws_account** | [**ResourceRemoteInfoAwsAccount**](ResourceRemoteInfoAwsAccount.md) | | [optional]
+**aws_permission_set** | [**ResourceRemoteInfoAwsPermissionSet**](ResourceRemoteInfoAwsPermissionSet.md) | | [optional]
+**aws_iam_role** | [**ResourceRemoteInfoAwsIamRole**](ResourceRemoteInfoAwsIamRole.md) | | [optional]
+**aws_ec2_instance** | [**ResourceRemoteInfoAwsEc2Instance**](ResourceRemoteInfoAwsEc2Instance.md) | | [optional]
+**aws_rds_instance** | [**ResourceRemoteInfoAwsRdsInstance**](ResourceRemoteInfoAwsRdsInstance.md) | | [optional]
+**aws_eks_cluster** | [**ResourceRemoteInfoAwsEksCluster**](ResourceRemoteInfoAwsEksCluster.md) | | [optional]
+**gcp_organization** | [**ResourceRemoteInfoGcpOrganization**](ResourceRemoteInfoGcpOrganization.md) | | [optional]
+**gcp_bucket** | [**ResourceRemoteInfoGcpBucket**](ResourceRemoteInfoGcpBucket.md) | | [optional]
+**gcp_compute_instance** | [**ResourceRemoteInfoGcpComputeInstance**](ResourceRemoteInfoGcpComputeInstance.md) | | [optional]
+**gcp_big_query_dataset** | [**ResourceRemoteInfoGcpBigQueryDataset**](ResourceRemoteInfoGcpBigQueryDataset.md) | | [optional]
+**gcp_big_query_table** | [**ResourceRemoteInfoGcpBigQueryTable**](ResourceRemoteInfoGcpBigQueryTable.md) | | [optional]
+**gcp_folder** | [**ResourceRemoteInfoGcpFolder**](ResourceRemoteInfoGcpFolder.md) | | [optional]
+**gcp_gke_cluster** | [**ResourceRemoteInfoGcpGkeCluster**](ResourceRemoteInfoGcpGkeCluster.md) | | [optional]
+**gcp_project** | [**ResourceRemoteInfoGcpProject**](ResourceRemoteInfoGcpProject.md) | | [optional]
+**gcp_sql_instance** | [**ResourceRemoteInfoGcpSqlInstance**](ResourceRemoteInfoGcpSqlInstance.md) | | [optional]
+**github_repo** | [**ResourceRemoteInfoGithubRepo**](ResourceRemoteInfoGithubRepo.md) | | [optional]
+**gitlab_project** | [**ResourceRemoteInfoGitlabProject**](ResourceRemoteInfoGitlabProject.md) | | [optional]
+**okta_app** | [**ResourceRemoteInfoOktaApp**](ResourceRemoteInfoOktaApp.md) | | [optional]
+**okta_standard_role** | [**ResourceRemoteInfoOktaStandardRole**](ResourceRemoteInfoOktaStandardRole.md) | | [optional]
+**okta_custom_role** | [**ResourceRemoteInfoOktaCustomRole**](ResourceRemoteInfoOktaCustomRole.md) | | [optional]
+**pagerduty_role** | [**ResourceRemoteInfoPagerdutyRole**](ResourceRemoteInfoPagerdutyRole.md) | | [optional]
+**salesforce_permission_set** | [**ResourceRemoteInfoSalesforcePermissionSet**](ResourceRemoteInfoSalesforcePermissionSet.md) | | [optional]
+**salesforce_profile** | [**ResourceRemoteInfoSalesforceProfile**](ResourceRemoteInfoSalesforceProfile.md) | | [optional]
+**salesforce_role** | [**ResourceRemoteInfoSalesforceRole**](ResourceRemoteInfoSalesforceRole.md) | | [optional]
+**teleport_role** | [**ResourceRemoteInfoTeleportRole**](ResourceRemoteInfoTeleportRole.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.resource_remote_info import ResourceRemoteInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfo from a JSON string
+resource_remote_info_instance = ResourceRemoteInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..0b0ea3e
--- /dev/null
+++ b/docs/ResourceRemoteInfoAwsAccount.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoAwsAccount
+
+Remote info for AWS account.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account_id** | **str** | The id of the AWS account. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoAwsAccount from a JSON string
+resource_remote_info_aws_account_instance = ResourceRemoteInfoAwsAccount.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..f53a155
--- /dev/null
+++ b/docs/ResourceRemoteInfoAwsEc2Instance.md
@@ -0,0 +1,32 @@
+# ResourceRemoteInfoAwsEc2Instance
+
+Remote info for AWS EC2 instance.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**instance_id** | **str** | The instanceId of the EC2 instance. |
+**region** | **str** | The region of the EC2 instance. |
+**account_id** | **str** | The id of the AWS account. Required for AWS Organizations. | [optional]
+
+## Example
+
+```python
+from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoAwsEc2Instance from a JSON string
+resource_remote_info_aws_ec2_instance_instance = ResourceRemoteInfoAwsEc2Instance.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..afb8519
--- /dev/null
+++ b/docs/ResourceRemoteInfoAwsEksCluster.md
@@ -0,0 +1,31 @@
+# ResourceRemoteInfoAwsEksCluster
+
+Remote info for AWS EKS cluster.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arn** | **str** | The ARN of the EKS cluster. |
+**account_id** | **str** | The id of the AWS account. Required for AWS Organizations. | [optional]
+
+## Example
+
+```python
+from opal.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoAwsEksCluster from a JSON string
+resource_remote_info_aws_eks_cluster_instance = ResourceRemoteInfoAwsEksCluster.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..82dbdd0
--- /dev/null
+++ b/docs/ResourceRemoteInfoAwsIamRole.md
@@ -0,0 +1,31 @@
+# ResourceRemoteInfoAwsIamRole
+
+Remote info for AWS IAM role.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arn** | **str** | The ARN of the IAM role. |
+**account_id** | **str** | The id of the AWS account. Required for AWS Organizations. | [optional]
+
+## Example
+
+```python
+from opal.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoAwsIamRole from a JSON string
+resource_remote_info_aws_iam_role_instance = ResourceRemoteInfoAwsIamRole.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..1c0d5d3
--- /dev/null
+++ b/docs/ResourceRemoteInfoAwsPermissionSet.md
@@ -0,0 +1,31 @@
+# ResourceRemoteInfoAwsPermissionSet
+
+Remote info for AWS Identity Center permission set.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arn** | **str** | The ARN of the permission set. |
+**account_id** | **str** | The ID of an AWS account to which this permission set is provisioned. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoAwsPermissionSet from a JSON string
+resource_remote_info_aws_permission_set_instance = ResourceRemoteInfoAwsPermissionSet.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..ae78181
--- /dev/null
+++ b/docs/ResourceRemoteInfoAwsRdsInstance.md
@@ -0,0 +1,33 @@
+# ResourceRemoteInfoAwsRdsInstance
+
+Remote info for AWS RDS instance.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**instance_id** | **str** | The instanceId of the RDS instance. |
+**region** | **str** | The region of the RDS instance. |
+**resource_id** | **str** | The resourceId of the RDS instance. |
+**account_id** | **str** | The id of the AWS account. Required for AWS Organizations. | [optional]
+
+## Example
+
+```python
+from opal.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoAwsRdsInstance from a JSON string
+resource_remote_info_aws_rds_instance_instance = ResourceRemoteInfoAwsRdsInstance.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..9bb3eef
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpBigQueryDataset.md
@@ -0,0 +1,31 @@
+# ResourceRemoteInfoGcpBigQueryDataset
+
+Remote info for GCP BigQuery Dataset.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**project_id** | **str** | The id of the project the dataset is in. |
+**dataset_id** | **str** | The id of the dataset. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpBigQueryDataset from a JSON string
+resource_remote_info_gcp_big_query_dataset_instance = ResourceRemoteInfoGcpBigQueryDataset.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..998923a
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpBigQueryTable.md
@@ -0,0 +1,32 @@
+# ResourceRemoteInfoGcpBigQueryTable
+
+Remote info for GCP BigQuery Table.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**project_id** | **str** | The id of the project the table is in. |
+**dataset_id** | **str** | The id of the dataset the table is in. |
+**table_id** | **str** | The id of the table. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpBigQueryTable from a JSON string
+resource_remote_info_gcp_big_query_table_instance = ResourceRemoteInfoGcpBigQueryTable.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..d0bb09f
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpBucket.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoGcpBucket
+
+Remote info for GCP bucket.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bucket_id** | **str** | The id of the bucket. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpBucket from a JSON string
+resource_remote_info_gcp_bucket_instance = ResourceRemoteInfoGcpBucket.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..5cca1eb
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpComputeInstance.md
@@ -0,0 +1,32 @@
+# ResourceRemoteInfoGcpComputeInstance
+
+Remote info for GCP compute instance.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**instance_id** | **str** | The id of the instance. |
+**project_id** | **str** | The id of the project the instance is in. |
+**zone** | **str** | The zone the instance is in. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpComputeInstance from a JSON string
+resource_remote_info_gcp_compute_instance_instance = ResourceRemoteInfoGcpComputeInstance.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..145aae7
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpFolder.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoGcpFolder
+
+Remote info for GCP folder.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**folder_id** | **str** | The id of the folder. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpFolder from a JSON string
+resource_remote_info_gcp_folder_instance = ResourceRemoteInfoGcpFolder.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..4631a9a
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpGkeCluster.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoGcpGkeCluster
+
+Remote info for GCP GKE cluster.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**cluster_name** | **str** | The name of the GKE cluster. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpGkeCluster from a JSON string
+resource_remote_info_gcp_gke_cluster_instance = ResourceRemoteInfoGcpGkeCluster.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..3d7fd6b
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpOrganization.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoGcpOrganization
+
+Remote info for GCP organization.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**organization_id** | **str** | The id of the organization. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpOrganization from a JSON string
+resource_remote_info_gcp_organization_instance = ResourceRemoteInfoGcpOrganization.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..a286c77
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpProject.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoGcpProject
+
+Remote info for GCP project.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**project_id** | **str** | The id of the project. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpProject from a JSON string
+resource_remote_info_gcp_project_instance = ResourceRemoteInfoGcpProject.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..bc21651
--- /dev/null
+++ b/docs/ResourceRemoteInfoGcpSqlInstance.md
@@ -0,0 +1,31 @@
+# ResourceRemoteInfoGcpSqlInstance
+
+Remote info for GCP SQL instance.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**instance_id** | **str** | The id of the SQL instance. |
+**project_id** | **str** | The id of the project the instance is in. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGcpSqlInstance from a JSON string
+resource_remote_info_gcp_sql_instance_instance = ResourceRemoteInfoGcpSqlInstance.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..110a7de
--- /dev/null
+++ b/docs/ResourceRemoteInfoGithubRepo.md
@@ -0,0 +1,31 @@
+# ResourceRemoteInfoGithubRepo
+
+Remote info for GitHub repository.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**repo_id** | **str** | The id of the repository. | [optional]
+**repo_name** | **str** | The name of the repository. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGithubRepo from a JSON string
+resource_remote_info_github_repo_instance = ResourceRemoteInfoGithubRepo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..93d84b1
--- /dev/null
+++ b/docs/ResourceRemoteInfoGitlabProject.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoGitlabProject
+
+Remote info for Gitlab project.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**project_id** | **str** | The id of the project. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoGitlabProject from a JSON string
+resource_remote_info_gitlab_project_instance = ResourceRemoteInfoGitlabProject.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..3423af3
--- /dev/null
+++ b/docs/ResourceRemoteInfoOktaApp.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoOktaApp
+
+Remote info for Okta directory app.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**app_id** | **str** | The id of the app. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoOktaApp from a JSON string
+resource_remote_info_okta_app_instance = ResourceRemoteInfoOktaApp.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..7b8e58f
--- /dev/null
+++ b/docs/ResourceRemoteInfoOktaCustomRole.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoOktaCustomRole
+
+Remote info for Okta directory custom role.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**role_id** | **str** | The id of the custom role. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoOktaCustomRole from a JSON string
+resource_remote_info_okta_custom_role_instance = ResourceRemoteInfoOktaCustomRole.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..a8e77ea
--- /dev/null
+++ b/docs/ResourceRemoteInfoOktaStandardRole.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoOktaStandardRole
+
+Remote info for Okta directory standard role.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**role_type** | **str** | The type of the standard role. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoOktaStandardRole from a JSON string
+resource_remote_info_okta_standard_role_instance = ResourceRemoteInfoOktaStandardRole.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..94b0409
--- /dev/null
+++ b/docs/ResourceRemoteInfoPagerdutyRole.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoPagerdutyRole
+
+Remote info for Pagerduty role.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**role_name** | **str** | The name of the role. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoPagerdutyRole from a JSON string
+resource_remote_info_pagerduty_role_instance = ResourceRemoteInfoPagerdutyRole.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..f5b0d0f
--- /dev/null
+++ b/docs/ResourceRemoteInfoSalesforcePermissionSet.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoSalesforcePermissionSet
+
+Remote info for Salesforce permission set.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**permission_set_id** | **str** | The id of the permission set. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoSalesforcePermissionSet from a JSON string
+resource_remote_info_salesforce_permission_set_instance = ResourceRemoteInfoSalesforcePermissionSet.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..ac3af18
--- /dev/null
+++ b/docs/ResourceRemoteInfoSalesforceProfile.md
@@ -0,0 +1,31 @@
+# ResourceRemoteInfoSalesforceProfile
+
+Remote info for Salesforce profile.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**profile_id** | **str** | The id of the permission set. |
+**user_license_id** | **str** | The id of the user license. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoSalesforceProfile from a JSON string
+resource_remote_info_salesforce_profile_instance = ResourceRemoteInfoSalesforceProfile.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..27deeb6
--- /dev/null
+++ b/docs/ResourceRemoteInfoSalesforceRole.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoSalesforceRole
+
+Remote info for Salesforce role.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**role_id** | **str** | The id of the role. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoSalesforceRole from a JSON string
+resource_remote_info_salesforce_role_instance = ResourceRemoteInfoSalesforceRole.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..36cc658
--- /dev/null
+++ b/docs/ResourceRemoteInfoTeleportRole.md
@@ -0,0 +1,30 @@
+# ResourceRemoteInfoTeleportRole
+
+Remote info for Teleport role.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**role_name** | **str** | The name role. |
+
+## Example
+
+```python
+from opal.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceRemoteInfoTeleportRole from a JSON string
+resource_remote_info_teleport_role_instance = ResourceRemoteInfoTeleportRole.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 035c7b3..d9a50f4 100644
--- a/docs/ResourceTypeEnum.md
+++ b/docs/ResourceTypeEnum.md
@@ -3,9 +3,9 @@
The type of the resource.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**value** | **str** | The type of the resource. | must be one of ["AWS_IAM_ROLE", "AWS_EC2_INSTANCE", "AWS_EKS_CLUSTER", "AWS_RDS_POSTGRES_INSTANCE", "AWS_RDS_MYSQL_INSTANCE", "CUSTOM", "GCP_BUCKET", "GCP_COMPUTE_INSTANCE", "GCP_FOLDER", "GCP_GKE_CLUSTER", "GCP_PROJECT", "GCP_CLOUD_SQL_POSTGRES_INSTANCE", "GCP_CLOUD_SQL_MYSQL_INSTANCE", "GIT_HUB_REPO", "GOOGLE_WORKSPACE_ROLE", "MONGO_INSTANCE", "MONGO_ATLAS_INSTANCE", "OKTA_APP", "OKTA_ROLE", "OPAL_ROLE", "PAGERDUTY_ROLE", "SALESFORCE_PERMISSION_SET", "SALESFORCE_PROFILE", "SALESFORCE_ROLE", "WORKDAY_ROLE", "MYSQL_INSTANCE", "MARIADB_INSTANCE", ]
[[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 3552f1a..d3de0ba 100644
--- a/docs/ResourceUser.md
+++ b/docs/ResourceUser.md
@@ -1,8 +1,9 @@
# ResourceUser
-# Resource User Object ### Description The `ResourceUser` object is used to represent a user with access to a resource. ### Usage Example Fetch from the `LIST ResourceUsers` endpoint.
+# Resource User Object ### Description The `ResourceUser` object is used to represent a user with direct access to a resource.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**resource_id** | **str** | The ID of the resource. |
@@ -10,9 +11,25 @@ Name | Type | Description | Notes
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | |
**full_name** | **str** | The user's full name. |
**email** | **str** | The user's email. |
-**expiration_date** | **datetime, none_type** | The day and time the user's access will expire. |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**expiration_date** | **datetime** | The day and time the user's access will expire. |
+
+## Example
+
+```python
+from opal.models.resource_user import ResourceUser
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceUser from a JSON string
+resource_user_instance = ResourceUser.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 cb35a2e..0e873f4 100644
--- a/docs/ResourceUserAccessStatus.md
+++ b/docs/ResourceUserAccessStatus.md
@@ -3,15 +3,32 @@
# AccessStatus Object ### Description The `AccessStatus` object is used to represent the user's access to the resource. ### Usage Example View the `AccessStatus` for a resource/user pair to determine if the user has access to the resource.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**resource_id** | **str** | The ID of the resource. |
**user_id** | **str** | The ID of the user. |
-**status** | [**ResourceUserAccessStatusEnum**](ResourceUserAccessStatusEnum.md) | |
-**expiration_date** | **datetime, none_type** | The day and time the user's access will expire. |
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**status** | [**ResourceUserAccessStatusEnum**](ResourceUserAccessStatusEnum.md) | |
+**expiration_date** | **datetime** | The day and time the user's access will expire. |
+
+## Example
+
+```python
+from opal.models.resource_user_access_status import ResourceUserAccessStatus
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceUserAccessStatus from a JSON string
+resource_user_access_status_instance = ResourceUserAccessStatus.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 d901ddd..a00290b 100644
--- a/docs/ResourceUserAccessStatusEnum.md
+++ b/docs/ResourceUserAccessStatusEnum.md
@@ -3,9 +3,9 @@
The status of the user's access to the resource.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**value** | **str** | The status of the user's access to the resource. | must be one of ["UNAUTHORIZED", "REQUESTED", "AUTHORIZED", ]
[[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
new file mode 100644
index 0000000..ab8c111
--- /dev/null
+++ b/docs/ResourceWithAccessLevel.md
@@ -0,0 +1,31 @@
+# ResourceWithAccessLevel
+
+Information about a resource and corresponding access level
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**resource_id** | **str** | The ID of the resource. |
+**access_level_remote_id** | **str** | The ID of the resource. | [optional]
+
+## Example
+
+```python
+from opal.models.resource_with_access_level import ResourceWithAccessLevel
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ResourceWithAccessLevel from a JSON string
+resource_with_access_level_instance = ResourceWithAccessLevel.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 55cd1aa..60bfd5e 100644
--- a/docs/ResourcesApi.md
+++ b/docs/ResourcesApi.md
@@ -4,34 +4,513 @@ All URIs are relative to *https://api.opal.dev/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
+[**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_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_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 |
+[**get_resource_users**](ResourcesApi.md#get_resource_users) | **GET** /resources/{resource_id}/users |
+[**get_resource_visibility**](ResourcesApi.md#get_resource_visibility) | **GET** /resources/{resource_id}/visibility |
[**get_resources**](ResourcesApi.md#get_resources) | **GET** /resources |
[**resource_user_access_status_retrieve**](ResourcesApi.md#resource_user_access_status_retrieve) | **GET** /resource-user-access-status/{resource_id}/{user_id} |
-[**resource_users**](ResourcesApi.md#resource_users) | **GET** /resource-users |
[**set_resource_message_channels**](ResourcesApi.md#set_resource_message_channels) | **PUT** /resources/{resource_id}/message-channels |
+[**set_resource_reviewer_stages**](ResourcesApi.md#set_resource_reviewer_stages) | **PUT** /resources/{resource_id}/reviewer-stages |
[**set_resource_reviewers**](ResourcesApi.md#set_resource_reviewers) | **PUT** /resources/{resource_id}/reviewers |
+[**set_resource_visibility**](ResourcesApi.md#set_resource_visibility) | **PUT** /resources/{resource_id}/visibility |
[**update_resources**](ResourcesApi.md#update_resources) | **PUT** /resources |
+# **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)
+
+
+
+Adds a user to this resource.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.add_resource_user_request import AddResourceUserRequest
+from opal.models.resource_user import ResourceUser
+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.
+ user_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The ID of the user to add.
+ duration_minutes = 60 # int | The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. (optional)
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess' # 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)
+ add_resource_user_request = opal.AddResourceUserRequest() # AddResourceUserRequest | (optional)
+
+ try:
+ api_response = api_instance.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)
+ print("The response of ResourcesApi->add_resource_user:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->add_resource_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource_id** | **str**| The ID of the resource. |
+ **user_id** | **str**| The ID of the user to add. |
+ **duration_minutes** | **int**| The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. | [optional]
+ **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]
+ **add_resource_user_request** | [**AddResourceUserRequest**](AddResourceUserRequest.md)| | [optional]
+
+### Return type
+
+[**ResourceUser**](ResourceUser.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 ResourceUser that was created. | - |
+
+[[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)
+
+# **create_resource**
+> Resource create_resource(create_resource_info)
+
+
+
+Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.create_resource_info import CreateResourceInfo
+from opal.models.resource import Resource
+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)
+ create_resource_info = opal.CreateResourceInfo() # CreateResourceInfo |
+
+ try:
+ api_response = api_instance.create_resource(create_resource_info)
+ print("The response of ResourcesApi->create_resource:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->create_resource: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_resource_info** | [**CreateResourceInfo**](CreateResourceInfo.md)| |
+
+### Return type
+
+[**Resource**](Resource.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 resource just created. | - |
+
+[[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**
> delete_resource(resource_id)
-Deletes a resource.
+Deletes a 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.
+
+ try:
+ api_instance.delete_resource(resource_id)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->delete_resource: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource_id** | **str**| The ID of the resource. |
+
+### 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 resource 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)
+
+# **delete_resource_user**
+> delete_resource_user(resource_id, user_id, access_level_remote_id=access_level_remote_id)
+
+
+
+Removes a user'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.
+ user_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The ID of a user to remove from this resource.
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess' # str | 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. (optional)
+
+ try:
+ api_instance.delete_resource_user(resource_id, user_id, access_level_remote_id=access_level_remote_id)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->delete_resource_user: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource_id** | **str**| The ID of the resource. |
+ **user_id** | **str**| The ID of a user to remove from this resource. |
+ **access_level_remote_id** | **str**| 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. | [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 user'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)
+
+# **get_resource**
+> Resource get_resource(resource_id)
+
+
+
+Retrieves a resource.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.resource import Resource
+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.
+
+ try:
+ api_response = api_instance.get_resource(resource_id)
+ print("The response of ResourcesApi->get_resource:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->get_resource: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource_id** | **str**| The ID of the resource. |
+
+### Return type
+
+[**Resource**](Resource.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 requested 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_message_channels**
+> MessageChannelList get_resource_message_channels(resource_id)
+
+
+
+Gets the list of audit message channels attached to a resource.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.message_channel_list import MessageChannelList
+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.
+
+ try:
+ api_response = api_instance.get_resource_message_channels(resource_id)
+ print("The response of ResourcesApi->get_resource_message_channels:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->get_resource_message_channels: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource_id** | **str**| The ID of the resource. |
+
+### Return type
+
+[**MessageChannelList**](MessageChannelList.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 audit message channels attached 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)
+
+# **get_resource_reviewer_stages**
+> List[ReviewerStage] get_resource_reviewer_stages(resource_id)
+
+
+
+Gets the list reviewer stages for a resource.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
+from opal.models.reviewer_stage import ReviewerStage
+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(
@@ -45,32 +524,35 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the resource.
+ api_instance = opal.ResourcesApi(api_client)
+ resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource.
- # example passing only required values which don't have defaults set
try:
- api_instance.delete_resource(resource_id)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->delete_resource: %s\n" % e)
+ api_response = api_instance.get_resource_reviewer_stages(resource_id)
+ print("The response of ResourcesApi->get_resource_reviewer_stages:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->get_resource_reviewer_stages: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
+ **resource_id** | **str**| The ID of the resource. |
### Return type
-void (empty response body)
+[**List[ReviewerStage]**](ReviewerStage.md)
### Authorization
@@ -79,34 +561,32 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
-
+ - **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The resource was successfully deleted. | - |
+**200** | The reviewer stages for 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_message_channels**
-> MessageChannelList get_resource_message_channels(resource_id)
+# **get_resource_reviewers**
+> List[str] get_resource_reviewers(resource_id)
-Gets the list of message channels attached to a resource.
+Gets the list of owner IDs of the reviewers for a resource.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.message_channel_list import MessageChannelList
+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(
@@ -120,33 +600,35 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the resource.
+ api_instance = opal.ResourcesApi(api_client)
+ resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource.
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.get_resource_message_channels(resource_id)
+ api_response = api_instance.get_resource_reviewers(resource_id)
+ print("The response of ResourcesApi->get_resource_reviewers:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->get_resource_message_channels: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->get_resource_reviewers: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
+ **resource_id** | **str**| The ID of the resource. |
### Return type
-[**MessageChannelList**](MessageChannelList.md)
+**List[str]**
### Authorization
@@ -157,31 +639,31 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The message channels attached to the resource. | - |
+**200** | The IDs of owners that are reviewers for 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_reviewers**
-> [str] get_resource_reviewers(resource_id)
+# **get_resource_tags**
+> TagsList get_resource_tags(resource_id)
-Gets the list of team/user IDs of the reviewers for a resource.
+Returns all tags applied to the resource.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
+from opal.models.tags_list import TagsList
+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(
@@ -195,33 +677,35 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the resource.
+ api_instance = opal.ResourcesApi(api_client)
+ resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the resource whose tags to return.
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.get_resource_reviewers(resource_id)
+ api_response = api_instance.get_resource_tags(resource_id)
+ print("The response of ResourcesApi->get_resource_tags:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->get_resource_reviewers: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->get_resource_tags: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
+ **resource_id** | **str**| The ID of the resource whose tags to return. |
### Return type
-**[str]**
+[**TagsList**](TagsList.md)
### Authorization
@@ -232,32 +716,31 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The IDs of teams that are reviewers for this resource. | - |
+**200** | The tags applied 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)
-# **get_resource_tags**
-> TagsList get_resource_tags(resource_id)
+# **get_resource_users**
+> ResourceAccessUserList get_resource_users(resource_id, limit=limit)
-Returns all tags applied to the resource.
+Gets the list of users for this resource.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.tags_list import TagsList
+from opal.models.resource_access_user_list import ResourceAccessUserList
+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(
@@ -271,33 +754,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the resource whose tags to return.
+ 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)
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.get_resource_tags(resource_id)
+ api_response = api_instance.get_resource_users(resource_id, limit=limit)
+ print("The response of ResourcesApi->get_resource_users:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->get_resource_tags: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->get_resource_users: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource whose tags to return. |
+ **resource_id** | **str**| The ID of the resource. |
+ **limit** | **int**| Limit the number of results returned. | [optional]
### Return type
-[**TagsList**](TagsList.md)
+[**ResourceAccessUserList**](ResourceAccessUserList.md)
### Authorization
@@ -308,17 +795,93 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | List of users 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_visibility**
+> VisibilityInfo get_resource_visibility(resource_id)
+
+
+
+Gets the visibility of this resource.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.visibility_info import VisibilityInfo
+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.
+
+ try:
+ api_response = api_instance.get_resource_visibility(resource_id)
+ print("The response of ResourcesApi->get_resource_visibility:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->get_resource_visibility: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource_id** | **str**| The ID of the resource. |
+
+### Return type
+
+[**VisibilityInfo**](VisibilityInfo.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 tags applied to the resource. | - |
+**200** | The visibility info of 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_resources**
-> PaginatedResourcesList get_resources()
+> PaginatedResourcesList get_resources(cursor=cursor, page_size=page_size, resource_type_filter=resource_type_filter, resource_ids=resource_ids, resource_name=resource_name, parent_resource_id=parent_resource_id)
@@ -329,12 +892,12 @@ Returns a list of resources for your organization.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.resource_type_enum import ResourceTypeEnum
-from opal.model.paginated_resources_list import PaginatedResourcesList
+from opal.models.paginated_resources_list import PaginatedResourcesList
+from opal.models.resource_type_enum import ResourceTypeEnum
+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(
@@ -348,34 +911,41 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional)
+ api_instance = opal.ResourcesApi(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)
- resource_type_filter = ResourceTypeEnum("AWS_IAM_ROLE") # ResourceTypeEnum | The resource type to filter by. (optional)
+ resource_type_filter = opal.ResourceTypeEnum() # ResourceTypeEnum | The resource type to filter by. (optional)
+ resource_ids = ['[\"4baf8423-db0a-4037-a4cf-f79c60cb67a5\",\"1b978423-db0a-4037-a4cf-f79c60cb67b3\"]'] # List[str] | The resource ids to filter by. (optional)
+ resource_name = 'example-name' # str | Resource name. (optional)
+ parent_resource_id = '[\"4baf8423-db0a-4037-a4cf-f79c60cb67a5\"]' # str | The parent resource id to filter by. (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
- api_response = api_instance.get_resources(cursor=cursor, page_size=page_size, resource_type_filter=resource_type_filter)
+ api_response = api_instance.get_resources(cursor=cursor, page_size=page_size, resource_type_filter=resource_type_filter, resource_ids=resource_ids, resource_name=resource_name, parent_resource_id=parent_resource_id)
+ print("The response of ResourcesApi->get_resources:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling ResourcesApi->get_resources: %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]
- **resource_type_filter** | **ResourceTypeEnum**| The resource type to filter by. | [optional]
+ **cursor** | **str**| The pagination cursor value. | [optional]
+ **page_size** | **int**| Number of results to return per page. Default is 200. | [optional]
+ **resource_type_filter** | [**ResourceTypeEnum**](.md)| The resource type to filter by. | [optional]
+ **resource_ids** | [**List[str]**](str.md)| The resource ids to filter by. | [optional]
+ **resource_name** | **str**| Resource name. | [optional]
+ **parent_resource_id** | **str**| The parent resource id to filter by. | [optional]
### Return type
@@ -390,7 +960,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -400,7 +969,7 @@ 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)
# **resource_user_access_status_retrieve**
-> ResourceUserAccessStatus resource_user_access_status_retrieve(resource_id, user_id)
+> ResourceUserAccessStatus resource_user_access_status_retrieve(resource_id, user_id, access_level_remote_id=access_level_remote_id, cursor=cursor, page_size=page_size)
@@ -411,11 +980,11 @@ Get user's access status to a resource.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.resource_user_access_status import ResourceUserAccessStatus
+from opal.models.resource_user_access_status import ResourceUserAccessStatus
+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(
@@ -429,45 +998,39 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the resource.
- user_id = "29827fb8-f2dd-4e80-9576-28e31e9934ac" # str | The ID of the user.
- access_level_remote_id = "arn:aws:iam::590304332660:role/AdministratorAccess" # str | The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. (optional)
- cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional)
+ api_instance = opal.ResourcesApi(api_client)
+ resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the resource.
+ user_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac' # str | The ID of the user.
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess' # str | The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. (optional)
+ cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional)
page_size = 200 # int | Number of results to return per page. Default is 200. (optional)
- # example passing only required values which don't have defaults set
- try:
- api_response = api_instance.resource_user_access_status_retrieve(resource_id, user_id)
- pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->resource_user_access_status_retrieve: %s\n" % e)
-
- # example passing only required values which don't have defaults set
- # and optional values
try:
api_response = api_instance.resource_user_access_status_retrieve(resource_id, user_id, access_level_remote_id=access_level_remote_id, cursor=cursor, page_size=page_size)
+ print("The response of ResourcesApi->resource_user_access_status_retrieve:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling ResourcesApi->resource_user_access_status_retrieve: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
- **user_id** | **str**| The ID of the user. |
- **access_level_remote_id** | **str**| The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. | [optional]
- **cursor** | **str**| The pagination cursor value. | [optional]
- **page_size** | **int**| Number of results to return per page. Default is 200. | [optional]
+ **resource_id** | **str**| The ID of the resource. |
+ **user_id** | **str**| The ID of the user. |
+ **access_level_remote_id** | **str**| The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. | [optional]
+ **cursor** | **str**| The pagination cursor value. | [optional]
+ **page_size** | **int**| Number of results to return per page. Default is 200. | [optional]
### Return type
@@ -482,7 +1045,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -491,23 +1053,23 @@ 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)
-# **resource_users**
-> PaginatedResourceUserList resource_users(resource_id)
+# **set_resource_message_channels**
+> List[str] set_resource_message_channels(resource_id, message_channel_id_list)
-Returns a list of `ResourceUser` objects.
+Sets the list of audit message channels attached to a resource.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.paginated_resource_user_list import PaginatedResourceUserList
+from opal.models.message_channel_id_list import MessageChannelIDList
+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(
@@ -521,47 +1083,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the resource.
- access_level_remote_id = "arn:aws:iam::590304332660:role/AdministratorAccess" # str | The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. (optional)
- cursor = "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" # str | The pagination cursor value. (optional)
- page_size = 200 # int | Number of results to return per page. Default is 200. (optional)
+ api_instance = opal.ResourcesApi(api_client)
+ resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource.
+ message_channel_id_list = opal.MessageChannelIDList() # MessageChannelIDList |
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.resource_users(resource_id)
- pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->resource_users: %s\n" % e)
-
- # example passing only required values which don't have defaults set
- # and optional values
- try:
- api_response = api_instance.resource_users(resource_id, access_level_remote_id=access_level_remote_id, cursor=cursor, page_size=page_size)
+ api_response = api_instance.set_resource_message_channels(resource_id, message_channel_id_list)
+ print("The response of ResourcesApi->set_resource_message_channels:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->resource_users: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->set_resource_message_channels: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
- **access_level_remote_id** | **str**| The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. | [optional]
- **cursor** | **str**| The pagination cursor value. | [optional]
- **page_size** | **int**| Number of results to return per page. Default is 200. | [optional]
+ **resource_id** | **str**| The ID of the resource. |
+ **message_channel_id_list** | [**MessageChannelIDList**](MessageChannelIDList.md)| |
### Return type
-[**PaginatedResourceUserList**](PaginatedResourceUserList.md)
+**List[str]**
### Authorization
@@ -569,35 +1121,35 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | One page worth of users with access to this resource. | - |
+**200** | The updated audit message channel IDs for 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)
-# **set_resource_message_channels**
-> [str] set_resource_message_channels(resource_id, message_channel_id_list)
+# **set_resource_reviewer_stages**
+> List[ReviewerStage] set_resource_reviewer_stages(resource_id, reviewer_stage_list)
-Sets the list of message channels attached to a resource.
+Sets the list of reviewer stages for a resource.
### Example
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.message_channel_id_list import MessageChannelIDList
+from opal.models.reviewer_stage import ReviewerStage
+from opal.models.reviewer_stage_list import ReviewerStageList
+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(
@@ -611,39 +1163,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the resource.
- message_channel_id_list = MessageChannelIDList(
- message_channel_ids=[
- "message_channel_ids_example",
- ],
- ) # MessageChannelIDList |
-
- # example passing only required values which don't have defaults set
+ api_instance = opal.ResourcesApi(api_client)
+ resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource.
+ reviewer_stage_list = opal.ReviewerStageList() # ReviewerStageList |
+
try:
- api_response = api_instance.set_resource_message_channels(resource_id, message_channel_id_list)
+ api_response = api_instance.set_resource_reviewer_stages(resource_id, reviewer_stage_list)
+ print("The response of ResourcesApi->set_resource_reviewer_stages:\n")
pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling ResourcesApi->set_resource_message_channels: %s\n" % e)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->set_resource_reviewer_stages: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
- **message_channel_id_list** | [**MessageChannelIDList**](MessageChannelIDList.md)| |
+ **resource_id** | **str**| The ID of the resource. |
+ **reviewer_stage_list** | [**ReviewerStageList**](ReviewerStageList.md)| |
### Return type
-**[str]**
+[**List[ReviewerStage]**](ReviewerStage.md)
### Authorization
@@ -654,17 +1204,16 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**200** | The updated message channel IDs for the resource. | - |
+**200** | The updated reviewer stages for 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)
# **set_resource_reviewers**
-> [str] set_resource_reviewers(resource_id, reviewer_id_list)
+> List[str] set_resource_reviewers(resource_id, reviewer_id_list)
@@ -675,11 +1224,11 @@ Sets the list of reviewers for a resource.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.reviewer_id_list import ReviewerIDList
+from opal.models.reviewer_id_list import ReviewerIDList
+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(
@@ -693,39 +1242,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- resource_id = "4baf8423-db0a-4037-a4cf-f79c60cb67a5" # str | The ID of the resource.
- reviewer_id_list = ReviewerIDList(
- reviewer_ids=[
- "reviewer_ids_example",
- ],
- ) # ReviewerIDList |
-
- # example passing only required values which don't have defaults set
+ api_instance = opal.ResourcesApi(api_client)
+ resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource.
+ reviewer_id_list = opal.ReviewerIDList() # ReviewerIDList |
+
try:
api_response = api_instance.set_resource_reviewers(resource_id, reviewer_id_list)
+ print("The response of ResourcesApi->set_resource_reviewers:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling ResourcesApi->set_resource_reviewers: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
- **reviewer_id_list** | [**ReviewerIDList**](ReviewerIDList.md)| |
+ **resource_id** | **str**| The ID of the resource. |
+ **reviewer_id_list** | [**ReviewerIDList**](ReviewerIDList.md)| |
### Return type
-**[str]**
+**List[str]**
### Authorization
@@ -736,12 +1283,90 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | The updated IDs of owners that are reviewers for 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)
+
+# **set_resource_visibility**
+> VisibilityInfo set_resource_visibility(resource_id, visibility_info)
+
+
+
+Sets the visibility of this resource.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.visibility_info import VisibilityInfo
+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.
+ visibility_info = opal.VisibilityInfo() # VisibilityInfo |
+
+ try:
+ api_response = api_instance.set_resource_visibility(resource_id, visibility_info)
+ print("The response of ResourcesApi->set_resource_visibility:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ResourcesApi->set_resource_visibility: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **resource_id** | **str**| The ID of the resource. |
+ **visibility_info** | [**VisibilityInfo**](VisibilityInfo.md)| |
+
+### Return type
+
+[**VisibilityInfo**](VisibilityInfo.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 updated IDs of teams that are reviewers for this resource | - |
+**200** | The visibility info of 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)
@@ -757,11 +1382,11 @@ Bulk updates a list of resources.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import resources_api
-from opal.model.update_resource_info_list import UpdateResourceInfoList
+from opal.models.update_resource_info_list import UpdateResourceInfoList
+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(
@@ -775,43 +1400,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = resources_api.ResourcesApi(api_client)
- update_resource_info_list = UpdateResourceInfoList(
- resources=[
- UpdateResourceInfo(
- resource_id="f454d283-ca87-4a8a-bdbb-df212eca5353",
- name="my-mongo-db",
- description="This resource represents AWS IAM role "SupportUser".",
- owner_team_id="7c86c85d-0651-43e2-a748-d69d658418e8",
- visibility=VisibilityEnum("GLOBAL"),
- max_duration=120,
- require_manager_approval=False,
- require_support_ticket=False,
- folder_id="e27cb7b0-98e2-4555-9916-9e6d8ca6b079",
- ),
- ],
- ) # UpdateResourceInfoList | Resources to be updated
-
- # example passing only required values which don't have defaults set
+ api_instance = opal.ResourcesApi(api_client)
+ update_resource_info_list = opal.UpdateResourceInfoList() # UpdateResourceInfoList | Resources to be updated
+
try:
api_response = api_instance.update_resources(update_resource_info_list)
+ print("The response of ResourcesApi->update_resources:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling ResourcesApi->update_resources: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **update_resource_info_list** | [**UpdateResourceInfoList**](UpdateResourceInfoList.md)| Resources to be updated |
+ **update_resource_info_list** | [**UpdateResourceInfoList**](UpdateResourceInfoList.md)| Resources to be updated |
### Return type
@@ -826,7 +1439,6 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/ReviewerIDList.md b/docs/ReviewerIDList.md
index 4960830..9dc79aa 100644
--- a/docs/ReviewerIDList.md
+++ b/docs/ReviewerIDList.md
@@ -3,11 +3,28 @@
A list of reviewer IDs.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**reviewer_ids** | **[str]** | |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**reviewer_ids** | **List[str]** | |
+
+## Example
+
+```python
+from opal.models.reviewer_id_list import ReviewerIDList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ReviewerIDList from a JSON string
+reviewer_id_list_instance = ReviewerIDList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..b5b640b
--- /dev/null
+++ b/docs/ReviewerStage.md
@@ -0,0 +1,32 @@
+# ReviewerStage
+
+A reviewer stage.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**require_manager_approval** | **bool** | Whether this reviewer stage should require manager approval. |
+**operator** | **str** | The operator of the reviewer stage. |
+**owner_ids** | **List[str]** | |
+
+## Example
+
+```python
+from opal.models.reviewer_stage import ReviewerStage
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ReviewerStage from a JSON string
+reviewer_stage_instance = ReviewerStage.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..ad1fa49
--- /dev/null
+++ b/docs/ReviewerStageList.md
@@ -0,0 +1,29 @@
+# ReviewerStageList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**stages** | [**List[ReviewerStage]**](ReviewerStage.md) | A list of reviewer stages. |
+
+## Example
+
+```python
+from opal.models.reviewer_stage_list import ReviewerStageList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ReviewerStageList from a JSON string
+reviewer_stage_list_instance = ReviewerStageList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 b307355..d41c82f 100644
--- a/docs/Session.md
+++ b/docs/Session.md
@@ -3,6 +3,7 @@
# Session Object ### Description The `Session` object is used to represent an access session. Some resources can be accessed temporarily via a time-bounded session. ### Usage Example Fetch from the `LIST Sessions` endpoint.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**connection_id** | **str** | The ID of the connection. |
@@ -10,8 +11,24 @@ Name | Type | Description | Notes
**resource_id** | **str** | The ID of the resource. |
**access_level** | [**ResourceAccessLevel**](ResourceAccessLevel.md) | |
**expiration_date** | **datetime** | The day and time the user's access will expire. |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+## Example
+
+```python
+from opal.models.session import Session
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Session from a JSON string
+session_instance = Session.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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/SessionsApi.md b/docs/SessionsApi.md
index 55639dc..d9c8539 100644
--- a/docs/SessionsApi.md
+++ b/docs/SessionsApi.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **sessions**
-> SessionsList sessions(resource_id)
+> SessionsList sessions(resource_id, user_id=user_id)
@@ -19,11 +19,11 @@ Returns a list of `Session` objects.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import sessions_api
-from opal.model.sessions_list import SessionsList
+from opal.models.sessions_list import SessionsList
+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(
@@ -37,39 +37,33 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = sessions_api.SessionsApi(api_client)
- resource_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the resource.
- user_id = "32acc112-21ff-4669-91c2-21e27683eaa1" # str | The ID of the user you wish to query sessions for. (optional)
-
- # example passing only required values which don't have defaults set
- try:
- api_response = api_instance.sessions(resource_id)
- pprint(api_response)
- except opal.ApiException as e:
- print("Exception when calling SessionsApi->sessions: %s\n" % e)
+ api_instance = opal.SessionsApi(api_client)
+ resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the resource.
+ user_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the user you wish to query sessions for. (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
api_response = api_instance.sessions(resource_id, user_id=user_id)
+ print("The response of SessionsApi->sessions:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling SessionsApi->sessions: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **resource_id** | **str**| The ID of the resource. |
- **user_id** | **str**| The ID of the user you wish to query sessions for. | [optional]
+ **resource_id** | **str**| The ID of the resource. |
+ **user_id** | **str**| The ID of the user you wish to query sessions for. | [optional]
### Return type
@@ -84,7 +78,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/SessionsList.md b/docs/SessionsList.md
index d4144f0..aec7e3b 100644
--- a/docs/SessionsList.md
+++ b/docs/SessionsList.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**next** | **str, none_type** | The cursor with which to continue pagination if additional result pages exist. | [optional]
-**previous** | **str, none_type** | The cursor used to obtain the current result page. | [optional]
-**results** | [**[Session]**](Session.md) | | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**next** | **str** | The cursor with which to continue pagination if additional result pages exist. | [optional]
+**previous** | **str** | The cursor used to obtain the current result page. | [optional]
+**results** | [**List[Session]**](Session.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.sessions_list import SessionsList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of SessionsList from a JSON string
+sessions_list_instance = SessionsList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..96412b1
--- /dev/null
+++ b/docs/SubEvent.md
@@ -0,0 +1,30 @@
+# SubEvent
+
+# Sub event Object ### Description The `SubEvent` object is used to represent a subevent. ### Usage Example Fetch from the `LIST Events` endpoint.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sub_event_type** | **str** | The subevent type. |
+
+## Example
+
+```python
+from opal.models.sub_event import SubEvent
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of SubEvent from a JSON string
+sub_event_instance = SubEvent.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 b4c09c7..8f8df8d 100644
--- a/docs/Tag.md
+++ b/docs/Tag.md
@@ -3,17 +3,33 @@
# Tag Object ### Description The `Tag` object is used to represent a tag. ### Usage Example Get tags from the `GET Tag` endpoint.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tag_id** | **str** | The ID of the tag. |
**created_at** | **datetime** | The date the tag was created. | [optional]
**updated_at** | **datetime** | The date the tag was last updated. | [optional]
**user_creator_id** | **str** | The ID of the user that created the tag. | [optional]
-**owner_team_id** | **str** | The ID of the team that owns the tag. | [optional]
**key** | **str** | The key of the tag. | [optional]
**value** | **str** | The value of the tag. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+## Example
+
+```python
+from opal.models.tag import Tag
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Tag from a JSON string
+tag_instance = Tag.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..a41962e
--- /dev/null
+++ b/docs/TagFilter.md
@@ -0,0 +1,31 @@
+# TagFilter
+
+A tag filter defined by the tags key and value.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**key** | **str** | The key of the tag. |
+**value** | **str** | The value of the tag. | [optional]
+
+## Example
+
+```python
+from opal.models.tag_filter import TagFilter
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of TagFilter from a JSON string
+tag_filter_instance = TagFilter.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 c37b63d..46801dd 100644
--- a/docs/TagsApi.md
+++ b/docs/TagsApi.md
@@ -9,6 +9,7 @@ Method | HTTP request | Description
[**add_user_tag**](TagsApi.md#add_user_tag) | **POST** /tags/{tag_id}/users/{user_id} |
[**create_tag**](TagsApi.md#create_tag) | **POST** /tag |
[**get_tag**](TagsApi.md#get_tag) | **GET** /tag |
+[**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} |
[**remove_user_tag**](TagsApi.md#remove_user_tag) | **DELETE** /tags/{tag_id}/users/{user_id} |
@@ -26,10 +27,10 @@ Applies a tag to a group.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
+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(
@@ -43,30 +44,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the tag to apply.
- group_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the group to apply the tag to.
+ api_instance = opal.TagsApi(api_client)
+ tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the tag to apply.
+ group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the group to apply the tag to.
- # example passing only required values which don't have defaults set
try:
api_instance.add_group_tag(tag_id, group_id)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->add_group_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_id** | **str**| The ID of the tag to apply. |
- **group_id** | **str**| The ID of the group to apply the tag to. |
+ **tag_id** | **str**| The ID of the tag to apply. |
+ **group_id** | **str**| The ID of the group to apply the tag to. |
### Return type
@@ -81,7 +83,6 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
-
### HTTP response details
| Status code | Description | Response headers |
@@ -102,10 +103,10 @@ Applies a tag to a resource.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
+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(
@@ -119,30 +120,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the tag to apply.
- resource_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the resource to apply the tag to.
+ api_instance = opal.TagsApi(api_client)
+ tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the tag to apply.
+ resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the resource to apply the tag to.
- # example passing only required values which don't have defaults set
try:
api_instance.add_resource_tag(tag_id, resource_id)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->add_resource_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_id** | **str**| The ID of the tag to apply. |
- **resource_id** | **str**| The ID of the resource to apply the tag to. |
+ **tag_id** | **str**| The ID of the tag to apply. |
+ **resource_id** | **str**| The ID of the resource to apply the tag to. |
### Return type
@@ -157,7 +159,6 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
-
### HTTP response details
| Status code | Description | Response headers |
@@ -178,10 +179,10 @@ Applies a tag to a user.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
+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(
@@ -195,30 +196,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the tag to apply.
- user_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the user to apply the tag to.
+ api_instance = opal.TagsApi(api_client)
+ tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the tag to apply.
+ user_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the user to apply the tag to.
- # example passing only required values which don't have defaults set
try:
api_instance.add_user_tag(tag_id, user_id)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->add_user_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_id** | **str**| The ID of the tag to apply. |
- **user_id** | **str**| The ID of the user to apply the tag to. |
+ **tag_id** | **str**| The ID of the tag to apply. |
+ **user_id** | **str**| The ID of the user to apply the tag to. |
### Return type
@@ -233,7 +235,6 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
-
### HTTP response details
| Status code | Description | Response headers |
@@ -243,7 +244,7 @@ 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)
# **create_tag**
-> Tag create_tag(tag_key, tag_value, tag_owner_team_id)
+> Tag create_tag(tag_key=tag_key, tag_value=tag_value, admin_owner_id=admin_owner_id, create_tag_info=create_tag_info)
@@ -254,11 +255,12 @@ Creates a tag with the given key and value.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
-from opal.model.tag import Tag
+from opal.models.create_tag_info import CreateTagInfo
+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(
@@ -272,33 +274,37 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_key = "api-scope" # str | The key of the tag to create.
- tag_value = "production" # str | The value of the tag to create.
- tag_owner_team_id = "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" # str | The ID of the team that owns the tag.
+ api_instance = opal.TagsApi(api_client)
+ tag_key = 'api-scope' # str | The key of the tag to create. (optional)
+ tag_value = 'production' # str | The value of the tag to create. (optional)
+ admin_owner_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The ID of the owner that manages the tag. (optional)
+ create_tag_info = opal.CreateTagInfo() # CreateTagInfo | (optional)
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.create_tag(tag_key, tag_value, tag_owner_team_id)
+ api_response = api_instance.create_tag(tag_key=tag_key, tag_value=tag_value, admin_owner_id=admin_owner_id, create_tag_info=create_tag_info)
+ print("The response of TagsApi->create_tag:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->create_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_key** | **str**| The key of the tag to create. |
- **tag_value** | **str**| The value of the tag to create. |
- **tag_owner_team_id** | **str**| The ID of the team that owns the tag. |
+ **tag_key** | **str**| The key of the tag to create. | [optional]
+ **tag_value** | **str**| The value of the tag to create. | [optional]
+ **admin_owner_id** | **str**| The ID of the owner that manages the tag. | [optional]
+ **create_tag_info** | [**CreateTagInfo**](CreateTagInfo.md)| | [optional]
### Return type
@@ -310,10 +316,9 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: Not defined
+ - **Content-Type**: application/json
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -323,7 +328,7 @@ 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**
-> Tag get_tag(tag_key, tag_value)
+> Tag get_tag(tag_key, tag_value=tag_value)
@@ -334,11 +339,11 @@ Gets a tag with the given key and value.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
-from opal.model.tag import Tag
+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(
@@ -352,31 +357,33 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_key = "api-scope" # str | The key of the tag to get.
- tag_value = "production" # str | The value of the tag to get.
+ api_instance = opal.TagsApi(api_client)
+ tag_key = 'api-scope' # str | The key of the tag to get.
+ tag_value = 'production' # str | The value of the tag to get. (optional)
- # example passing only required values which don't have defaults set
try:
- api_response = api_instance.get_tag(tag_key, tag_value)
+ api_response = api_instance.get_tag(tag_key, tag_value=tag_value)
+ print("The response of TagsApi->get_tag:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->get_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_key** | **str**| The key of the tag to get. |
- **tag_value** | **str**| The value of the tag to get. |
+ **tag_key** | **str**| The key of the tag to get. |
+ **tag_value** | **str**| The value of the tag to get. | [optional]
### Return type
@@ -391,7 +398,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -400,6 +406,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_tags**
+> PaginatedTagsList get_tags(cursor=cursor, page_size=page_size)
+
+
+
+Returns a list of tags created by your organization.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.paginated_tags_list import PaginatedTagsList
+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)
+ 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_tags(cursor=cursor, page_size=page_size)
+ print("The response of TagsApi->get_tags:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling TagsApi->get_tags: %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
+
+[**PaginatedTagsList**](PaginatedTagsList.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** | A list of tags created by 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)
+
# **remove_group_tag**
> remove_group_tag(tag_id, group_id)
@@ -412,10 +497,10 @@ Removes a tag from a group.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
+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(
@@ -429,30 +514,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the tag to remove.
- group_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the group to remove the tag from.
+ api_instance = opal.TagsApi(api_client)
+ tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the tag to remove.
+ group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the group to remove the tag from.
- # example passing only required values which don't have defaults set
try:
api_instance.remove_group_tag(tag_id, group_id)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->remove_group_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_id** | **str**| The ID of the tag to remove. |
- **group_id** | **str**| The ID of the group to remove the tag from. |
+ **tag_id** | **str**| The ID of the tag to remove. |
+ **group_id** | **str**| The ID of the group to remove the tag from. |
### Return type
@@ -467,7 +553,6 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
-
### HTTP response details
| Status code | Description | Response headers |
@@ -488,10 +573,10 @@ Removes a tag from a resource.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
+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(
@@ -505,30 +590,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the tag to remove.
- resource_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the resource to remove the tag from.
+ api_instance = opal.TagsApi(api_client)
+ tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the tag to remove.
+ resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the resource to remove the tag from.
- # example passing only required values which don't have defaults set
try:
api_instance.remove_resource_tag(tag_id, resource_id)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->remove_resource_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_id** | **str**| The ID of the tag to remove. |
- **resource_id** | **str**| The ID of the resource to remove the tag from. |
+ **tag_id** | **str**| The ID of the tag to remove. |
+ **resource_id** | **str**| The ID of the resource to remove the tag from. |
### Return type
@@ -543,7 +629,6 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
-
### HTTP response details
| Status code | Description | Response headers |
@@ -564,10 +649,10 @@ Removes a tag from a user.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import tags_api
+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(
@@ -581,30 +666,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = tags_api.TagsApi(api_client)
- tag_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the tag to remove.
- user_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the user to remove the tag from.
+ api_instance = opal.TagsApi(api_client)
+ tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the tag to remove.
+ user_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the user to remove the tag from.
- # example passing only required values which don't have defaults set
try:
api_instance.remove_user_tag(tag_id, user_id)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling TagsApi->remove_user_tag: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **tag_id** | **str**| The ID of the tag to remove. |
- **user_id** | **str**| The ID of the user to remove the tag from. |
+ **tag_id** | **str**| The ID of the tag to remove. |
+ **user_id** | **str**| The ID of the user to remove the tag from. |
### Return type
@@ -619,7 +705,6 @@ void (empty response body)
- **Content-Type**: Not defined
- **Accept**: Not defined
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/TagsList.md b/docs/TagsList.md
index 7b21e00..1052cb3 100644
--- a/docs/TagsList.md
+++ b/docs/TagsList.md
@@ -2,11 +2,28 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**tags** | [**[Tag]**](Tag.md) | |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**tags** | [**List[Tag]**](Tag.md) | |
+
+## Example
+
+```python
+from opal.models.tags_list import TagsList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of TagsList from a JSON string
+tags_list_instance = TagsList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..69fb373
--- /dev/null
+++ b/docs/UAR.md
@@ -0,0 +1,37 @@
+# UAR
+
+A user access review.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uar_id** | **str** | The ID of the UAR. |
+**name** | **str** | The name of the UAR. |
+**reviewer_assignment_policy** | [**UARReviewerAssignmentPolicyEnum**](UARReviewerAssignmentPolicyEnum.md) | |
+**send_reviewer_assignment_notification** | **bool** | A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False. |
+**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. |
+**uar_scope** | [**UARScope**](UARScope.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.uar import UAR
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UAR from a JSON string
+uar_instance = UAR.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..40a349e
--- /dev/null
+++ b/docs/UARReviewerAssignmentPolicyEnum.md
@@ -0,0 +1,12 @@
+# UARReviewerAssignmentPolicyEnum
+
+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
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[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
new file mode 100644
index 0000000..326ac6f
--- /dev/null
+++ b/docs/UARScope.md
@@ -0,0 +1,32 @@
+# UARScope
+
+If set, the access review will only contain resources and groups that match at least one of the filters in scope.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**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
+
+```python
+from opal.models.uar_scope import UARScope
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UARScope from a JSON string
+uar_scope_instance = UARScope.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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/UarsApi.md b/docs/UarsApi.md
new file mode 100644
index 0000000..1207d88
--- /dev/null
+++ b/docs/UarsApi.md
@@ -0,0 +1,245 @@
+# opal.UarsApi
+
+All URIs are relative to *https://api.opal.dev/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_uar**](UarsApi.md#create_uar) | **POST** /uar |
+[**get_uar**](UarsApi.md#get_uar) | **GET** /uar/{uar_id} |
+[**get_uars**](UarsApi.md#get_uars) | **GET** /uars |
+
+
+# **create_uar**
+> UAR create_uar(create_uar_info)
+
+
+
+Starts a User Access Review.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.create_uar_info import CreateUARInfo
+from opal.models.uar import UAR
+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.UarsApi(api_client)
+ create_uar_info = opal.CreateUARInfo() # CreateUARInfo | The settings of the UAR.
+
+ try:
+ api_response = api_instance.create_uar(create_uar_info)
+ print("The response of UarsApi->create_uar:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling UarsApi->create_uar: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **create_uar_info** | [**CreateUARInfo**](CreateUARInfo.md)| The settings of the UAR. |
+
+### Return type
+
+[**UAR**](UAR.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 UAR that was started. | - |
+
+[[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_uar**
+> UAR get_uar(uar_id)
+
+
+
+Retrieves a specific UAR.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.uar import UAR
+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.UarsApi(api_client)
+ uar_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the UAR.
+
+ try:
+ api_response = api_instance.get_uar(uar_id)
+ print("The response of UarsApi->get_uar:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling UarsApi->get_uar: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **uar_id** | **str**| The ID of the UAR. |
+
+### Return type
+
+[**UAR**](UAR.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 UAR that was 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_uars**
+> PaginatedUARsList get_uars(cursor=cursor, page_size=page_size)
+
+
+
+Returns a list of `UAR` objects.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.paginated_uars_list import PaginatedUARsList
+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.UarsApi(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_uars(cursor=cursor, page_size=page_size)
+ print("The response of UarsApi->get_uars:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling UarsApi->get_uars: %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
+
+[**PaginatedUARsList**](PaginatedUARsList.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** | A list of UARs for 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/UpdateConfigurationTemplateInfo.md b/docs/UpdateConfigurationTemplateInfo.md
new file mode 100644
index 0000000..9b874d6
--- /dev/null
+++ b/docs/UpdateConfigurationTemplateInfo.md
@@ -0,0 +1,40 @@
+# UpdateConfigurationTemplateInfo
+
+# UpdateConfigurationTemplateInfo Object ### Description The `ConfigurationTemplate` object is used to represent an update to a configuration template. ### Usage Example Use in the `PUT Configuration Templates` endpoint.
+
+## Properties
+
+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]
+**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]
+**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]
+
+## Example
+
+```python
+from opal.models.update_configuration_template_info import UpdateConfigurationTemplateInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateConfigurationTemplateInfo from a JSON string
+update_configuration_template_info_instance = UpdateConfigurationTemplateInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..421a2e3
--- /dev/null
+++ b/docs/UpdateGroupBindingInfo.md
@@ -0,0 +1,32 @@
+# UpdateGroupBindingInfo
+
+# UpdateGroupBindingInfo Object ### Description The `UpdateGroupBindingInfo` object is used as an input to the UpdateGroupBinding API.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_binding_id** | **str** | The ID of the group binding. |
+**source_group_id** | **str** | The ID of the source group. |
+**groups** | [**List[CreateGroupBindingInfoGroupsInner]**](CreateGroupBindingInfoGroupsInner.md) | The list of groups. |
+
+## Example
+
+```python
+from opal.models.update_group_binding_info import UpdateGroupBindingInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateGroupBindingInfo from a JSON string
+update_group_binding_info_instance = UpdateGroupBindingInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..9e36cd3
--- /dev/null
+++ b/docs/UpdateGroupBindingInfoList.md
@@ -0,0 +1,29 @@
+# UpdateGroupBindingInfoList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**group_bindings** | [**List[UpdateGroupBindingInfo]**](UpdateGroupBindingInfo.md) | A list of group bindings with information to update. |
+
+## Example
+
+```python
+from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateGroupBindingInfoList from a JSON string
+update_group_binding_info_list_instance = UpdateGroupBindingInfoList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 8705abf..6f735b5 100644
--- a/docs/UpdateGroupInfo.md
+++ b/docs/UpdateGroupInfo.md
@@ -3,19 +3,44 @@
# UpdateGroupInfo Object ### Description The `UpdateGroupInfo` object is used as an input to the UpdateGroup API.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**group_id** | **str** | The ID of the group. |
**name** | **str** | The name of the group. | [optional]
**description** | **str** | A description of the group. | [optional]
-**owner_team_id** | **str** | The ID of the owning team of the group. Use empty string to remove owner. Required when converting from Team to Group. | [optional]
-**visibility** | [**VisibilityEnum**](VisibilityEnum.md) | | [optional]
-**max_duration** | **int** | The maximum duration access to the group can be requested for (in minutes). Use 0 to set to indefinite. | [optional]
-**require_manager_approval** | **bool** | A bool representing whether or not access requests to the group require manager approval. | [optional]
-**require_support_ticket** | **bool** | A bool representing whether or not access requests to the group require a support ticket. | [optional]
+**admin_owner_id** | **str** | The ID of the owner of the group. | [optional]
+**max_duration** | **int** | The maximum duration for which the group can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`. | [optional]
+**recommended_duration** | **int** | The recommended duration for which the group should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`. | [optional]
+**require_manager_approval** | **bool** | A bool representing whether or not access requests to the group require manager approval. Deprecated in favor of `request_configurations`. | [optional]
+**require_support_ticket** | **bool** | A bool representing whether or not access requests to the group require an access ticket. Deprecated in favor of `request_configurations`. | [optional]
**folder_id** | **str** | The ID of the folder that the group is located in. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this group. | [optional]
+**require_mfa_to_request** | **bool** | A bool representing whether or not to require MFA for requesting access to this group. Deprecated in favor of `request_configurations`. | [optional]
+**auto_approval** | **bool** | A bool representing whether or not to automatically approve requests to this group. Deprecated in favor of `request_configurations`. | [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 group. Deprecated in favor of `request_configurations`. | [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]
+
+## Example
+
+```python
+from opal.models.update_group_info import UpdateGroupInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateGroupInfo from a JSON string
+update_group_info_instance = UpdateGroupInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 ca7f54d..e6a04c8 100644
--- a/docs/UpdateGroupInfoList.md
+++ b/docs/UpdateGroupInfoList.md
@@ -2,11 +2,28 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**groups** | [**[UpdateGroupInfo]**](UpdateGroupInfo.md) | A list of groups with information to update. |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**groups** | [**List[UpdateGroupInfo]**](UpdateGroupInfo.md) | A list of groups with information to update. |
+
+## Example
+
+```python
+from opal.models.update_group_info_list import UpdateGroupInfoList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateGroupInfoList from a JSON string
+update_group_info_list_instance = UpdateGroupInfoList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..41c1096
--- /dev/null
+++ b/docs/UpdateGroupResourcesInfo.md
@@ -0,0 +1,29 @@
+# UpdateGroupResourcesInfo
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**resources** | [**List[ResourceWithAccessLevel]**](ResourceWithAccessLevel.md) | |
+
+## Example
+
+```python
+from opal.models.update_group_resources_info import UpdateGroupResourcesInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateGroupResourcesInfo from a JSON string
+update_group_resources_info_instance = UpdateGroupResourcesInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..295d18d
--- /dev/null
+++ b/docs/UpdateOwnerInfo.md
@@ -0,0 +1,35 @@
+# UpdateOwnerInfo
+
+# UpdateOwnerInfo Object ### Description The `UpdateOwnerInfo` object is used as an input to the UpdateOwner API.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**owner_id** | **str** | The ID of the owner. |
+**name** | **str** | The name of the owner. | [optional]
+**description** | **str** | A description of the owner. | [optional]
+**access_request_escalation_period** | **int** | The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy. | [optional]
+**reviewer_message_channel_id** | **str** | The message channel id for the reviewer channel. Use \"\" to remove an existing message channel. | [optional]
+**source_group_id** | **str** | Sync this owner's user list with a source group. Use \"\" to remove an existing source group. | [optional]
+
+## Example
+
+```python
+from opal.models.update_owner_info import UpdateOwnerInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateOwnerInfo from a JSON string
+update_owner_info_instance = UpdateOwnerInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..b029816
--- /dev/null
+++ b/docs/UpdateOwnerInfoList.md
@@ -0,0 +1,29 @@
+# UpdateOwnerInfoList
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**owners** | [**List[UpdateOwnerInfo]**](UpdateOwnerInfo.md) | A list of owners with information to update. |
+
+## Example
+
+```python
+from opal.models.update_owner_info_list import UpdateOwnerInfoList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateOwnerInfoList from a JSON string
+update_owner_info_list_instance = UpdateOwnerInfoList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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 760dca5..b57c634 100644
--- a/docs/UpdateResourceInfo.md
+++ b/docs/UpdateResourceInfo.md
@@ -3,19 +3,45 @@
# UpdateResourceInfo Object ### Description The `UpdateResourceInfo` object is used as an input to the UpdateResource API.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**resource_id** | **str** | The ID of the resource. |
**name** | **str** | The name of the resource. | [optional]
**description** | **str** | A description of the resource. | [optional]
-**owner_team_id** | **str** | The ID of the owning team of the resource. | [optional]
-**visibility** | [**VisibilityEnum**](VisibilityEnum.md) | | [optional]
-**max_duration** | **int** | The maximum duration access to the resource can be requested for (in minutes). Use 0 to set to indefinite. | [optional]
+**admin_owner_id** | **str** | The ID of the owner of the resource. | [optional]
+**max_duration** | **int** | The maximum duration for which the resource can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`. | [optional]
+**recommended_duration** | **int** | The recommended duration for which the resource should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`. | [optional]
**require_manager_approval** | **bool** | A bool representing whether or not access requests to the resource require manager approval. | [optional]
-**require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require a support ticket. | [optional]
+**require_support_ticket** | **bool** | A bool representing whether or not access requests to the resource require an access ticket. Deprecated in favor of `request_configurations`. | [optional]
**folder_id** | **str** | The ID of the folder that the resource is located in. | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**require_mfa_to_approve** | **bool** | A bool representing whether or not to require MFA for reviewers to approve requests for this resource. | [optional]
+**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]
+**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]
+
+## Example
+
+```python
+from opal.models.update_resource_info import UpdateResourceInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateResourceInfo from a JSON string
+update_resource_info_instance = UpdateResourceInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 72ef87f..4b68440 100644
--- a/docs/UpdateResourceInfoList.md
+++ b/docs/UpdateResourceInfoList.md
@@ -2,11 +2,28 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**resources** | [**[UpdateResourceInfo]**](UpdateResourceInfo.md) | A list of resources with information to update. |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**resources** | [**List[UpdateResourceInfo]**](UpdateResourceInfo.md) | A list of resources with information to update. |
+
+## Example
+
+```python
+from opal.models.update_resource_info_list import UpdateResourceInfoList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UpdateResourceInfoList from a JSON string
+update_resource_info_list_instance = UpdateResourceInfoList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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 037ddfb..e4971ba 100644
--- a/docs/User.md
+++ b/docs/User.md
@@ -3,15 +3,34 @@
# User Object ### Description The `User` object is used to represent a user. ### Usage Example Fetch from the `LIST Sessions` endpoint.
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**user_id** | **str** | The ID of the user. |
**email** | **str** | The email of the user. |
**full_name** | **str** | The full name of the user. |
-**team_id** | **str, none_type** | The ID of the user's team. |
+**first_name** | **str** | The first name of the user. |
+**last_name** | **str** | The last name of the user. |
**position** | **str** | The user's position. |
-**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+**hr_idp_status** | [**UserHrIdpStatusEnum**](UserHrIdpStatusEnum.md) | | [optional]
+
+## Example
+
+```python
+from opal.models.user import User
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of User from a JSON string
+user_instance = User.from_json(json)
+# print the JSON string representation of the object
+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)
+```
[[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
new file mode 100644
index 0000000..9baa83c
--- /dev/null
+++ b/docs/UserHrIdpStatusEnum.md
@@ -0,0 +1,12 @@
+# UserHrIdpStatusEnum
+
+User status pulled from an HR/IDP provider.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[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
new file mode 100644
index 0000000..e584301
--- /dev/null
+++ b/docs/UserIDList.md
@@ -0,0 +1,30 @@
+# UserIDList
+
+A list of user IDs.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**user_ids** | **List[str]** | |
+
+## Example
+
+```python
+from opal.models.user_id_list import UserIDList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UserIDList from a JSON string
+user_id_list_instance = UserIDList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..82daf35
--- /dev/null
+++ b/docs/UserList.md
@@ -0,0 +1,30 @@
+# UserList
+
+A list of users.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**users** | [**List[User]**](User.md) | |
+
+## Example
+
+```python
+from opal.models.user_list import UserList
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UserList from a JSON string
+user_list_instance = UserList.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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/UsersApi.md b/docs/UsersApi.md
index 3645666..a90907c 100644
--- a/docs/UsersApi.md
+++ b/docs/UsersApi.md
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.opal.dev/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_user_tags**](UsersApi.md#get_user_tags) | **GET** /users/{user_id}/tags |
+[**get_users**](UsersApi.md#get_users) | **GET** /users |
[**user**](UsersApi.md#user) | **GET** /user |
@@ -20,11 +21,11 @@ Returns all tags applied to the user.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import users_api
-from opal.model.tags_list import TagsList
+from opal.models.tags_list import TagsList
+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(
@@ -38,29 +39,31 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = users_api.UsersApi(api_client)
- user_id = "1b978423-db0a-4037-a4cf-f79c60cb67b3" # str | The ID of the user whose tags to return.
+ api_instance = opal.UsersApi(api_client)
+ user_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the user whose tags to return.
- # example passing only required values which don't have defaults set
try:
api_response = api_instance.get_user_tags(user_id)
+ print("The response of UsersApi->get_user_tags:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling UsersApi->get_user_tags: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| The ID of the user whose tags to return. |
+ **user_id** | **str**| The ID of the user whose tags to return. |
### Return type
@@ -75,7 +78,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -84,8 +86,87 @@ 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_users**
+> PaginatedUsersList get_users(cursor=cursor, page_size=page_size)
+
+
+
+Returns a list of users for your organization.
+
+### Example
+
+* Bearer Authentication (BearerAuth):
+
+```python
+import opal
+from opal.models.paginated_users_list import PaginatedUsersList
+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.UsersApi(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_users(cursor=cursor, page_size=page_size)
+ print("The response of UsersApi->get_users:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling UsersApi->get_users: %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
+
+[**PaginatedUsersList**](PaginatedUsersList.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 users 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)
+
# **user**
-> User user()
+> User user(user_id=user_id, email=email)
@@ -96,11 +177,11 @@ Returns a `User` object.
* Bearer Authentication (BearerAuth):
```python
-import time
import opal
-from opal.api import users_api
-from opal.model.user import User
+from opal.models.user import User
+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(
@@ -114,32 +195,33 @@ configuration = opal.Configuration(
# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
+ 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 = users_api.UsersApi(api_client)
- user_id = "32acc112-21ff-4669-91c2-21e27683eaa1" # str | The user ID of the user. (optional)
- email = "johndoe@domain.org" # str | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. (optional)
+ api_instance = opal.UsersApi(api_client)
+ user_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The user ID of the user. (optional)
+ email = 'johndoe@domain.org' # str | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
api_response = api_instance.user(user_id=user_id, email=email)
+ print("The response of UsersApi->user:\n")
pprint(api_response)
- except opal.ApiException as e:
+ except Exception as e:
print("Exception when calling UsersApi->user: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **user_id** | **str**| The user ID of the user. | [optional]
- **email** | **str**| The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. | [optional]
+ **user_id** | **str**| The user ID of the user. | [optional]
+ **email** | **str**| The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. | [optional]
### Return type
@@ -154,7 +236,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/VisibilityInfo.md b/docs/VisibilityInfo.md
new file mode 100644
index 0000000..b6fa88d
--- /dev/null
+++ b/docs/VisibilityInfo.md
@@ -0,0 +1,31 @@
+# VisibilityInfo
+
+Visibility infomation of an entity.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**visibility** | [**VisibilityTypeEnum**](VisibilityTypeEnum.md) | |
+**visibility_group_ids** | **List[str]** | | [optional]
+
+## Example
+
+```python
+from opal.models.visibility_info import VisibilityInfo
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of VisibilityInfo from a JSON string
+visibility_info_instance = VisibilityInfo.from_json(json)
+# print the JSON string representation of the object
+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)
+```
+[[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
new file mode 100644
index 0000000..f2ed8e6
--- /dev/null
+++ b/docs/VisibilityTypeEnum.md
@@ -0,0 +1,12 @@
+# VisibilityTypeEnum
+
+The visibility level of the entity.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[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/git_push.sh b/git_push.sh
index 5808518..7c86d3e 100644
--- a/git_push.sh
+++ b/git_push.sh
@@ -19,7 +19,7 @@ if [ "$git_user_id" = "" ]; then
fi
if [ "$git_repo_id" = "" ]; then
- git_repo_id="opal-go"
+ git_repo_id="opal-python"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
diff --git a/opal/__init__.py b/opal/__init__.py
index 54b17de..d3c8ec0 100644
--- a/opal/__init__.py
+++ b/opal/__init__.py
@@ -1,28 +1,178 @@
+# coding: utf-8
+
# flake8: noqa
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
__version__ = "1.0.0"
+# import apis into sdk package
+from opal.api.apps_api import AppsApi
+from opal.api.configuration_templates_api import ConfigurationTemplatesApi
+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.message_channels_api import MessageChannelsApi
+from opal.api.on_call_schedules_api import OnCallSchedulesApi
+from opal.api.owners_api import OwnersApi
+from opal.api.requests_api import RequestsApi
+from opal.api.resources_api import ResourcesApi
+from opal.api.sessions_api import SessionsApi
+from opal.api.tags_api import TagsApi
+from opal.api.uars_api import UarsApi
+from opal.api.users_api import UsersApi
+
# import ApiClient
+from opal.api_response import ApiResponse
from opal.api_client import ApiClient
-
-# import Configuration
from opal.configuration import Configuration
-
-# import exceptions
from opal.exceptions import OpenApiException
-from opal.exceptions import ApiAttributeError
from opal.exceptions import ApiTypeError
from opal.exceptions import ApiValueError
from opal.exceptions import ApiKeyError
+from opal.exceptions import ApiAttributeError
from opal.exceptions import ApiException
+
+# import models into sdk package
+from opal.models.add_group_resource_request import AddGroupResourceRequest
+from opal.models.add_group_user_request import AddGroupUserRequest
+from opal.models.add_resource_user_request import AddResourceUserRequest
+from opal.models.app import App
+from opal.models.app_type_enum import AppTypeEnum
+from opal.models.apps_list import AppsList
+from opal.models.aws_permission_set_metadata import AwsPermissionSetMetadata
+from opal.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet
+from opal.models.condition import Condition
+from opal.models.configuration_template import ConfigurationTemplate
+from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo
+from opal.models.create_group_binding_info import CreateGroupBindingInfo
+from opal.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner
+from opal.models.create_group_info import CreateGroupInfo
+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_request_configuration_info_list import CreateRequestConfigurationInfoList
+from opal.models.create_resource_info import CreateResourceInfo
+from opal.models.create_tag_info import CreateTagInfo
+from opal.models.create_uar_info import CreateUARInfo
+from opal.models.entity_type_enum import EntityTypeEnum
+from opal.models.event import Event
+from opal.models.group import Group
+from opal.models.group_access_level import GroupAccessLevel
+from opal.models.group_binding import GroupBinding
+from opal.models.group_binding_group import GroupBindingGroup
+from opal.models.group_remote_info import GroupRemoteInfo
+from opal.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup
+from opal.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group
+from opal.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup
+from opal.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup
+from opal.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam
+from opal.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup
+from opal.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup
+from opal.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup
+from opal.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup
+from opal.models.group_resource import GroupResource
+from opal.models.group_resource_list import GroupResourceList
+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.message_channel import MessageChannel
+from opal.models.message_channel_id_list import MessageChannelIDList
+from opal.models.message_channel_list import MessageChannelList
+from opal.models.message_channel_provider_enum import MessageChannelProviderEnum
+from opal.models.on_call_schedule import OnCallSchedule
+from opal.models.on_call_schedule_id_list import OnCallScheduleIDList
+from opal.models.on_call_schedule_list import OnCallScheduleList
+from opal.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum
+from opal.models.owner import Owner
+from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList
+from opal.models.paginated_event_list import PaginatedEventList
+from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList
+from opal.models.paginated_groups_list import PaginatedGroupsList
+from opal.models.paginated_owners_list import PaginatedOwnersList
+from opal.models.paginated_resources_list import PaginatedResourcesList
+from opal.models.paginated_tags_list import PaginatedTagsList
+from opal.models.paginated_uars_list import PaginatedUARsList
+from opal.models.paginated_users_list import PaginatedUsersList
+from opal.models.request import Request
+from opal.models.request_configuration import RequestConfiguration
+from opal.models.request_custom_field_response import RequestCustomFieldResponse
+from opal.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue
+from opal.models.request_list import RequestList
+from opal.models.request_status_enum import RequestStatusEnum
+from opal.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum
+from opal.models.requested_item import RequestedItem
+from opal.models.resource import Resource
+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_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
+from opal.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster
+from opal.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole
+from opal.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet
+from opal.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance
+from opal.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset
+from opal.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable
+from opal.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket
+from opal.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance
+from opal.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder
+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_sql_instance import ResourceRemoteInfoGcpSqlInstance
+from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo
+from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject
+from opal.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp
+from opal.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole
+from opal.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole
+from opal.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole
+from opal.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet
+from opal.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile
+from opal.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole
+from opal.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole
+from opal.models.resource_type_enum import ResourceTypeEnum
+from opal.models.resource_user import ResourceUser
+from opal.models.resource_user_access_status import ResourceUserAccessStatus
+from opal.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum
+from opal.models.resource_with_access_level import ResourceWithAccessLevel
+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.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.uar import UAR
+from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum
+from opal.models.uar_scope import UARScope
+from opal.models.update_configuration_template_info import UpdateConfigurationTemplateInfo
+from opal.models.update_group_binding_info import UpdateGroupBindingInfo
+from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList
+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_owner_info import UpdateOwnerInfo
+from opal.models.update_owner_info_list import UpdateOwnerInfoList
+from opal.models.update_resource_info import UpdateResourceInfo
+from opal.models.update_resource_info_list import UpdateResourceInfoList
+from opal.models.user import User
+from opal.models.user_hr_idp_status_enum import UserHrIdpStatusEnum
+from opal.models.user_id_list import UserIDList
+from opal.models.user_list import UserList
+from opal.models.visibility_info import VisibilityInfo
+from opal.models.visibility_type_enum import VisibilityTypeEnum
diff --git a/opal/api/__init__.py b/opal/api/__init__.py
index c68e4b4..e7d52ff 100644
--- a/opal/api/__init__.py
+++ b/opal/api/__init__.py
@@ -1,3 +1,18 @@
-# do not import all apis into this module because that uses a lot of memory and stack frames
-# if you need the ability to import all apis from one package, import them with
-# from opal.apis import EventsApi
+# flake8: noqa
+
+# import apis into api package
+from opal.api.apps_api import AppsApi
+from opal.api.configuration_templates_api import ConfigurationTemplatesApi
+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.message_channels_api import MessageChannelsApi
+from opal.api.on_call_schedules_api import OnCallSchedulesApi
+from opal.api.owners_api import OwnersApi
+from opal.api.requests_api import RequestsApi
+from opal.api.resources_api import ResourcesApi
+from opal.api.sessions_api import SessionsApi
+from opal.api.tags_api import TagsApi
+from opal.api.uars_api import UarsApi
+from opal.api.users_api import UsersApi
+
diff --git a/opal/api/apps_api.py b/opal/api/apps_api.py
new file mode 100644
index 0000000..4e7044d
--- /dev/null
+++ b/opal/api/apps_api.py
@@ -0,0 +1,578 @@
+# 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 List, Optional
+from typing_extensions import Annotated
+from opal.models.app import App
+from opal.models.app_type_enum import AppTypeEnum
+from opal.models.apps_list import AppsList
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class AppsApi:
+ """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_app(
+ self,
+ app_id: Annotated[StrictStr, Field(description="The ID of the 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,
+ ) -> App:
+ """get_app
+
+ Returns an `App` object.
+
+ :param app_id: The ID of the app. (required)
+ :type app_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_app_serialize(
+ app_id=app_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "App",
+ }
+ 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_app_with_http_info(
+ self,
+ app_id: Annotated[StrictStr, Field(description="The ID of the 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[App]:
+ """get_app
+
+ Returns an `App` object.
+
+ :param app_id: The ID of the app. (required)
+ :type app_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_app_serialize(
+ app_id=app_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "App",
+ }
+ 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_app_without_preload_content(
+ self,
+ app_id: Annotated[StrictStr, Field(description="The ID of the 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_app
+
+ Returns an `App` object.
+
+ :param app_id: The ID of the app. (required)
+ :type app_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_app_serialize(
+ app_id=app_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "App",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_app_serialize(
+ self,
+ app_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if app_id is not None:
+ _path_params['app_id'] = app_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/apps/{app_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_apps(
+ self,
+ app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None,
+ owner_filter: Annotated[Optional[StrictStr], Field(description="An owner ID to filter by.")] = 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,
+ ) -> AppsList:
+ """get_apps
+
+ Returns a list of `App` objects.
+
+ :param app_type_filter: A list of app types to filter by.
+ :type app_type_filter: List[AppTypeEnum]
+ :param owner_filter: An owner ID to filter by.
+ :type owner_filter: 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_apps_serialize(
+ app_type_filter=app_type_filter,
+ owner_filter=owner_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AppsList",
+ }
+ 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_apps_with_http_info(
+ self,
+ app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None,
+ owner_filter: Annotated[Optional[StrictStr], Field(description="An owner ID to filter by.")] = 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[AppsList]:
+ """get_apps
+
+ Returns a list of `App` objects.
+
+ :param app_type_filter: A list of app types to filter by.
+ :type app_type_filter: List[AppTypeEnum]
+ :param owner_filter: An owner ID to filter by.
+ :type owner_filter: 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_apps_serialize(
+ app_type_filter=app_type_filter,
+ owner_filter=owner_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AppsList",
+ }
+ 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_apps_without_preload_content(
+ self,
+ app_type_filter: Annotated[Optional[List[AppTypeEnum]], Field(description="A list of app types to filter by.")] = None,
+ owner_filter: Annotated[Optional[StrictStr], Field(description="An owner ID to filter by.")] = 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_apps
+
+ Returns a list of `App` objects.
+
+ :param app_type_filter: A list of app types to filter by.
+ :type app_type_filter: List[AppTypeEnum]
+ :param owner_filter: An owner ID to filter by.
+ :type owner_filter: 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_apps_serialize(
+ app_type_filter=app_type_filter,
+ owner_filter=owner_filter,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AppsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_apps_serialize(
+ self,
+ app_type_filter,
+ owner_filter,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'app_type_filter': 'csv',
+ }
+
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if app_type_filter is not None:
+
+ _query_params.append(('app_type_filter', app_type_filter))
+
+ if owner_filter is not None:
+
+ _query_params.append(('owner_filter', owner_filter))
+
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/apps',
+ 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/configuration_templates_api.py b/opal/api/configuration_templates_api.py
new file mode 100644
index 0000000..9ea4e07
--- /dev/null
+++ b/opal/api/configuration_templates_api.py
@@ -0,0 +1,827 @@
+# 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
+from typing_extensions import Annotated
+from opal.models.configuration_template import ConfigurationTemplate
+from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo
+from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList
+from opal.models.update_configuration_template_info import UpdateConfigurationTemplateInfo
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class ConfigurationTemplatesApi:
+ """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 create_configuration_template(
+ self,
+ create_configuration_template_info: CreateConfigurationTemplateInfo,
+ _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,
+ ) -> ConfigurationTemplate:
+ """create_configuration_template
+
+ Creates a configuration template.
+
+ :param create_configuration_template_info: (required)
+ :type create_configuration_template_info: CreateConfigurationTemplateInfo
+ :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_configuration_template_serialize(
+ create_configuration_template_info=create_configuration_template_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConfigurationTemplate",
+ }
+ 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_configuration_template_with_http_info(
+ self,
+ create_configuration_template_info: CreateConfigurationTemplateInfo,
+ _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[ConfigurationTemplate]:
+ """create_configuration_template
+
+ Creates a configuration template.
+
+ :param create_configuration_template_info: (required)
+ :type create_configuration_template_info: CreateConfigurationTemplateInfo
+ :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_configuration_template_serialize(
+ create_configuration_template_info=create_configuration_template_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConfigurationTemplate",
+ }
+ 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_configuration_template_without_preload_content(
+ self,
+ create_configuration_template_info: CreateConfigurationTemplateInfo,
+ _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_configuration_template
+
+ Creates a configuration template.
+
+ :param create_configuration_template_info: (required)
+ :type create_configuration_template_info: CreateConfigurationTemplateInfo
+ :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_configuration_template_serialize(
+ create_configuration_template_info=create_configuration_template_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConfigurationTemplate",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_configuration_template_serialize(
+ self,
+ create_configuration_template_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, str] = {}
+ _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_configuration_template_info is not None:
+ _body_params = create_configuration_template_info
+
+
+ # set the HTTP header `Accept`
+ _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='/configuration-templates',
+ 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,
+ _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,
+ ) -> PaginatedConfigurationTemplateList:
+ """get_configuration_templates
+
+ Returns a list of `ConfigurationTemplate` objects.
+
+ :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_configuration_templates_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedConfigurationTemplateList",
+ }
+ 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_configuration_templates_with_http_info(
+ self,
+ _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[PaginatedConfigurationTemplateList]:
+ """get_configuration_templates
+
+ Returns a list of `ConfigurationTemplate` objects.
+
+ :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_configuration_templates_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedConfigurationTemplateList",
+ }
+ 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_configuration_templates_without_preload_content(
+ self,
+ _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_configuration_templates
+
+ Returns a list of `ConfigurationTemplate` objects.
+
+ :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_configuration_templates_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedConfigurationTemplateList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_configuration_templates_serialize(
+ self,
+ _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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/configuration-templates',
+ 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_configuration_template(
+ self,
+ update_configuration_template_info: Annotated[UpdateConfigurationTemplateInfo, Field(description="Configuration template 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,
+ ) -> ConfigurationTemplate:
+ """update_configuration_template
+
+ Update a configuration template.
+
+ :param update_configuration_template_info: Configuration template to be updated (required)
+ :type update_configuration_template_info: UpdateConfigurationTemplateInfo
+ :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_configuration_template_serialize(
+ update_configuration_template_info=update_configuration_template_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConfigurationTemplate",
+ }
+ 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_configuration_template_with_http_info(
+ self,
+ update_configuration_template_info: Annotated[UpdateConfigurationTemplateInfo, Field(description="Configuration template 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[ConfigurationTemplate]:
+ """update_configuration_template
+
+ Update a configuration template.
+
+ :param update_configuration_template_info: Configuration template to be updated (required)
+ :type update_configuration_template_info: UpdateConfigurationTemplateInfo
+ :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_configuration_template_serialize(
+ update_configuration_template_info=update_configuration_template_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConfigurationTemplate",
+ }
+ 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_configuration_template_without_preload_content(
+ self,
+ update_configuration_template_info: Annotated[UpdateConfigurationTemplateInfo, Field(description="Configuration template 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:
+ """update_configuration_template
+
+ Update a configuration template.
+
+ :param update_configuration_template_info: Configuration template to be updated (required)
+ :type update_configuration_template_info: UpdateConfigurationTemplateInfo
+ :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_configuration_template_serialize(
+ update_configuration_template_info=update_configuration_template_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConfigurationTemplate",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_configuration_template_serialize(
+ self,
+ update_configuration_template_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, str] = {}
+ _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 update_configuration_template_info is not None:
+ _body_params = update_configuration_template_info
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/configuration-templates',
+ 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/events_api.py b/opal/api/events_api.py
index 995ae65..4eb55ab 100644
--- a/opal/api/events_api.py
+++ b/opal/api/events_api.py
@@ -1,203 +1,419 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import re # noqa: F401
-import sys # noqa: F401
+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 opal.api_client import ApiClient, Endpoint as _Endpoint
-from opal.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from opal.model.paginated_event_list import PaginatedEventList
+from pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from opal.models.paginated_event_list import PaginatedEventList
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
-class EventsApi(object):
+
+class EventsApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.events_endpoint = _Endpoint(
- settings={
- 'response_type': (PaginatedEventList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/events',
- 'operation_id': 'events',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'start_date_filter',
- 'end_date_filter',
- 'actor_filter',
- 'object_filter',
- 'event_type_filter',
- 'cursor',
- 'page_size',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- 'page_size',
- ]
- },
- root_map={
- 'validations': {
- ('page_size',): {
-
- 'inclusive_maximum': 1000,
- },
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'start_date_filter':
- (str,),
- 'end_date_filter':
- (str,),
- 'actor_filter':
- (str,),
- 'object_filter':
- (str,),
- 'event_type_filter':
- (str,),
- 'cursor':
- (str,),
- 'page_size':
- (int,),
- },
- 'attribute_map': {
- 'start_date_filter': 'start_date_filter',
- 'end_date_filter': 'end_date_filter',
- 'actor_filter': 'actor_filter',
- 'object_filter': 'object_filter',
- 'event_type_filter': 'event_type_filter',
- 'cursor': 'cursor',
- 'page_size': 'page_size',
- },
- 'location_map': {
- 'start_date_filter': 'query',
- 'end_date_filter': 'query',
- 'actor_filter': 'query',
- 'object_filter': 'query',
- 'event_type_filter': 'query',
- 'cursor': 'query',
- 'page_size': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
+
+ @validate_call
def events(
self,
- **kwargs
- ):
- """events # noqa: E501
-
- Returns a list of `Event` objects. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.events(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- start_date_filter (str): A start date filter for the events.. [optional]
- end_date_filter (str): An end date filter for the events.. [optional]
- actor_filter (str): An actor filter for the events. Supply the ID of the actor.. [optional]
- object_filter (str): An object filter for the events. Supply the ID of the object.. [optional]
- event_type_filter (str): An event type filter for the events.. [optional]
- cursor (str): The pagination cursor value.. [optional]
- page_size (int): Number of results to return per page. Default is 200.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PaginatedEventList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None,
+ end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None,
+ actor_filter: Annotated[Optional[StrictStr], Field(description="An actor filter for the events. Supply the ID of the actor.")] = None,
+ object_filter: Annotated[Optional[StrictStr], Field(description="An object filter for the events. Supply the ID of the object.")] = None,
+ event_type_filter: Annotated[Optional[StrictStr], Field(description="An event type filter for the events.")] = None,
+ api_token_filter: Annotated[Optional[StrictStr], Field(description="An API filter for the events. Supply the name and preview of the API token.")] = None,
+ 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,
+ ) -> PaginatedEventList:
+ """events
+
+ Returns a list of `Event` objects.
+
+ :param start_date_filter: A start date filter for the events.
+ :type start_date_filter: str
+ :param end_date_filter: An end date filter for the events.
+ :type end_date_filter: str
+ :param actor_filter: An actor filter for the events. Supply the ID of the actor.
+ :type actor_filter: str
+ :param object_filter: An object filter for the events. Supply the ID of the object.
+ :type object_filter: str
+ :param event_type_filter: An event type filter for the events.
+ :type event_type_filter: str
+ :param api_token_filter: An API filter for the events. Supply the name and preview of the API token.
+ :type api_token_filter: str
+ :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._events_serialize(
+ start_date_filter=start_date_filter,
+ end_date_filter=end_date_filter,
+ actor_filter=actor_filter,
+ object_filter=object_filter,
+ event_type_filter=event_type_filter,
+ api_token_filter=api_token_filter,
+ cursor=cursor,
+ page_size=page_size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedEventList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def events_with_http_info(
+ self,
+ start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None,
+ end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None,
+ actor_filter: Annotated[Optional[StrictStr], Field(description="An actor filter for the events. Supply the ID of the actor.")] = None,
+ object_filter: Annotated[Optional[StrictStr], Field(description="An object filter for the events. Supply the ID of the object.")] = None,
+ event_type_filter: Annotated[Optional[StrictStr], Field(description="An event type filter for the events.")] = None,
+ api_token_filter: Annotated[Optional[StrictStr], Field(description="An API filter for the events. Supply the name and preview of the API token.")] = None,
+ 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[PaginatedEventList]:
+ """events
+
+ Returns a list of `Event` objects.
+
+ :param start_date_filter: A start date filter for the events.
+ :type start_date_filter: str
+ :param end_date_filter: An end date filter for the events.
+ :type end_date_filter: str
+ :param actor_filter: An actor filter for the events. Supply the ID of the actor.
+ :type actor_filter: str
+ :param object_filter: An object filter for the events. Supply the ID of the object.
+ :type object_filter: str
+ :param event_type_filter: An event type filter for the events.
+ :type event_type_filter: str
+ :param api_token_filter: An API filter for the events. Supply the name and preview of the API token.
+ :type api_token_filter: str
+ :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._events_serialize(
+ start_date_filter=start_date_filter,
+ end_date_filter=end_date_filter,
+ actor_filter=actor_filter,
+ object_filter=object_filter,
+ event_type_filter=event_type_filter,
+ api_token_filter=api_token_filter,
+ cursor=cursor,
+ page_size=page_size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedEventList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def events_without_preload_content(
+ self,
+ start_date_filter: Annotated[Optional[StrictStr], Field(description="A start date filter for the events.")] = None,
+ end_date_filter: Annotated[Optional[StrictStr], Field(description="An end date filter for the events.")] = None,
+ actor_filter: Annotated[Optional[StrictStr], Field(description="An actor filter for the events. Supply the ID of the actor.")] = None,
+ object_filter: Annotated[Optional[StrictStr], Field(description="An object filter for the events. Supply the ID of the object.")] = None,
+ event_type_filter: Annotated[Optional[StrictStr], Field(description="An event type filter for the events.")] = None,
+ api_token_filter: Annotated[Optional[StrictStr], Field(description="An API filter for the events. Supply the name and preview of the API token.")] = None,
+ 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:
+ """events
+
+ Returns a list of `Event` objects.
+
+ :param start_date_filter: A start date filter for the events.
+ :type start_date_filter: str
+ :param end_date_filter: An end date filter for the events.
+ :type end_date_filter: str
+ :param actor_filter: An actor filter for the events. Supply the ID of the actor.
+ :type actor_filter: str
+ :param object_filter: An object filter for the events. Supply the ID of the object.
+ :type object_filter: str
+ :param event_type_filter: An event type filter for the events.
+ :type event_type_filter: str
+ :param api_token_filter: An API filter for the events. Supply the name and preview of the API token.
+ :type api_token_filter: str
+ :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._events_serialize(
+ start_date_filter=start_date_filter,
+ end_date_filter=end_date_filter,
+ actor_filter=actor_filter,
+ object_filter=object_filter,
+ event_type_filter=event_type_filter,
+ api_token_filter=api_token_filter,
+ cursor=cursor,
+ page_size=page_size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedEventList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.events_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _events_serialize(
+ self,
+ start_date_filter,
+ end_date_filter,
+ actor_filter,
+ object_filter,
+ event_type_filter,
+ api_token_filter,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if start_date_filter is not None:
+
+ _query_params.append(('start_date_filter', start_date_filter))
+
+ if end_date_filter is not None:
+
+ _query_params.append(('end_date_filter', end_date_filter))
+
+ if actor_filter is not None:
+
+ _query_params.append(('actor_filter', actor_filter))
+
+ if object_filter is not None:
+
+ _query_params.append(('object_filter', object_filter))
+
+ if event_type_filter is not None:
+
+ _query_params.append(('event_type_filter', event_type_filter))
+
+ if api_token_filter is not None:
+
+ _query_params.append(('api_token_filter', api_token_filter))
+
+ 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`
+ _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='/events',
+ 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/group_bindings_api.py b/opal/api/group_bindings_api.py
new file mode 100644
index 0000000..3a2e9f4
--- /dev/null
+++ b/opal/api/group_bindings_api.py
@@ -0,0 +1,1366 @@
+# 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.create_group_binding_info import CreateGroupBindingInfo
+from opal.models.group_binding import GroupBinding
+from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList
+from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class GroupBindingsApi:
+ """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 create_group_binding(
+ self,
+ create_group_binding_info: CreateGroupBindingInfo,
+ _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,
+ ) -> GroupBinding:
+ """create_group_binding
+
+ Creates a group binding.
+
+ :param create_group_binding_info: (required)
+ :type create_group_binding_info: CreateGroupBindingInfo
+ :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_group_binding_serialize(
+ create_group_binding_info=create_group_binding_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupBinding",
+ }
+ 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_group_binding_with_http_info(
+ self,
+ create_group_binding_info: CreateGroupBindingInfo,
+ _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[GroupBinding]:
+ """create_group_binding
+
+ Creates a group binding.
+
+ :param create_group_binding_info: (required)
+ :type create_group_binding_info: CreateGroupBindingInfo
+ :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_group_binding_serialize(
+ create_group_binding_info=create_group_binding_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupBinding",
+ }
+ 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_group_binding_without_preload_content(
+ self,
+ create_group_binding_info: CreateGroupBindingInfo,
+ _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_group_binding
+
+ Creates a group binding.
+
+ :param create_group_binding_info: (required)
+ :type create_group_binding_info: CreateGroupBindingInfo
+ :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_group_binding_serialize(
+ create_group_binding_info=create_group_binding_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupBinding",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_group_binding_serialize(
+ self,
+ create_group_binding_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, str] = {}
+ _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_group_binding_info is not None:
+ _body_params = create_group_binding_info
+
+
+ # set the HTTP header `Accept`
+ _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='/group-bindings',
+ 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_group_binding(
+ self,
+ group_binding_id: Annotated[StrictStr, Field(description="The ID of the group binding.")],
+ _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_group_binding
+
+ Deletes a group binding.
+
+ :param group_binding_id: The ID of the group binding. (required)
+ :type group_binding_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_group_binding_serialize(
+ group_binding_id=group_binding_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_group_binding_with_http_info(
+ self,
+ group_binding_id: Annotated[StrictStr, Field(description="The ID of the group binding.")],
+ _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_group_binding
+
+ Deletes a group binding.
+
+ :param group_binding_id: The ID of the group binding. (required)
+ :type group_binding_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_group_binding_serialize(
+ group_binding_id=group_binding_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_group_binding_without_preload_content(
+ self,
+ group_binding_id: Annotated[StrictStr, Field(description="The ID of the group binding.")],
+ _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_group_binding
+
+ Deletes a group binding.
+
+ :param group_binding_id: The ID of the group binding. (required)
+ :type group_binding_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_group_binding_serialize(
+ group_binding_id=group_binding_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_group_binding_serialize(
+ self,
+ group_binding_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if group_binding_id is not None:
+ _path_params['group_binding_id'] = group_binding_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='/group-bindings/{group_binding_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_group_binding(
+ self,
+ group_binding_id: Annotated[StrictStr, Field(description="The ID of the group binding.")],
+ _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,
+ ) -> GroupBinding:
+ """get_group_binding
+
+ Returns a `GroupBinding` object.
+
+ :param group_binding_id: The ID of the group binding. (required)
+ :type group_binding_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_group_binding_serialize(
+ group_binding_id=group_binding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupBinding",
+ }
+ 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_group_binding_with_http_info(
+ self,
+ group_binding_id: Annotated[StrictStr, Field(description="The ID of the group binding.")],
+ _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[GroupBinding]:
+ """get_group_binding
+
+ Returns a `GroupBinding` object.
+
+ :param group_binding_id: The ID of the group binding. (required)
+ :type group_binding_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_group_binding_serialize(
+ group_binding_id=group_binding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupBinding",
+ }
+ 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_group_binding_without_preload_content(
+ self,
+ group_binding_id: Annotated[StrictStr, Field(description="The ID of the group binding.")],
+ _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_group_binding
+
+ Returns a `GroupBinding` object.
+
+ :param group_binding_id: The ID of the group binding. (required)
+ :type group_binding_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_group_binding_serialize(
+ group_binding_id=group_binding_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupBinding",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_binding_serialize(
+ self,
+ group_binding_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if group_binding_id is not None:
+ _path_params['group_binding_id'] = group_binding_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/group-bindings/{group_binding_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_group_bindings(
+ 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,
+ ) -> PaginatedGroupBindingsList:
+ """get_group_bindings
+
+ Returns a list of `GroupBinding` objects.
+
+ :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_group_bindings_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': "PaginatedGroupBindingsList",
+ }
+ 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_group_bindings_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[PaginatedGroupBindingsList]:
+ """get_group_bindings
+
+ Returns a list of `GroupBinding` objects.
+
+ :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_group_bindings_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': "PaginatedGroupBindingsList",
+ }
+ 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_group_bindings_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_group_bindings
+
+ Returns a list of `GroupBinding` objects.
+
+ :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_group_bindings_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': "PaginatedGroupBindingsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_bindings_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, str] = {}
+ _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`
+ _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='/group-bindings',
+ 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_group_bindings(
+ self,
+ update_group_binding_info_list: Annotated[UpdateGroupBindingInfoList, Field(description="Group bindings 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,
+ ) -> None:
+ """update_group_bindings
+
+ Bulk updates a list of group bindings.
+
+ :param update_group_binding_info_list: Group bindings to be updated (required)
+ :type update_group_binding_info_list: UpdateGroupBindingInfoList
+ :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_group_bindings_serialize(
+ update_group_binding_info_list=update_group_binding_info_list,
+ _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_group_bindings_with_http_info(
+ self,
+ update_group_binding_info_list: Annotated[UpdateGroupBindingInfoList, Field(description="Group bindings 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[None]:
+ """update_group_bindings
+
+ Bulk updates a list of group bindings.
+
+ :param update_group_binding_info_list: Group bindings to be updated (required)
+ :type update_group_binding_info_list: UpdateGroupBindingInfoList
+ :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_group_bindings_serialize(
+ update_group_binding_info_list=update_group_binding_info_list,
+ _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_group_bindings_without_preload_content(
+ self,
+ update_group_binding_info_list: Annotated[UpdateGroupBindingInfoList, Field(description="Group bindings 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:
+ """update_group_bindings
+
+ Bulk updates a list of group bindings.
+
+ :param update_group_binding_info_list: Group bindings to be updated (required)
+ :type update_group_binding_info_list: UpdateGroupBindingInfoList
+ :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_group_bindings_serialize(
+ update_group_binding_info_list=update_group_binding_info_list,
+ _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_group_bindings_serialize(
+ self,
+ update_group_binding_info_list,
+ _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, str] = {}
+ _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 update_group_binding_info_list is not None:
+ _body_params = update_group_binding_info_list
+
+
+
+ # 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='/group-bindings',
+ 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/groups_api.py b/opal/api/groups_api.py
index 5e3fca5..799da46 100644
--- a/opal/api/groups_api.py
+++ b/opal/api/groups_api.py
@@ -1,1274 +1,6141 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ 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
-import re # noqa: F401
-import sys # noqa: F401
-
-from opal.api_client import ApiClient, Endpoint as _Endpoint
-from opal.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from opal.model.group import Group
-from opal.model.group_function_enum import GroupFunctionEnum
-from opal.model.group_type_enum import GroupTypeEnum
-from opal.model.message_channel_id_list import MessageChannelIDList
-from opal.model.message_channel_list import MessageChannelList
-from opal.model.new_admin_id_list import NewAdminIDList
-from opal.model.paginated_groups_list import PaginatedGroupsList
-from opal.model.reviewer_id_list import ReviewerIDList
-from opal.model.tags_list import TagsList
-from opal.model.update_group_info_list import UpdateGroupInfoList
-
-
-class GroupsApi(object):
+from pydantic import Field, StrictStr
+from typing import List, Optional
+from typing_extensions import Annotated
+from opal.models.add_group_resource_request import AddGroupResourceRequest
+from opal.models.add_group_user_request import AddGroupUserRequest
+from opal.models.create_group_info import CreateGroupInfo
+from opal.models.group import Group
+from opal.models.group_resource import GroupResource
+from opal.models.group_resource_list import GroupResourceList
+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.message_channel_id_list import MessageChannelIDList
+from opal.models.message_channel_list import MessageChannelList
+from opal.models.on_call_schedule_id_list import OnCallScheduleIDList
+from opal.models.on_call_schedule_list import OnCallScheduleList
+from opal.models.paginated_groups_list import PaginatedGroupsList
+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.tags_list import TagsList
+from opal.models.update_group_info_list import UpdateGroupInfoList
+from opal.models.update_group_resources_info import UpdateGroupResourcesInfo
+from opal.models.visibility_info import VisibilityInfo
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class GroupsApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.convert_group_endpoint = _Endpoint(
- settings={
- 'response_type': (Group,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups/{group_id}/convert',
- 'operation_id': 'convert_group',
- 'http_method': 'PUT',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'group_id',
- 'group_function',
- 'new_admin_id_list',
- 'owner_team_id',
- ],
- 'required': [
- 'group_id',
- 'group_function',
- 'new_admin_id_list',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'group_id':
- (str,),
- 'group_function':
- (GroupFunctionEnum,),
- 'new_admin_id_list':
- (NewAdminIDList,),
- 'owner_team_id':
- (str,),
- },
- 'attribute_map': {
- 'group_id': 'group_id',
- 'group_function': 'group_function',
- 'owner_team_id': 'owner_team_id',
- },
- 'location_map': {
- 'group_id': 'path',
- 'group_function': 'query',
- 'new_admin_id_list': 'body',
- 'owner_team_id': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
- )
- self.delete_group_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups/{group_id}',
- 'operation_id': 'delete_group',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'group_id',
- ],
- 'required': [
- 'group_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'group_id':
- (str,),
- },
- 'attribute_map': {
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'group_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_group_message_channels_endpoint = _Endpoint(
- settings={
- 'response_type': (MessageChannelList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups/{group_id}/message-channels',
- 'operation_id': 'get_group_message_channels',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'group_id',
- ],
- 'required': [
- 'group_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'group_id':
- (str,),
- },
- 'attribute_map': {
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'group_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_group_reviewers_endpoint = _Endpoint(
- settings={
- 'response_type': ([str],),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups/{group_id}/reviewers',
- 'operation_id': 'get_group_reviewers',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'group_id',
- ],
- 'required': [
- 'group_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'group_id':
- (str,),
- },
- 'attribute_map': {
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'group_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_group_tags_endpoint = _Endpoint(
- settings={
- 'response_type': (TagsList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups/{group_id}/tags',
- 'operation_id': 'get_group_tags',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'group_id',
- ],
- 'required': [
- 'group_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'group_id':
- (str,),
- },
- 'attribute_map': {
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'group_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_groups_endpoint = _Endpoint(
- settings={
- 'response_type': (PaginatedGroupsList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups',
- 'operation_id': 'get_groups',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'cursor',
- 'page_size',
- 'group_function_filter',
- 'group_type_filter',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- 'page_size',
- ]
- },
- root_map={
- 'validations': {
- ('page_size',): {
-
- 'inclusive_maximum': 1000,
- },
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'cursor':
- (str,),
- 'page_size':
- (int,),
- 'group_function_filter':
- (GroupFunctionEnum,),
- 'group_type_filter':
- (GroupTypeEnum,),
- },
- 'attribute_map': {
- 'cursor': 'cursor',
- 'page_size': 'page_size',
- 'group_function_filter': 'group_function_filter',
- 'group_type_filter': 'group_type_filter',
- },
- 'location_map': {
- 'cursor': 'query',
- 'page_size': 'query',
- 'group_function_filter': 'query',
- 'group_type_filter': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.set_group_message_channels_endpoint = _Endpoint(
- settings={
- 'response_type': ([str],),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups/{group_id}/message-channels',
- 'operation_id': 'set_group_message_channels',
- 'http_method': 'PUT',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'group_id',
- 'message_channel_id_list',
- ],
- 'required': [
- 'group_id',
- 'message_channel_id_list',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'group_id':
- (str,),
- 'message_channel_id_list':
- (MessageChannelIDList,),
- },
- 'attribute_map': {
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'group_id': 'path',
- 'message_channel_id_list': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
- )
- self.set_group_reviewers_endpoint = _Endpoint(
- settings={
- 'response_type': ([str],),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups/{group_id}/reviewers',
- 'operation_id': 'set_group_reviewers',
- 'http_method': 'PUT',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'group_id',
- 'reviewer_id_list',
- ],
- 'required': [
- 'group_id',
- 'reviewer_id_list',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'group_id':
- (str,),
- 'reviewer_id_list':
- (ReviewerIDList,),
- },
- 'attribute_map': {
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'group_id': 'path',
- 'reviewer_id_list': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
- )
- self.update_groups_endpoint = _Endpoint(
- settings={
- 'response_type': (UpdateGroupInfoList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/groups',
- 'operation_id': 'update_groups',
- 'http_method': 'PUT',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'update_group_info_list',
- ],
- 'required': [
- 'update_group_info_list',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'update_group_info_list':
- (UpdateGroupInfoList,),
- },
- 'attribute_map': {
- },
- 'location_map': {
- 'update_group_info_list': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
- )
-
- def convert_group(
+
+
+ @validate_call
+ def add_group_resource(
self,
- group_id,
- group_function,
- new_admin_id_list,
- **kwargs
- ):
- """convert_group # noqa: E501
-
- Updates a groups function. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.convert_group(group_id, group_function, new_admin_id_list, async_req=True)
- >>> result = thread.get()
-
- Args:
- group_id (str): The ID of the group.
- group_function (GroupFunctionEnum): The group function to convert to.
- new_admin_id_list (NewAdminIDList):
-
- Keyword Args:
- owner_team_id (str): The ID of the owning team of the group. Required when converting from Team to Group.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- Group
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- kwargs['group_function'] = \
- group_function
- kwargs['new_admin_id_list'] = \
- new_admin_id_list
- return self.convert_group_endpoint.call_with_http_info(**kwargs)
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_group_resource_request: Optional[AddGroupResourceRequest] = 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,
+ ) -> GroupResource:
+ """add_group_resource
- def delete_group(
+ Adds a resource to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_group_resource_request:
+ :type add_group_resource_request: AddGroupResourceRequest
+ :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_group_resource_serialize(
+ group_id=group_id,
+ resource_id=resource_id,
+ access_level_remote_id=access_level_remote_id,
+ add_group_resource_request=add_group_resource_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupResource",
+ }
+ 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_group_resource_with_http_info(
self,
- group_id,
- **kwargs
- ):
- """delete_group # noqa: E501
-
- Deletes a group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_group(group_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- group_id (str): The ID of the group.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- return self.delete_group_endpoint.call_with_http_info(**kwargs)
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_group_resource_request: Optional[AddGroupResourceRequest] = 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[GroupResource]:
+ """add_group_resource
- def get_group_message_channels(
+ Adds a resource to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_group_resource_request:
+ :type add_group_resource_request: AddGroupResourceRequest
+ :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_group_resource_serialize(
+ group_id=group_id,
+ resource_id=resource_id,
+ access_level_remote_id=access_level_remote_id,
+ add_group_resource_request=add_group_resource_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupResource",
+ }
+ 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_group_resource_without_preload_content(
self,
- group_id,
- **kwargs
- ):
- """get_group_message_channels # noqa: E501
-
- Gets the list of message channels attached to a group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_group_message_channels(group_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- group_id (str): The ID of the group.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- MessageChannelList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- return self.get_group_message_channels_endpoint.call_with_http_info(**kwargs)
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_group_resource_request: Optional[AddGroupResourceRequest] = 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_group_resource
- def get_group_reviewers(
+ Adds a resource to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_group_resource_request:
+ :type add_group_resource_request: AddGroupResourceRequest
+ :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_group_resource_serialize(
+ group_id=group_id,
+ resource_id=resource_id,
+ access_level_remote_id=access_level_remote_id,
+ add_group_resource_request=add_group_resource_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupResource",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_group_resource_serialize(
self,
group_id,
- **kwargs
- ):
- """get_group_reviewers # noqa: E501
-
- Gets the list of team/user IDs of the reviewers for a group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_group_reviewers(group_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- group_id (str): The ID of the group.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [str]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- return self.get_group_reviewers_endpoint.call_with_http_info(**kwargs)
+ resource_id,
+ access_level_remote_id,
+ add_group_resource_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
- def get_group_tags(
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if group_id is not None:
+ _path_params['group_id'] = group_id
+ if resource_id is not None:
+ _path_params['resource_id'] = resource_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
+ if add_group_resource_request is not None:
+ _body_params = add_group_resource_request
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/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 add_group_user(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to add.")],
+ duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None,
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_group_user_request: Optional[AddGroupUserRequest] = 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,
+ ) -> GroupUser:
+ """add_group_user
+
+ Adds a user to this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param user_id: The ID of the user to add. (required)
+ :type user_id: str
+ :param duration_minutes: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.
+ :type duration_minutes: int
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_group_user_request:
+ :type add_group_user_request: AddGroupUserRequest
+ :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_group_user_serialize(
+ group_id=group_id,
+ user_id=user_id,
+ duration_minutes=duration_minutes,
+ access_level_remote_id=access_level_remote_id,
+ add_group_user_request=add_group_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupUser",
+ }
+ 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_group_user_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to add.")],
+ duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None,
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_group_user_request: Optional[AddGroupUserRequest] = 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[GroupUser]:
+ """add_group_user
+
+ Adds a user to this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param user_id: The ID of the user to add. (required)
+ :type user_id: str
+ :param duration_minutes: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.
+ :type duration_minutes: int
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_group_user_request:
+ :type add_group_user_request: AddGroupUserRequest
+ :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_group_user_serialize(
+ group_id=group_id,
+ user_id=user_id,
+ duration_minutes=duration_minutes,
+ access_level_remote_id=access_level_remote_id,
+ add_group_user_request=add_group_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupUser",
+ }
+ 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_group_user_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to add.")],
+ duration_minutes: Annotated[Optional[Annotated[int, Field(le=525960, strict=True)]], Field(description="The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.")] = None,
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_group_user_request: Optional[AddGroupUserRequest] = 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_group_user
+
+ Adds a user to this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param user_id: The ID of the user to add. (required)
+ :type user_id: str
+ :param duration_minutes: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite.
+ :type duration_minutes: int
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_group_user_request:
+ :type add_group_user_request: AddGroupUserRequest
+ :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_group_user_serialize(
+ group_id=group_id,
+ user_id=user_id,
+ duration_minutes=duration_minutes,
+ access_level_remote_id=access_level_remote_id,
+ add_group_user_request=add_group_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GroupUser",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_group_user_serialize(
self,
group_id,
- **kwargs
- ):
- """get_group_tags # noqa: E501
-
- Returns all tags applied to the group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_group_tags(group_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- group_id (str): The ID of the group whose tags to return.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- TagsList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- return self.get_group_tags_endpoint.call_with_http_info(**kwargs)
+ user_id,
+ duration_minutes,
+ access_level_remote_id,
+ add_group_user_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
- def get_groups(
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if group_id is not None:
+ _path_params['group_id'] = group_id
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ if duration_minutes is not None:
+
+ _query_params.append(('duration_minutes', duration_minutes))
+
+ 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
+ if add_group_user_request is not None:
+ _body_params = add_group_user_request
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/users/{user_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 create_group(
self,
- **kwargs
- ):
- """get_groups # noqa: E501
-
- Returns a list of groups for your organization. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_groups(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- cursor (str): The pagination cursor value.. [optional]
- page_size (int): Number of results to return per page. Default is 200.. [optional]
- group_function_filter (GroupFunctionEnum): The group function to filter by.. [optional]
- group_type_filter (GroupTypeEnum): The group type to filter by.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PaginatedGroupsList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.get_groups_endpoint.call_with_http_info(**kwargs)
+ create_group_info: CreateGroupInfo,
+ _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,
+ ) -> Group:
+ """create_group
- def set_group_message_channels(
+ Creates a group. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing groups.
+
+ :param create_group_info: (required)
+ :type create_group_info: CreateGroupInfo
+ :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_group_serialize(
+ create_group_info=create_group_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Group",
+ }
+ 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_group_with_http_info(
+ self,
+ create_group_info: CreateGroupInfo,
+ _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[Group]:
+ """create_group
+
+ Creates a group. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing groups.
+
+ :param create_group_info: (required)
+ :type create_group_info: CreateGroupInfo
+ :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_group_serialize(
+ create_group_info=create_group_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Group",
+ }
+ 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_group_without_preload_content(
+ self,
+ create_group_info: CreateGroupInfo,
+ _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_group
+
+ Creates a group. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing groups.
+
+ :param create_group_info: (required)
+ :type create_group_info: CreateGroupInfo
+ :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_group_serialize(
+ create_group_info=create_group_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Group",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_group_serialize(
+ self,
+ create_group_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, str] = {}
+ _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_group_info is not None:
+ _body_params = create_group_info
+
+
+ # set the HTTP header `Accept`
+ _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='/groups',
+ 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_group(
+ self,
+ 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_group
+
+ Deletes a group.
+
+ :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_group_serialize(
+ 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_group_with_http_info(
+ self,
+ 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_group
+
+ Deletes a group.
+
+ :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_group_serialize(
+ 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_group_without_preload_content(
+ self,
+ 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_group
+
+ Deletes a group.
+
+ :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_group_serialize(
+ 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_group_serialize(
self,
group_id,
- message_channel_id_list,
- **kwargs
- ):
- """set_group_message_channels # noqa: E501
-
- Sets the list of message channels attached to a group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.set_group_message_channels(group_id, message_channel_id_list, async_req=True)
- >>> result = thread.get()
-
- Args:
- group_id (str): The ID of the group.
- message_channel_id_list (MessageChannelIDList):
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [str]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- kwargs['message_channel_id_list'] = \
- message_channel_id_list
- return self.set_group_message_channels_endpoint.call_with_http_info(**kwargs)
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
- def set_group_reviewers(
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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='/groups/{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 delete_group_user(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this 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_group_user
+
+ Removes a user's access from this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param user_id: The ID of a user to remove from this group. (required)
+ :type user_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_group_user_serialize(
+ group_id=group_id,
+ user_id=user_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_group_user_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this 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_group_user
+
+ Removes a user's access from this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param user_id: The ID of a user to remove from this group. (required)
+ :type user_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_group_user_serialize(
+ group_id=group_id,
+ user_id=user_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_group_user_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of a user to remove from this 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_group_user
+
+ Removes a user's access from this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param user_id: The ID of a user to remove from this group. (required)
+ :type user_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_group_user_serialize(
+ group_id=group_id,
+ user_id=user_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_group_user_serialize(
self,
group_id,
- reviewer_id_list,
- **kwargs
- ):
- """set_group_reviewers # noqa: E501
-
- Sets the list of reviewers for a group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.set_group_reviewers(group_id, reviewer_id_list, async_req=True)
- >>> result = thread.get()
-
- Args:
- group_id (str): The ID of the group.
- reviewer_id_list (ReviewerIDList):
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [str]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['group_id'] = \
- group_id
- kwargs['reviewer_id_list'] = \
- reviewer_id_list
- return self.set_group_reviewers_endpoint.call_with_http_info(**kwargs)
+ user_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
- def update_groups(
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if group_id is not None:
+ _path_params['group_id'] = group_id
+ if user_id is not None:
+ _path_params['user_id'] = user_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='/groups/{group_id}/users/{user_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_group(
self,
- update_group_info_list,
- **kwargs
- ):
- """update_groups # noqa: E501
-
- Bulk updates a list of groups. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.update_groups(update_group_info_list, async_req=True)
- >>> result = thread.get()
-
- Args:
- update_group_info_list (UpdateGroupInfoList): Groups to be updated
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- UpdateGroupInfoList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['update_group_info_list'] = \
- update_group_info_list
- return self.update_groups_endpoint.call_with_http_info(**kwargs)
+ 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,
+ ) -> Group:
+ """get_group
+
+ Returns a `Group` object.
+
+ :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._get_group_serialize(
+ 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': "Group",
+ }
+ 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_group_with_http_info(
+ self,
+ 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[Group]:
+ """get_group
+
+ Returns a `Group` object.
+
+ :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._get_group_serialize(
+ 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': "Group",
+ }
+ 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_group_without_preload_content(
+ self,
+ 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:
+ """get_group
+
+ Returns a `Group` object.
+
+ :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._get_group_serialize(
+ 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': "Group",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{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_group_message_channels(
+ self,
+ 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,
+ ) -> MessageChannelList:
+ """get_group_message_channels
+
+ Gets the list of audit and reviewer message channels attached to a group.
+
+ :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._get_group_message_channels_serialize(
+ 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': "MessageChannelList",
+ }
+ 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_group_message_channels_with_http_info(
+ self,
+ 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[MessageChannelList]:
+ """get_group_message_channels
+
+ Gets the list of audit and reviewer message channels attached to a group.
+
+ :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._get_group_message_channels_serialize(
+ 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': "MessageChannelList",
+ }
+ 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_group_message_channels_without_preload_content(
+ self,
+ 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:
+ """get_group_message_channels
+
+ Gets the list of audit and reviewer message channels attached to a group.
+
+ :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._get_group_message_channels_serialize(
+ 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': "MessageChannelList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_message_channels_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/message-channels',
+ 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_group_on_call_schedules(
+ self,
+ 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,
+ ) -> OnCallScheduleList:
+ """get_group_on_call_schedules
+
+ Gets the list of on call schedules attached to a group.
+
+ :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._get_group_on_call_schedules_serialize(
+ 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': "OnCallScheduleList",
+ }
+ 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_group_on_call_schedules_with_http_info(
+ self,
+ 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[OnCallScheduleList]:
+ """get_group_on_call_schedules
+
+ Gets the list of on call schedules attached to a group.
+
+ :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._get_group_on_call_schedules_serialize(
+ 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': "OnCallScheduleList",
+ }
+ 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_group_on_call_schedules_without_preload_content(
+ self,
+ 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:
+ """get_group_on_call_schedules
+
+ Gets the list of on call schedules attached to a group.
+
+ :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._get_group_on_call_schedules_serialize(
+ 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': "OnCallScheduleList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_on_call_schedules_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/on-call-schedules',
+ 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_group_resources(
+ self,
+ 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,
+ ) -> GroupResourceList:
+ """get_group_resources
+
+ Gets the list of resources that the group gives access to.
+
+ :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._get_group_resources_serialize(
+ 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': "GroupResourceList",
+ }
+ 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_group_resources_with_http_info(
+ self,
+ 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[GroupResourceList]:
+ """get_group_resources
+
+ Gets the list of resources that the group gives access to.
+
+ :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._get_group_resources_serialize(
+ 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': "GroupResourceList",
+ }
+ 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_group_resources_without_preload_content(
+ self,
+ 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:
+ """get_group_resources
+
+ Gets the list of resources that the group gives access to.
+
+ :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._get_group_resources_serialize(
+ 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': "GroupResourceList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_resources_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/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 get_group_reviewer_stages(
+ self,
+ 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,
+ ) -> List[ReviewerStage]:
+ """get_group_reviewer_stages
+
+ Gets the list of reviewer stages for a group.
+
+ :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._get_group_reviewer_stages_serialize(
+ 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': "List[ReviewerStage]",
+ }
+ 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_group_reviewer_stages_with_http_info(
+ self,
+ 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[List[ReviewerStage]]:
+ """get_group_reviewer_stages
+
+ Gets the list of reviewer stages for a group.
+
+ :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._get_group_reviewer_stages_serialize(
+ 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': "List[ReviewerStage]",
+ }
+ 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_group_reviewer_stages_without_preload_content(
+ self,
+ 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:
+ """get_group_reviewer_stages
+
+ Gets the list of reviewer stages for a group.
+
+ :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._get_group_reviewer_stages_serialize(
+ 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': "List[ReviewerStage]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_reviewer_stages_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/reviewer-stages',
+ 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_group_reviewers(
+ self,
+ 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,
+ ) -> List[str]:
+ """(Deprecated) get_group_reviewers
+
+ Gets the list of owner IDs of the reviewers for a group.
+
+ :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
+ warnings.warn("GET /groups/{group_id}/reviewers is deprecated.", DeprecationWarning)
+
+ _param = self._get_group_reviewers_serialize(
+ 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': "List[str]",
+ }
+ 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_group_reviewers_with_http_info(
+ self,
+ 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[List[str]]:
+ """(Deprecated) get_group_reviewers
+
+ Gets the list of owner IDs of the reviewers for a group.
+
+ :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
+ warnings.warn("GET /groups/{group_id}/reviewers is deprecated.", DeprecationWarning)
+
+ _param = self._get_group_reviewers_serialize(
+ 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': "List[str]",
+ }
+ 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_group_reviewers_without_preload_content(
+ self,
+ 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:
+ """(Deprecated) get_group_reviewers
+
+ Gets the list of owner IDs of the reviewers for a group.
+
+ :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
+ warnings.warn("GET /groups/{group_id}/reviewers is deprecated.", DeprecationWarning)
+
+ _param = self._get_group_reviewers_serialize(
+ 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': "List[str]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_reviewers_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/reviewers',
+ 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_group_tags(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group whose tags to return.")],
+ _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,
+ ) -> TagsList:
+ """get_group_tags
+
+ Returns all tags applied to the group.
+
+ :param group_id: The ID of the group whose tags to return. (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._get_group_tags_serialize(
+ 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': "TagsList",
+ }
+ 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_group_tags_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group whose tags to return.")],
+ _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[TagsList]:
+ """get_group_tags
+
+ Returns all tags applied to the group.
+
+ :param group_id: The ID of the group whose tags to return. (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._get_group_tags_serialize(
+ 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': "TagsList",
+ }
+ 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_group_tags_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group whose tags to return.")],
+ _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_group_tags
+
+ Returns all tags applied to the group.
+
+ :param group_id: The ID of the group whose tags to return. (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._get_group_tags_serialize(
+ 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': "TagsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_tags_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/tags',
+ 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_group_users(
+ self,
+ 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,
+ ) -> GroupUserList:
+ """get_group_users
+
+ Gets the list of users for this group.
+
+ :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._get_group_users_serialize(
+ 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': "GroupUserList",
+ }
+ 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_group_users_with_http_info(
+ self,
+ 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[GroupUserList]:
+ """get_group_users
+
+ Gets the list of users for this group.
+
+ :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._get_group_users_serialize(
+ 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': "GroupUserList",
+ }
+ 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_group_users_without_preload_content(
+ self,
+ 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:
+ """get_group_users
+
+ Gets the list of users for this group.
+
+ :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._get_group_users_serialize(
+ 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': "GroupUserList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_users_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/users',
+ 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_group_visibility(
+ self,
+ 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,
+ ) -> VisibilityInfo:
+ """get_group_visibility
+
+ Gets the visibility of this group.
+
+ :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._get_group_visibility_serialize(
+ 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': "VisibilityInfo",
+ }
+ 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_group_visibility_with_http_info(
+ self,
+ 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[VisibilityInfo]:
+ """get_group_visibility
+
+ Gets the visibility of this group.
+
+ :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._get_group_visibility_serialize(
+ 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': "VisibilityInfo",
+ }
+ 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_group_visibility_without_preload_content(
+ self,
+ 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:
+ """get_group_visibility
+
+ Gets the visibility of this group.
+
+ :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._get_group_visibility_serialize(
+ 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': "VisibilityInfo",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_group_visibility_serialize(
+ self,
+ 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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+
+
+ # set the HTTP header `Accept`
+ _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='/groups/{group_id}/visibility',
+ 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_groups(
+ 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,
+ group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by.")] = None,
+ group_ids: Annotated[Optional[List[StrictStr]], Field(description="The group ids to filter by.")] = None,
+ group_name: Annotated[Optional[StrictStr], Field(description="Group name.")] = 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,
+ ) -> PaginatedGroupsList:
+ """get_groups
+
+ Returns a list of groups 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 group_type_filter: The group type to filter by.
+ :type group_type_filter: GroupTypeEnum
+ :param group_ids: The group ids to filter by.
+ :type group_ids: List[str]
+ :param group_name: Group name.
+ :type group_name: 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_groups_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ group_type_filter=group_type_filter,
+ group_ids=group_ids,
+ group_name=group_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedGroupsList",
+ }
+ 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_groups_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,
+ group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by.")] = None,
+ group_ids: Annotated[Optional[List[StrictStr]], Field(description="The group ids to filter by.")] = None,
+ group_name: Annotated[Optional[StrictStr], Field(description="Group name.")] = 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[PaginatedGroupsList]:
+ """get_groups
+
+ Returns a list of groups 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 group_type_filter: The group type to filter by.
+ :type group_type_filter: GroupTypeEnum
+ :param group_ids: The group ids to filter by.
+ :type group_ids: List[str]
+ :param group_name: Group name.
+ :type group_name: 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_groups_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ group_type_filter=group_type_filter,
+ group_ids=group_ids,
+ group_name=group_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedGroupsList",
+ }
+ 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_groups_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,
+ group_type_filter: Annotated[Optional[GroupTypeEnum], Field(description="The group type to filter by.")] = None,
+ group_ids: Annotated[Optional[List[StrictStr]], Field(description="The group ids to filter by.")] = None,
+ group_name: Annotated[Optional[StrictStr], Field(description="Group name.")] = 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_groups
+
+ Returns a list of groups 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 group_type_filter: The group type to filter by.
+ :type group_type_filter: GroupTypeEnum
+ :param group_ids: The group ids to filter by.
+ :type group_ids: List[str]
+ :param group_name: Group name.
+ :type group_name: 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_groups_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ group_type_filter=group_type_filter,
+ group_ids=group_ids,
+ group_name=group_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedGroupsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_groups_serialize(
+ self,
+ cursor,
+ page_size,
+ group_type_filter,
+ group_ids,
+ group_name,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'group_ids': 'csv',
+ }
+
+ _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, str] = {}
+ _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))
+
+ if group_type_filter is not None:
+
+ _query_params.append(('group_type_filter', group_type_filter.value))
+
+ if group_ids is not None:
+
+ _query_params.append(('group_ids', group_ids))
+
+ if group_name is not None:
+
+ _query_params.append(('group_name', group_name))
+
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/groups',
+ 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 set_group_message_channels(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ message_channel_id_list: MessageChannelIDList,
+ _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,
+ ) -> List[str]:
+ """set_group_message_channels
+
+ Sets the list of audit message channels attached to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param message_channel_id_list: (required)
+ :type message_channel_id_list: MessageChannelIDList
+ :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._set_group_message_channels_serialize(
+ group_id=group_id,
+ message_channel_id_list=message_channel_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_group_message_channels_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ message_channel_id_list: MessageChannelIDList,
+ _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[List[str]]:
+ """set_group_message_channels
+
+ Sets the list of audit message channels attached to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param message_channel_id_list: (required)
+ :type message_channel_id_list: MessageChannelIDList
+ :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._set_group_message_channels_serialize(
+ group_id=group_id,
+ message_channel_id_list=message_channel_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_group_message_channels_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ message_channel_id_list: MessageChannelIDList,
+ _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:
+ """set_group_message_channels
+
+ Sets the list of audit message channels attached to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param message_channel_id_list: (required)
+ :type message_channel_id_list: MessageChannelIDList
+ :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._set_group_message_channels_serialize(
+ group_id=group_id,
+ message_channel_id_list=message_channel_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_group_message_channels_serialize(
+ self,
+ group_id,
+ message_channel_id_list,
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+ if message_channel_id_list is not None:
+ _body_params = message_channel_id_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/groups/{group_id}/message-channels',
+ 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 set_group_on_call_schedules(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ on_call_schedule_id_list: OnCallScheduleIDList,
+ _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,
+ ) -> List[str]:
+ """set_group_on_call_schedules
+
+ Sets the list of on call schedules attached to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param on_call_schedule_id_list: (required)
+ :type on_call_schedule_id_list: OnCallScheduleIDList
+ :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._set_group_on_call_schedules_serialize(
+ group_id=group_id,
+ on_call_schedule_id_list=on_call_schedule_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_group_on_call_schedules_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ on_call_schedule_id_list: OnCallScheduleIDList,
+ _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[List[str]]:
+ """set_group_on_call_schedules
+
+ Sets the list of on call schedules attached to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param on_call_schedule_id_list: (required)
+ :type on_call_schedule_id_list: OnCallScheduleIDList
+ :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._set_group_on_call_schedules_serialize(
+ group_id=group_id,
+ on_call_schedule_id_list=on_call_schedule_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_group_on_call_schedules_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ on_call_schedule_id_list: OnCallScheduleIDList,
+ _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:
+ """set_group_on_call_schedules
+
+ Sets the list of on call schedules attached to a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param on_call_schedule_id_list: (required)
+ :type on_call_schedule_id_list: OnCallScheduleIDList
+ :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._set_group_on_call_schedules_serialize(
+ group_id=group_id,
+ on_call_schedule_id_list=on_call_schedule_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_group_on_call_schedules_serialize(
+ self,
+ group_id,
+ on_call_schedule_id_list,
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+ if on_call_schedule_id_list is not None:
+ _body_params = on_call_schedule_id_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/groups/{group_id}/on-call-schedules',
+ 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 set_group_resources(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ update_group_resources_info: UpdateGroupResourcesInfo,
+ _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:
+ """set_group_resources
+
+ Sets the list of resources that the group gives access to.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param update_group_resources_info: (required)
+ :type update_group_resources_info: UpdateGroupResourcesInfo
+ :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._set_group_resources_serialize(
+ group_id=group_id,
+ update_group_resources_info=update_group_resources_info,
+ _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 set_group_resources_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ update_group_resources_info: UpdateGroupResourcesInfo,
+ _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]:
+ """set_group_resources
+
+ Sets the list of resources that the group gives access to.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param update_group_resources_info: (required)
+ :type update_group_resources_info: UpdateGroupResourcesInfo
+ :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._set_group_resources_serialize(
+ group_id=group_id,
+ update_group_resources_info=update_group_resources_info,
+ _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 set_group_resources_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ update_group_resources_info: UpdateGroupResourcesInfo,
+ _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:
+ """set_group_resources
+
+ Sets the list of resources that the group gives access to.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param update_group_resources_info: (required)
+ :type update_group_resources_info: UpdateGroupResourcesInfo
+ :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._set_group_resources_serialize(
+ group_id=group_id,
+ update_group_resources_info=update_group_resources_info,
+ _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 _set_group_resources_serialize(
+ self,
+ group_id,
+ update_group_resources_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+ if update_group_resources_info is not None:
+ _body_params = update_group_resources_info
+
+
+
+ # 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='/groups/{group_id}/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 set_group_reviewer_stages(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ reviewer_stage_list: ReviewerStageList,
+ _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,
+ ) -> List[ReviewerStage]:
+ """set_group_reviewer_stages
+
+ Sets the list of reviewer stages for a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param reviewer_stage_list: (required)
+ :type reviewer_stage_list: ReviewerStageList
+ :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._set_group_reviewer_stages_serialize(
+ group_id=group_id,
+ reviewer_stage_list=reviewer_stage_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ReviewerStage]",
+ }
+ 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 set_group_reviewer_stages_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ reviewer_stage_list: ReviewerStageList,
+ _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[List[ReviewerStage]]:
+ """set_group_reviewer_stages
+
+ Sets the list of reviewer stages for a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param reviewer_stage_list: (required)
+ :type reviewer_stage_list: ReviewerStageList
+ :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._set_group_reviewer_stages_serialize(
+ group_id=group_id,
+ reviewer_stage_list=reviewer_stage_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ReviewerStage]",
+ }
+ 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 set_group_reviewer_stages_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ reviewer_stage_list: ReviewerStageList,
+ _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:
+ """set_group_reviewer_stages
+
+ Sets the list of reviewer stages for a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param reviewer_stage_list: (required)
+ :type reviewer_stage_list: ReviewerStageList
+ :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._set_group_reviewer_stages_serialize(
+ group_id=group_id,
+ reviewer_stage_list=reviewer_stage_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ReviewerStage]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_group_reviewer_stages_serialize(
+ self,
+ group_id,
+ reviewer_stage_list,
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+ if reviewer_stage_list is not None:
+ _body_params = reviewer_stage_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/groups/{group_id}/reviewer-stages',
+ 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 set_group_reviewers(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ reviewer_id_list: ReviewerIDList,
+ _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,
+ ) -> List[str]:
+ """(Deprecated) set_group_reviewers
+
+ Sets the list of reviewers for a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param reviewer_id_list: (required)
+ :type reviewer_id_list: ReviewerIDList
+ :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
+ warnings.warn("PUT /groups/{group_id}/reviewers is deprecated.", DeprecationWarning)
+
+ _param = self._set_group_reviewers_serialize(
+ group_id=group_id,
+ reviewer_id_list=reviewer_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_group_reviewers_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ reviewer_id_list: ReviewerIDList,
+ _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[List[str]]:
+ """(Deprecated) set_group_reviewers
+
+ Sets the list of reviewers for a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param reviewer_id_list: (required)
+ :type reviewer_id_list: ReviewerIDList
+ :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
+ warnings.warn("PUT /groups/{group_id}/reviewers is deprecated.", DeprecationWarning)
+
+ _param = self._set_group_reviewers_serialize(
+ group_id=group_id,
+ reviewer_id_list=reviewer_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_group_reviewers_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ reviewer_id_list: ReviewerIDList,
+ _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:
+ """(Deprecated) set_group_reviewers
+
+ Sets the list of reviewers for a group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param reviewer_id_list: (required)
+ :type reviewer_id_list: ReviewerIDList
+ :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
+ warnings.warn("PUT /groups/{group_id}/reviewers is deprecated.", DeprecationWarning)
+
+ _param = self._set_group_reviewers_serialize(
+ group_id=group_id,
+ reviewer_id_list=reviewer_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_group_reviewers_serialize(
+ self,
+ group_id,
+ reviewer_id_list,
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+ if reviewer_id_list is not None:
+ _body_params = reviewer_id_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/groups/{group_id}/reviewers',
+ 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 set_group_visibility(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ visibility_info: VisibilityInfo,
+ _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,
+ ) -> VisibilityInfo:
+ """set_group_visibility
+
+ Sets the visibility of this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param visibility_info: (required)
+ :type visibility_info: VisibilityInfo
+ :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._set_group_visibility_serialize(
+ group_id=group_id,
+ visibility_info=visibility_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VisibilityInfo",
+ }
+ 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 set_group_visibility_with_http_info(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ visibility_info: VisibilityInfo,
+ _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[VisibilityInfo]:
+ """set_group_visibility
+
+ Sets the visibility of this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param visibility_info: (required)
+ :type visibility_info: VisibilityInfo
+ :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._set_group_visibility_serialize(
+ group_id=group_id,
+ visibility_info=visibility_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VisibilityInfo",
+ }
+ 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 set_group_visibility_without_preload_content(
+ self,
+ group_id: Annotated[StrictStr, Field(description="The ID of the group.")],
+ visibility_info: VisibilityInfo,
+ _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:
+ """set_group_visibility
+
+ Sets the visibility of this group.
+
+ :param group_id: The ID of the group. (required)
+ :type group_id: str
+ :param visibility_info: (required)
+ :type visibility_info: VisibilityInfo
+ :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._set_group_visibility_serialize(
+ group_id=group_id,
+ visibility_info=visibility_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VisibilityInfo",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_group_visibility_serialize(
+ self,
+ group_id,
+ visibility_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ 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
+ if visibility_info is not None:
+ _body_params = visibility_info
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/groups/{group_id}/visibility',
+ 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_groups(
+ self,
+ update_group_info_list: Annotated[UpdateGroupInfoList, Field(description="Groups 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,
+ ) -> UpdateGroupInfoList:
+ """update_groups
+
+ Bulk updates a list of groups.
+
+ :param update_group_info_list: Groups to be updated (required)
+ :type update_group_info_list: UpdateGroupInfoList
+ :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_groups_serialize(
+ update_group_info_list=update_group_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateGroupInfoList",
+ }
+ 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_groups_with_http_info(
+ self,
+ update_group_info_list: Annotated[UpdateGroupInfoList, Field(description="Groups 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[UpdateGroupInfoList]:
+ """update_groups
+
+ Bulk updates a list of groups.
+
+ :param update_group_info_list: Groups to be updated (required)
+ :type update_group_info_list: UpdateGroupInfoList
+ :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_groups_serialize(
+ update_group_info_list=update_group_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateGroupInfoList",
+ }
+ 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_groups_without_preload_content(
+ self,
+ update_group_info_list: Annotated[UpdateGroupInfoList, Field(description="Groups 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:
+ """update_groups
+
+ Bulk updates a list of groups.
+
+ :param update_group_info_list: Groups to be updated (required)
+ :type update_group_info_list: UpdateGroupInfoList
+ :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_groups_serialize(
+ update_group_info_list=update_group_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateGroupInfoList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_groups_serialize(
+ self,
+ update_group_info_list,
+ _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, str] = {}
+ _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 update_group_info_list is not None:
+ _body_params = update_group_info_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/groups',
+ 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
new file mode 100644
index 0000000..24d615c
--- /dev/null
+++ b/opal/api/message_channels_api.py
@@ -0,0 +1,813 @@
+# 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.create_message_channel_info import CreateMessageChannelInfo
+from opal.models.message_channel import MessageChannel
+from opal.models.message_channel_list import MessageChannelList
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class MessageChannelsApi:
+ """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 create_message_channel(
+ self,
+ create_message_channel_info: Annotated[CreateMessageChannelInfo, Field(description="The `MessageChannel` object to be created.")],
+ _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,
+ ) -> MessageChannel:
+ """create_message_channel
+
+ Creates a `MessageChannel` objects.
+
+ :param create_message_channel_info: The `MessageChannel` object to be created. (required)
+ :type create_message_channel_info: CreateMessageChannelInfo
+ :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_message_channel_serialize(
+ create_message_channel_info=create_message_channel_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannel",
+ }
+ 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_message_channel_with_http_info(
+ self,
+ create_message_channel_info: Annotated[CreateMessageChannelInfo, Field(description="The `MessageChannel` object to be created.")],
+ _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[MessageChannel]:
+ """create_message_channel
+
+ Creates a `MessageChannel` objects.
+
+ :param create_message_channel_info: The `MessageChannel` object to be created. (required)
+ :type create_message_channel_info: CreateMessageChannelInfo
+ :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_message_channel_serialize(
+ create_message_channel_info=create_message_channel_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannel",
+ }
+ 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_message_channel_without_preload_content(
+ self,
+ create_message_channel_info: Annotated[CreateMessageChannelInfo, Field(description="The `MessageChannel` object to be created.")],
+ _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_message_channel
+
+ Creates a `MessageChannel` objects.
+
+ :param create_message_channel_info: The `MessageChannel` object to be created. (required)
+ :type create_message_channel_info: CreateMessageChannelInfo
+ :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_message_channel_serialize(
+ create_message_channel_info=create_message_channel_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannel",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_message_channel_serialize(
+ self,
+ create_message_channel_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, str] = {}
+ _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_message_channel_info is not None:
+ _body_params = create_message_channel_info
+
+
+ # set the HTTP header `Accept`
+ _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='/message-channels',
+ 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_message_channel(
+ self,
+ message_channel_id: Annotated[StrictStr, Field(description="The ID of the message_channel.")],
+ _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,
+ ) -> MessageChannel:
+ """get_message_channel
+
+ Gets a `MessageChannel` object.
+
+ :param message_channel_id: The ID of the message_channel. (required)
+ :type message_channel_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_message_channel_serialize(
+ message_channel_id=message_channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannel",
+ }
+ 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_message_channel_with_http_info(
+ self,
+ message_channel_id: Annotated[StrictStr, Field(description="The ID of the message_channel.")],
+ _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[MessageChannel]:
+ """get_message_channel
+
+ Gets a `MessageChannel` object.
+
+ :param message_channel_id: The ID of the message_channel. (required)
+ :type message_channel_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_message_channel_serialize(
+ message_channel_id=message_channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannel",
+ }
+ 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_message_channel_without_preload_content(
+ self,
+ message_channel_id: Annotated[StrictStr, Field(description="The ID of the message_channel.")],
+ _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_message_channel
+
+ Gets a `MessageChannel` object.
+
+ :param message_channel_id: The ID of the message_channel. (required)
+ :type message_channel_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_message_channel_serialize(
+ message_channel_id=message_channel_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannel",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_message_channel_serialize(
+ self,
+ message_channel_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if message_channel_id is not None:
+ _path_params['message_channel_id'] = message_channel_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/message-channels/{message_channel_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_message_channels(
+ self,
+ _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,
+ ) -> MessageChannelList:
+ """get_message_channels
+
+ Returns a list of `MessageChannel` objects.
+
+ :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_message_channels_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannelList",
+ }
+ 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_message_channels_with_http_info(
+ self,
+ _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[MessageChannelList]:
+ """get_message_channels
+
+ Returns a list of `MessageChannel` objects.
+
+ :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_message_channels_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannelList",
+ }
+ 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_message_channels_without_preload_content(
+ self,
+ _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_message_channels
+
+ Returns a list of `MessageChannel` objects.
+
+ :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_message_channels_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MessageChannelList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_message_channels_serialize(
+ self,
+ _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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/message-channels',
+ 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
new file mode 100644
index 0000000..cbb6671
--- /dev/null
+++ b/opal/api/on_call_schedules_api.py
@@ -0,0 +1,813 @@
+# 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.create_on_call_schedule_info import CreateOnCallScheduleInfo
+from opal.models.on_call_schedule import OnCallSchedule
+from opal.models.on_call_schedule_list import OnCallScheduleList
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class OnCallSchedulesApi:
+ """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 create_on_call_schedule(
+ self,
+ create_on_call_schedule_info: Annotated[CreateOnCallScheduleInfo, Field(description="The `OnCallSchedule` object to be created.")],
+ _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,
+ ) -> OnCallSchedule:
+ """create_on_call_schedule
+
+ Creates a `OnCallSchedule` objects.
+
+ :param create_on_call_schedule_info: The `OnCallSchedule` object to be created. (required)
+ :type create_on_call_schedule_info: CreateOnCallScheduleInfo
+ :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_on_call_schedule_serialize(
+ create_on_call_schedule_info=create_on_call_schedule_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallSchedule",
+ }
+ 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_on_call_schedule_with_http_info(
+ self,
+ create_on_call_schedule_info: Annotated[CreateOnCallScheduleInfo, Field(description="The `OnCallSchedule` object to be created.")],
+ _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[OnCallSchedule]:
+ """create_on_call_schedule
+
+ Creates a `OnCallSchedule` objects.
+
+ :param create_on_call_schedule_info: The `OnCallSchedule` object to be created. (required)
+ :type create_on_call_schedule_info: CreateOnCallScheduleInfo
+ :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_on_call_schedule_serialize(
+ create_on_call_schedule_info=create_on_call_schedule_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallSchedule",
+ }
+ 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_on_call_schedule_without_preload_content(
+ self,
+ create_on_call_schedule_info: Annotated[CreateOnCallScheduleInfo, Field(description="The `OnCallSchedule` object to be created.")],
+ _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_on_call_schedule
+
+ Creates a `OnCallSchedule` objects.
+
+ :param create_on_call_schedule_info: The `OnCallSchedule` object to be created. (required)
+ :type create_on_call_schedule_info: CreateOnCallScheduleInfo
+ :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_on_call_schedule_serialize(
+ create_on_call_schedule_info=create_on_call_schedule_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallSchedule",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_on_call_schedule_serialize(
+ self,
+ create_on_call_schedule_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, str] = {}
+ _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_on_call_schedule_info is not None:
+ _body_params = create_on_call_schedule_info
+
+
+ # set the HTTP header `Accept`
+ _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='/on-call-schedules',
+ 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_on_call_schedule(
+ self,
+ on_call_schedule_id: Annotated[StrictStr, Field(description="The ID of the on_call_schedule.")],
+ _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,
+ ) -> OnCallSchedule:
+ """get_on_call_schedule
+
+ Gets a `OnCallSchedule` object.
+
+ :param on_call_schedule_id: The ID of the on_call_schedule. (required)
+ :type on_call_schedule_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_on_call_schedule_serialize(
+ on_call_schedule_id=on_call_schedule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallSchedule",
+ }
+ 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_on_call_schedule_with_http_info(
+ self,
+ on_call_schedule_id: Annotated[StrictStr, Field(description="The ID of the on_call_schedule.")],
+ _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[OnCallSchedule]:
+ """get_on_call_schedule
+
+ Gets a `OnCallSchedule` object.
+
+ :param on_call_schedule_id: The ID of the on_call_schedule. (required)
+ :type on_call_schedule_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_on_call_schedule_serialize(
+ on_call_schedule_id=on_call_schedule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallSchedule",
+ }
+ 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_on_call_schedule_without_preload_content(
+ self,
+ on_call_schedule_id: Annotated[StrictStr, Field(description="The ID of the on_call_schedule.")],
+ _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_on_call_schedule
+
+ Gets a `OnCallSchedule` object.
+
+ :param on_call_schedule_id: The ID of the on_call_schedule. (required)
+ :type on_call_schedule_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_on_call_schedule_serialize(
+ on_call_schedule_id=on_call_schedule_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallSchedule",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_on_call_schedule_serialize(
+ self,
+ on_call_schedule_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if on_call_schedule_id is not None:
+ _path_params['on_call_schedule_id'] = on_call_schedule_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/on-call-schedules/{on_call_schedule_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_on_call_schedules(
+ self,
+ _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,
+ ) -> OnCallScheduleList:
+ """get_on_call_schedules
+
+ Returns a list of `OnCallSchedule` objects.
+
+ :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_on_call_schedules_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallScheduleList",
+ }
+ 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_on_call_schedules_with_http_info(
+ self,
+ _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[OnCallScheduleList]:
+ """get_on_call_schedules
+
+ Returns a list of `OnCallSchedule` objects.
+
+ :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_on_call_schedules_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallScheduleList",
+ }
+ 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_on_call_schedules_without_preload_content(
+ self,
+ _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_on_call_schedules
+
+ Returns a list of `OnCallSchedule` objects.
+
+ :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_on_call_schedules_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "OnCallScheduleList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_on_call_schedules_serialize(
+ self,
+ _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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/on-call-schedules',
+ 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/owners_api.py b/opal/api/owners_api.py
new file mode 100644
index 0000000..21fff9a
--- /dev/null
+++ b/opal/api/owners_api.py
@@ -0,0 +1,2193 @@
+# 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.create_owner_info import CreateOwnerInfo
+from opal.models.owner import Owner
+from opal.models.paginated_owners_list import PaginatedOwnersList
+from opal.models.update_owner_info_list import UpdateOwnerInfoList
+from opal.models.user_id_list import UserIDList
+from opal.models.user_list import UserList
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class OwnersApi:
+ """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 create_owner(
+ self,
+ create_owner_info: CreateOwnerInfo,
+ _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,
+ ) -> Owner:
+ """create_owner
+
+ Creates an owner.
+
+ :param create_owner_info: (required)
+ :type create_owner_info: CreateOwnerInfo
+ :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_owner_serialize(
+ create_owner_info=create_owner_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ 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_owner_with_http_info(
+ self,
+ create_owner_info: CreateOwnerInfo,
+ _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[Owner]:
+ """create_owner
+
+ Creates an owner.
+
+ :param create_owner_info: (required)
+ :type create_owner_info: CreateOwnerInfo
+ :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_owner_serialize(
+ create_owner_info=create_owner_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ 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_owner_without_preload_content(
+ self,
+ create_owner_info: CreateOwnerInfo,
+ _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_owner
+
+ Creates an owner.
+
+ :param create_owner_info: (required)
+ :type create_owner_info: CreateOwnerInfo
+ :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_owner_serialize(
+ create_owner_info=create_owner_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_owner_serialize(
+ self,
+ create_owner_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, str] = {}
+ _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_owner_info is not None:
+ _body_params = create_owner_info
+
+
+ # set the HTTP header `Accept`
+ _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='/owners',
+ 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_owner(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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_owner
+
+ Deletes an owner.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_serialize(
+ owner_id=owner_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_owner_with_http_info(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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_owner
+
+ Deletes an owner.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_serialize(
+ owner_id=owner_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_owner_without_preload_content(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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_owner
+
+ Deletes an owner.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_serialize(
+ owner_id=owner_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_owner_serialize(
+ self,
+ owner_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if owner_id is not None:
+ _path_params['owner_id'] = owner_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='/owners/{owner_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_owner(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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,
+ ) -> Owner:
+ """get_owner
+
+ Returns an `Owner` object.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_serialize(
+ owner_id=owner_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ 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_owner_with_http_info(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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[Owner]:
+ """get_owner
+
+ Returns an `Owner` object.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_serialize(
+ owner_id=owner_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ 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_owner_without_preload_content(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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_owner
+
+ Returns an `Owner` object.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_serialize(
+ owner_id=owner_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_owner_serialize(
+ self,
+ owner_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if owner_id is not None:
+ _path_params['owner_id'] = owner_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/owners/{owner_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_owner_from_name(
+ self,
+ owner_name: Annotated[StrictStr, Field(description="The name of the owner.")],
+ _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,
+ ) -> Owner:
+ """get_owner_from_name
+
+ Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead.
+
+ :param owner_name: The name of the owner. (required)
+ :type owner_name: 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_owner_from_name_serialize(
+ owner_name=owner_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ 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_owner_from_name_with_http_info(
+ self,
+ owner_name: Annotated[StrictStr, Field(description="The name of the owner.")],
+ _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[Owner]:
+ """get_owner_from_name
+
+ Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead.
+
+ :param owner_name: The name of the owner. (required)
+ :type owner_name: 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_owner_from_name_serialize(
+ owner_name=owner_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ 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_owner_from_name_without_preload_content(
+ self,
+ owner_name: Annotated[StrictStr, Field(description="The name of the owner.")],
+ _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_owner_from_name
+
+ Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead.
+
+ :param owner_name: The name of the owner. (required)
+ :type owner_name: 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_owner_from_name_serialize(
+ owner_name=owner_name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Owner",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_owner_from_name_serialize(
+ self,
+ owner_name,
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if owner_name is not None:
+ _path_params['owner_name'] = owner_name
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/owners/name/{owner_name}',
+ 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_owner_users(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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,
+ ) -> UserList:
+ """get_owner_users
+
+ Gets the list of users for this owner, in escalation priority order if applicable.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_users_serialize(
+ owner_id=owner_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserList",
+ }
+ 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_owner_users_with_http_info(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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[UserList]:
+ """get_owner_users
+
+ Gets the list of users for this owner, in escalation priority order if applicable.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_users_serialize(
+ owner_id=owner_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserList",
+ }
+ 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_owner_users_without_preload_content(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ _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_owner_users
+
+ Gets the list of users for this owner, in escalation priority order if applicable.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_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_owner_users_serialize(
+ owner_id=owner_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_owner_users_serialize(
+ self,
+ owner_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if owner_id is not None:
+ _path_params['owner_id'] = owner_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/owners/{owner_id}/users',
+ 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_owners(
+ 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,
+ name: Annotated[Optional[StrictStr], Field(description="Owner name to filter by.")] = 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,
+ ) -> PaginatedOwnersList:
+ """get_owners
+
+ Returns a list of `Owner` objects.
+
+ :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 name: Owner name to filter by.
+ :type name: 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_owners_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ name=name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedOwnersList",
+ }
+ 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_owners_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,
+ name: Annotated[Optional[StrictStr], Field(description="Owner name to filter by.")] = 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[PaginatedOwnersList]:
+ """get_owners
+
+ Returns a list of `Owner` objects.
+
+ :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 name: Owner name to filter by.
+ :type name: 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_owners_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ name=name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedOwnersList",
+ }
+ 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_owners_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,
+ name: Annotated[Optional[StrictStr], Field(description="Owner name to filter by.")] = 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_owners
+
+ Returns a list of `Owner` objects.
+
+ :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 name: Owner name to filter by.
+ :type name: 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_owners_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ name=name,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedOwnersList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_owners_serialize(
+ self,
+ cursor,
+ page_size,
+ name,
+ _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, str] = {}
+ _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))
+
+ if name is not None:
+
+ _query_params.append(('name', name))
+
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/owners',
+ 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 set_owner_users(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ user_id_list: UserIDList,
+ _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,
+ ) -> UserList:
+ """set_owner_users
+
+ Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_id: str
+ :param user_id_list: (required)
+ :type user_id_list: UserIDList
+ :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._set_owner_users_serialize(
+ owner_id=owner_id,
+ user_id_list=user_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserList",
+ }
+ 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 set_owner_users_with_http_info(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ user_id_list: UserIDList,
+ _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[UserList]:
+ """set_owner_users
+
+ Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_id: str
+ :param user_id_list: (required)
+ :type user_id_list: UserIDList
+ :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._set_owner_users_serialize(
+ owner_id=owner_id,
+ user_id_list=user_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserList",
+ }
+ 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 set_owner_users_without_preload_content(
+ self,
+ owner_id: Annotated[StrictStr, Field(description="The ID of the owner.")],
+ user_id_list: UserIDList,
+ _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:
+ """set_owner_users
+
+ Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible.
+
+ :param owner_id: The ID of the owner. (required)
+ :type owner_id: str
+ :param user_id_list: (required)
+ :type user_id_list: UserIDList
+ :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._set_owner_users_serialize(
+ owner_id=owner_id,
+ user_id_list=user_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UserList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_owner_users_serialize(
+ self,
+ owner_id,
+ user_id_list,
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if owner_id is not None:
+ _path_params['owner_id'] = owner_id
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if user_id_list is not None:
+ _body_params = user_id_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/owners/{owner_id}/users',
+ 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_owners(
+ self,
+ update_owner_info_list: Annotated[UpdateOwnerInfoList, Field(description="Owners 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,
+ ) -> UpdateOwnerInfoList:
+ """update_owners
+
+ Bulk updates a list of owners.
+
+ :param update_owner_info_list: Owners to be updated (required)
+ :type update_owner_info_list: UpdateOwnerInfoList
+ :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_owners_serialize(
+ update_owner_info_list=update_owner_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateOwnerInfoList",
+ }
+ 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_owners_with_http_info(
+ self,
+ update_owner_info_list: Annotated[UpdateOwnerInfoList, Field(description="Owners 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[UpdateOwnerInfoList]:
+ """update_owners
+
+ Bulk updates a list of owners.
+
+ :param update_owner_info_list: Owners to be updated (required)
+ :type update_owner_info_list: UpdateOwnerInfoList
+ :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_owners_serialize(
+ update_owner_info_list=update_owner_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateOwnerInfoList",
+ }
+ 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_owners_without_preload_content(
+ self,
+ update_owner_info_list: Annotated[UpdateOwnerInfoList, Field(description="Owners 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:
+ """update_owners
+
+ Bulk updates a list of owners.
+
+ :param update_owner_info_list: Owners to be updated (required)
+ :type update_owner_info_list: UpdateOwnerInfoList
+ :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_owners_serialize(
+ update_owner_info_list=update_owner_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateOwnerInfoList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_owners_serialize(
+ self,
+ update_owner_info_list,
+ _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, str] = {}
+ _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 update_owner_info_list is not None:
+ _body_params = update_owner_info_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/owners',
+ 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/requests_api.py b/opal/api/requests_api.py
new file mode 100644
index 0000000..0703f06
--- /dev/null
+++ b/opal/api/requests_api.py
@@ -0,0 +1,334 @@
+# 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, StrictBool, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from opal.models.request_list import RequestList
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class RequestsApi:
+ """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_requests(
+ 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,
+ show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = 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,
+ ) -> RequestList:
+ """get_requests
+
+ Returns a list of requests for your organization that is visible by the admin.
+
+ :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 show_pending_only: Boolean toggle for if it should only show pending requests.
+ :type show_pending_only: bool
+ :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_requests_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ show_pending_only=show_pending_only,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RequestList",
+ }
+ 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_requests_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,
+ show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = 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[RequestList]:
+ """get_requests
+
+ Returns a list of requests for your organization that is visible by the admin.
+
+ :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 show_pending_only: Boolean toggle for if it should only show pending requests.
+ :type show_pending_only: bool
+ :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_requests_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ show_pending_only=show_pending_only,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RequestList",
+ }
+ 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_requests_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,
+ show_pending_only: Annotated[Optional[StrictBool], Field(description="Boolean toggle for if it should only show pending requests.")] = 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_requests
+
+ Returns a list of requests for your organization that is visible by the admin.
+
+ :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 show_pending_only: Boolean toggle for if it should only show pending requests.
+ :type show_pending_only: bool
+ :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_requests_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ show_pending_only=show_pending_only,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RequestList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_requests_serialize(
+ self,
+ cursor,
+ page_size,
+ show_pending_only,
+ _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, str] = {}
+ _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))
+
+ if show_pending_only is not None:
+
+ _query_params.append(('show_pending_only', show_pending_only))
+
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ 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
+ )
+
+
diff --git a/opal/api/resources_api.py b/opal/api/resources_api.py
index 663871e..4dd26dd 100644
--- a/opal/api/resources_api.py
+++ b/opal/api/resources_api.py
@@ -1,1425 +1,5105 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ 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
-import re # noqa: F401
-import sys # noqa: F401
-
-from opal.api_client import ApiClient, Endpoint as _Endpoint
-from opal.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from opal.model.message_channel_id_list import MessageChannelIDList
-from opal.model.message_channel_list import MessageChannelList
-from opal.model.paginated_resource_user_list import PaginatedResourceUserList
-from opal.model.paginated_resources_list import PaginatedResourcesList
-from opal.model.resource_type_enum import ResourceTypeEnum
-from opal.model.resource_user_access_status import ResourceUserAccessStatus
-from opal.model.reviewer_id_list import ReviewerIDList
-from opal.model.tags_list import TagsList
-from opal.model.update_resource_info_list import UpdateResourceInfoList
-
-
-class ResourcesApi(object):
+from pydantic import Field, StrictInt, StrictStr
+from typing import List, Optional
+from typing_extensions import Annotated
+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
+from opal.models.message_channel_list import MessageChannelList
+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_type_enum import ResourceTypeEnum
+from opal.models.resource_user import ResourceUser
+from opal.models.resource_user_access_status import ResourceUserAccessStatus
+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.tags_list import TagsList
+from opal.models.update_resource_info_list import UpdateResourceInfoList
+from opal.models.visibility_info import VisibilityInfo
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class ResourcesApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.delete_resource_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources/{resource_id}',
- 'operation_id': 'delete_resource',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- ],
- 'required': [
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'resource_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_resource_message_channels_endpoint = _Endpoint(
- settings={
- 'response_type': (MessageChannelList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources/{resource_id}/message-channels',
- 'operation_id': 'get_resource_message_channels',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- ],
- 'required': [
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'resource_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_resource_reviewers_endpoint = _Endpoint(
- settings={
- 'response_type': ([str],),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources/{resource_id}/reviewers',
- 'operation_id': 'get_resource_reviewers',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- ],
- 'required': [
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'resource_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_resource_tags_endpoint = _Endpoint(
- settings={
- 'response_type': (TagsList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources/{resource_id}/tags',
- 'operation_id': 'get_resource_tags',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- ],
- 'required': [
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'resource_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_resources_endpoint = _Endpoint(
- settings={
- 'response_type': (PaginatedResourcesList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources',
- 'operation_id': 'get_resources',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'cursor',
- 'page_size',
- 'resource_type_filter',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- 'page_size',
- ]
- },
- root_map={
- 'validations': {
- ('page_size',): {
-
- 'inclusive_maximum': 1000,
- },
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'cursor':
- (str,),
- 'page_size':
- (int,),
- 'resource_type_filter':
- (ResourceTypeEnum,),
- },
- 'attribute_map': {
- 'cursor': 'cursor',
- 'page_size': 'page_size',
- 'resource_type_filter': 'resource_type_filter',
- },
- 'location_map': {
- 'cursor': 'query',
- 'page_size': 'query',
- 'resource_type_filter': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.resource_user_access_status_retrieve_endpoint = _Endpoint(
- settings={
- 'response_type': (ResourceUserAccessStatus,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resource-user-access-status/{resource_id}/{user_id}',
- 'operation_id': 'resource_user_access_status_retrieve',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- 'user_id',
- 'access_level_remote_id',
- 'cursor',
- 'page_size',
- ],
- 'required': [
- 'resource_id',
- 'user_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- 'page_size',
- ]
- },
- root_map={
- 'validations': {
- ('page_size',): {
-
- 'inclusive_maximum': 1000,
- },
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- 'user_id':
- (str,),
- 'access_level_remote_id':
- (str,),
- 'cursor':
- (str,),
- 'page_size':
- (int,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- 'user_id': 'user_id',
- 'access_level_remote_id': 'access_level_remote_id',
- 'cursor': 'cursor',
- 'page_size': 'page_size',
- },
- 'location_map': {
- 'resource_id': 'path',
- 'user_id': 'path',
- 'access_level_remote_id': 'query',
- 'cursor': 'query',
- 'page_size': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.resource_users_endpoint = _Endpoint(
- settings={
- 'response_type': (PaginatedResourceUserList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resource-users',
- 'operation_id': 'resource_users',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- 'access_level_remote_id',
- 'cursor',
- 'page_size',
- ],
- 'required': [
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- 'page_size',
- ]
- },
- root_map={
- 'validations': {
- ('page_size',): {
-
- 'inclusive_maximum': 1000,
- },
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- 'access_level_remote_id':
- (str,),
- 'cursor':
- (str,),
- 'page_size':
- (int,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- 'access_level_remote_id': 'access_level_remote_id',
- 'cursor': 'cursor',
- 'page_size': 'page_size',
- },
- 'location_map': {
- 'resource_id': 'query',
- 'access_level_remote_id': 'query',
- 'cursor': 'query',
- 'page_size': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.set_resource_message_channels_endpoint = _Endpoint(
- settings={
- 'response_type': ([str],),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources/{resource_id}/message-channels',
- 'operation_id': 'set_resource_message_channels',
- 'http_method': 'PUT',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- 'message_channel_id_list',
- ],
- 'required': [
- 'resource_id',
- 'message_channel_id_list',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- 'message_channel_id_list':
- (MessageChannelIDList,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'resource_id': 'path',
- 'message_channel_id_list': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
- )
- self.set_resource_reviewers_endpoint = _Endpoint(
- settings={
- 'response_type': ([str],),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources/{resource_id}/reviewers',
- 'operation_id': 'set_resource_reviewers',
- 'http_method': 'PUT',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- 'reviewer_id_list',
- ],
- 'required': [
- 'resource_id',
- 'reviewer_id_list',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- 'reviewer_id_list':
- (ReviewerIDList,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'resource_id': 'path',
- 'reviewer_id_list': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
- )
- self.update_resources_endpoint = _Endpoint(
- settings={
- 'response_type': (UpdateResourceInfoList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/resources',
- 'operation_id': 'update_resources',
- 'http_method': 'PUT',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'update_resource_info_list',
- ],
- 'required': [
- 'update_resource_info_list',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'update_resource_info_list':
- (UpdateResourceInfoList,),
- },
- 'attribute_map': {
- },
- 'location_map': {
- 'update_resource_info_list': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
+
+
+ @validate_call
+ def add_resource_user(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to add.")],
+ duration_minutes: Annotated[Optional[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.")] = None,
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_resource_user_request: Optional[AddResourceUserRequest] = 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,
+ ) -> ResourceUser:
+ """add_resource_user
+
+ Adds a user to this resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user to add. (required)
+ :type user_id: str
+ :param duration_minutes: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.
+ :type duration_minutes: int
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_resource_user_request:
+ :type add_resource_user_request: AddResourceUserRequest
+ :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_user_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ duration_minutes=duration_minutes,
+ access_level_remote_id=access_level_remote_id,
+ add_resource_user_request=add_resource_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- def delete_resource(
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ResourceUser",
+ }
+ 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_user_with_http_info(
self,
- resource_id,
- **kwargs
- ):
- """delete_resource # noqa: E501
-
- Deletes a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_resource(resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- return self.delete_resource_endpoint.call_with_http_info(**kwargs)
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to add.")],
+ duration_minutes: Annotated[Optional[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.")] = None,
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_resource_user_request: Optional[AddResourceUserRequest] = 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[ResourceUser]:
+ """add_resource_user
- def get_resource_message_channels(
+ Adds a user to this resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user to add. (required)
+ :type user_id: str
+ :param duration_minutes: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.
+ :type duration_minutes: int
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_resource_user_request:
+ :type add_resource_user_request: AddResourceUserRequest
+ :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_user_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ duration_minutes=duration_minutes,
+ access_level_remote_id=access_level_remote_id,
+ add_resource_user_request=add_resource_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ResourceUser",
+ }
+ 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_user_without_preload_content(
self,
- resource_id,
- **kwargs
- ):
- """get_resource_message_channels # noqa: E501
-
- Gets the list of message channels attached to a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_resource_message_channels(resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- MessageChannelList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- return self.get_resource_message_channels_endpoint.call_with_http_info(**kwargs)
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to add.")],
+ duration_minutes: Annotated[Optional[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.")] = None,
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(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.")] = None,
+ add_resource_user_request: Optional[AddResourceUserRequest] = 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_user
- def get_resource_reviewers(
+ Adds a user to this resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user to add. (required)
+ :type user_id: str
+ :param duration_minutes: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.
+ :type duration_minutes: int
+ :param access_level_remote_id: 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.
+ :type access_level_remote_id: str
+ :param add_resource_user_request:
+ :type add_resource_user_request: AddResourceUserRequest
+ :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_user_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ duration_minutes=duration_minutes,
+ access_level_remote_id=access_level_remote_id,
+ add_resource_user_request=add_resource_user_request,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ResourceUser",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _add_resource_user_serialize(
self,
resource_id,
- **kwargs
- ):
- """get_resource_reviewers # noqa: E501
-
- Gets the list of team/user IDs of the reviewers for a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_resource_reviewers(resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [str]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- return self.get_resource_reviewers_endpoint.call_with_http_info(**kwargs)
+ user_id,
+ duration_minutes,
+ access_level_remote_id,
+ add_resource_user_request,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
- def get_resource_tags(
+ _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, str] = {}
+ _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 duration_minutes is not None:
+
+ _query_params.append(('duration_minutes', duration_minutes))
+
+ 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
+ if add_resource_user_request is not None:
+ _body_params = add_resource_user_request
+
+
+ # set the HTTP header `Accept`
+ _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}/users/{user_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 create_resource(
+ self,
+ create_resource_info: CreateResourceInfo,
+ _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,
+ ) -> Resource:
+ """create_resource
+
+ Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources.
+
+ :param create_resource_info: (required)
+ :type create_resource_info: CreateResourceInfo
+ :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_resource_serialize(
+ create_resource_info=create_resource_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Resource",
+ }
+ 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_resource_with_http_info(
+ self,
+ create_resource_info: CreateResourceInfo,
+ _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[Resource]:
+ """create_resource
+
+ Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources.
+
+ :param create_resource_info: (required)
+ :type create_resource_info: CreateResourceInfo
+ :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_resource_serialize(
+ create_resource_info=create_resource_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Resource",
+ }
+ 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_resource_without_preload_content(
+ self,
+ create_resource_info: CreateResourceInfo,
+ _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_resource
+
+ Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources.
+
+ :param create_resource_info: (required)
+ :type create_resource_info: CreateResourceInfo
+ :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_resource_serialize(
+ create_resource_info=create_resource_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Resource",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_resource_serialize(
+ self,
+ create_resource_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, str] = {}
+ _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_resource_info is not None:
+ _body_params = create_resource_info
+
+
+ # set the HTTP header `Accept`
+ _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',
+ 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,
- **kwargs
- ):
- """get_resource_tags # noqa: E501
-
- Returns all tags applied to the resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_resource_tags(resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource whose tags to return.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- TagsList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- return self.get_resource_tags_endpoint.call_with_http_info(**kwargs)
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
- def get_resources(
+ _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, str] = {}
+ _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_user(
self,
- **kwargs
- ):
- """get_resources # noqa: E501
-
- Returns a list of resources for your organization. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_resources(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- cursor (str): The pagination cursor value.. [optional]
- page_size (int): Number of results to return per page. Default is 200.. [optional]
- resource_type_filter (ResourceTypeEnum): The resource type to filter by.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PaginatedResourcesList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.get_resources_endpoint.call_with_http_info(**kwargs)
+ 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)],
+ 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_user
- def resource_user_access_status_retrieve(
+ 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
+ (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_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,
+ _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_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)],
+ 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_user
+
+ 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
+ (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_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,
+ _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_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)],
+ 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_user
+
+ 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
+ (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_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,
+ _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_user_serialize(
self,
resource_id,
user_id,
- **kwargs
- ):
- """resource_user_access_status_retrieve # noqa: E501
-
- Get user's access status to a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.resource_user_access_status_retrieve(resource_id, user_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
- user_id (str): The ID of the user.
-
- Keyword Args:
- access_level_remote_id (str): The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.. [optional]
- cursor (str): The pagination cursor value.. [optional]
- page_size (int): Number of results to return per page. Default is 200.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- ResourceUserAccessStatus
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- kwargs['user_id'] = \
- user_id
- return self.resource_user_access_status_retrieve_endpoint.call_with_http_info(**kwargs)
-
- def resource_users(
+ 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, str] = {}
+ _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
+
+
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/resources/{resource_id}/users/{user_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_resource(
self,
- resource_id,
- **kwargs
- ):
- """resource_users # noqa: E501
-
- Returns a list of `ResourceUser` objects. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.resource_users(resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
-
- Keyword Args:
- access_level_remote_id (str): The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.. [optional]
- cursor (str): The pagination cursor value.. [optional]
- page_size (int): Number of results to return per page. Default is 200.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PaginatedResourceUserList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- return self.resource_users_endpoint.call_with_http_info(**kwargs)
+ 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,
+ ) -> Resource:
+ """get_resource
- def set_resource_message_channels(
+ Retrieves 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._get_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': "Resource",
+ }
+ 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_resource_with_http_info(
self,
- resource_id,
- message_channel_id_list,
- **kwargs
- ):
- """set_resource_message_channels # noqa: E501
-
- Sets the list of message channels attached to a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.set_resource_message_channels(resource_id, message_channel_id_list, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
- message_channel_id_list (MessageChannelIDList):
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [str]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- kwargs['message_channel_id_list'] = \
- message_channel_id_list
- return self.set_resource_message_channels_endpoint.call_with_http_info(**kwargs)
+ 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[Resource]:
+ """get_resource
- def set_resource_reviewers(
+ Retrieves 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._get_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': "Resource",
+ }
+ 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_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:
+ """get_resource
+
+ Retrieves 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._get_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': "Resource",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_resource_serialize(
self,
resource_id,
- reviewer_id_list,
- **kwargs
- ):
- """set_resource_reviewers # noqa: E501
-
- Sets the list of reviewers for a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.set_resource_reviewers(resource_id, reviewer_id_list, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
- reviewer_id_list (ReviewerIDList):
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [str]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- kwargs['reviewer_id_list'] = \
- reviewer_id_list
- return self.set_resource_reviewers_endpoint.call_with_http_info(**kwargs)
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
- def update_resources(
+ _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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/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 get_resource_message_channels(
self,
- update_resource_info_list,
- **kwargs
- ):
- """update_resources # noqa: E501
-
- Bulk updates a list of resources. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.update_resources(update_resource_info_list, async_req=True)
- >>> result = thread.get()
-
- Args:
- update_resource_info_list (UpdateResourceInfoList): Resources to be updated
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- UpdateResourceInfoList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['update_resource_info_list'] = \
- update_resource_info_list
- return self.update_resources_endpoint.call_with_http_info(**kwargs)
+ 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,
+ ) -> MessageChannelList:
+ """get_resource_message_channels
+
+ Gets the list of audit message channels attached to 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._get_resource_message_channels_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': "MessageChannelList",
+ }
+ 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_resource_message_channels_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[MessageChannelList]:
+ """get_resource_message_channels
+
+ Gets the list of audit message channels attached to 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._get_resource_message_channels_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': "MessageChannelList",
+ }
+ 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_resource_message_channels_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:
+ """get_resource_message_channels
+
+ Gets the list of audit message channels attached to 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._get_resource_message_channels_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': "MessageChannelList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_resource_message_channels_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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/resources/{resource_id}/message-channels',
+ 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_resource_reviewer_stages(
+ 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,
+ ) -> List[ReviewerStage]:
+ """get_resource_reviewer_stages
+
+ Gets the list reviewer stages for 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._get_resource_reviewer_stages_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': "List[ReviewerStage]",
+ }
+ 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_resource_reviewer_stages_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[List[ReviewerStage]]:
+ """get_resource_reviewer_stages
+
+ Gets the list reviewer stages for 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._get_resource_reviewer_stages_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': "List[ReviewerStage]",
+ }
+ 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_resource_reviewer_stages_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:
+ """get_resource_reviewer_stages
+
+ Gets the list reviewer stages for 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._get_resource_reviewer_stages_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': "List[ReviewerStage]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_resource_reviewer_stages_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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/resources/{resource_id}/reviewer-stages',
+ 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_resource_reviewers(
+ 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,
+ ) -> List[str]:
+ """get_resource_reviewers
+
+ Gets the list of owner IDs of the reviewers for 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._get_resource_reviewers_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': "List[str]",
+ }
+ 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_resource_reviewers_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[List[str]]:
+ """get_resource_reviewers
+
+ Gets the list of owner IDs of the reviewers for 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._get_resource_reviewers_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': "List[str]",
+ }
+ 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_resource_reviewers_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:
+ """get_resource_reviewers
+
+ Gets the list of owner IDs of the reviewers for 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._get_resource_reviewers_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': "List[str]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_resource_reviewers_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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/resources/{resource_id}/reviewers',
+ 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_resource_tags(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource whose tags to return.")],
+ _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,
+ ) -> TagsList:
+ """get_resource_tags
+
+ Returns all tags applied to the resource.
+
+ :param resource_id: The ID of the resource whose tags to return. (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._get_resource_tags_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': "TagsList",
+ }
+ 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_resource_tags_with_http_info(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource whose tags to return.")],
+ _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[TagsList]:
+ """get_resource_tags
+
+ Returns all tags applied to the resource.
+
+ :param resource_id: The ID of the resource whose tags to return. (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._get_resource_tags_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': "TagsList",
+ }
+ 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_resource_tags_without_preload_content(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource whose tags to return.")],
+ _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_resource_tags
+
+ Returns all tags applied to the resource.
+
+ :param resource_id: The ID of the resource whose tags to return. (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._get_resource_tags_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': "TagsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_resource_tags_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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/resources/{resource_id}/tags',
+ 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_resource_users(
+ 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)],
+ 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,
+ ) -> ResourceAccessUserList:
+ """get_resource_users
+
+ Gets the list of users for 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
+ (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_resource_users_serialize(
+ resource_id=resource_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ResourceAccessUserList",
+ }
+ 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_resource_users_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)],
+ 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[ResourceAccessUserList]:
+ """get_resource_users
+
+ Gets the list of users for 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
+ (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_resource_users_serialize(
+ resource_id=resource_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ResourceAccessUserList",
+ }
+ 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_resource_users_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)],
+ 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_resource_users
+
+ Gets the list of users for 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
+ (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_resource_users_serialize(
+ resource_id=resource_id,
+ limit=limit,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ResourceAccessUserList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_resource_users_serialize(
+ self,
+ resource_id,
+ limit,
+ _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, str] = {}
+ _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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/resources/{resource_id}/users',
+ 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_resource_visibility(
+ 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,
+ ) -> VisibilityInfo:
+ """get_resource_visibility
+
+ Gets the visibility of this 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._get_resource_visibility_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': "VisibilityInfo",
+ }
+ 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_resource_visibility_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[VisibilityInfo]:
+ """get_resource_visibility
+
+ Gets the visibility of this 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._get_resource_visibility_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': "VisibilityInfo",
+ }
+ 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_resource_visibility_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:
+ """get_resource_visibility
+
+ Gets the visibility of this 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._get_resource_visibility_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': "VisibilityInfo",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_resource_visibility_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, str] = {}
+ _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
+
+
+ # set the HTTP header `Accept`
+ _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='/resources/{resource_id}/visibility',
+ 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_resources(
+ 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,
+ resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by.")] = None,
+ resource_ids: Annotated[Optional[List[StrictStr]], Field(description="The resource ids to filter by.")] = None,
+ resource_name: Annotated[Optional[StrictStr], Field(description="Resource name.")] = None,
+ parent_resource_id: Annotated[Optional[StrictStr], Field(description="The parent resource id to filter by.")] = 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_resources
+
+ Returns a list of resources 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 resource_type_filter: The resource type to filter by.
+ :type resource_type_filter: ResourceTypeEnum
+ :param resource_ids: The resource ids to filter by.
+ :type resource_ids: List[str]
+ :param resource_name: Resource name.
+ :type resource_name: str
+ :param parent_resource_id: The parent resource id to filter by.
+ :type parent_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_resources_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ resource_type_filter=resource_type_filter,
+ resource_ids=resource_ids,
+ resource_name=resource_name,
+ parent_resource_id=parent_resource_id,
+ _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_resources_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,
+ resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by.")] = None,
+ resource_ids: Annotated[Optional[List[StrictStr]], Field(description="The resource ids to filter by.")] = None,
+ resource_name: Annotated[Optional[StrictStr], Field(description="Resource name.")] = None,
+ parent_resource_id: Annotated[Optional[StrictStr], Field(description="The parent resource id to filter by.")] = 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_resources
+
+ Returns a list of resources 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 resource_type_filter: The resource type to filter by.
+ :type resource_type_filter: ResourceTypeEnum
+ :param resource_ids: The resource ids to filter by.
+ :type resource_ids: List[str]
+ :param resource_name: Resource name.
+ :type resource_name: str
+ :param parent_resource_id: The parent resource id to filter by.
+ :type parent_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_resources_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ resource_type_filter=resource_type_filter,
+ resource_ids=resource_ids,
+ resource_name=resource_name,
+ parent_resource_id=parent_resource_id,
+ _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_resources_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,
+ resource_type_filter: Annotated[Optional[ResourceTypeEnum], Field(description="The resource type to filter by.")] = None,
+ resource_ids: Annotated[Optional[List[StrictStr]], Field(description="The resource ids to filter by.")] = None,
+ resource_name: Annotated[Optional[StrictStr], Field(description="Resource name.")] = None,
+ parent_resource_id: Annotated[Optional[StrictStr], Field(description="The parent resource id to filter by.")] = 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_resources
+
+ Returns a list of resources 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 resource_type_filter: The resource type to filter by.
+ :type resource_type_filter: ResourceTypeEnum
+ :param resource_ids: The resource ids to filter by.
+ :type resource_ids: List[str]
+ :param resource_name: Resource name.
+ :type resource_name: str
+ :param parent_resource_id: The parent resource id to filter by.
+ :type parent_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_resources_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ resource_type_filter=resource_type_filter,
+ resource_ids=resource_ids,
+ resource_name=resource_name,
+ parent_resource_id=parent_resource_id,
+ _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_resources_serialize(
+ self,
+ cursor,
+ page_size,
+ resource_type_filter,
+ resource_ids,
+ resource_name,
+ parent_resource_id,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'resource_ids': 'csv',
+ }
+
+ _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, str] = {}
+ _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))
+
+ if resource_type_filter is not None:
+
+ _query_params.append(('resource_type_filter', resource_type_filter.value))
+
+ if resource_ids is not None:
+
+ _query_params.append(('resource_ids', resource_ids))
+
+ if resource_name is not None:
+
+ _query_params.append(('resource_name', resource_name))
+
+ if parent_resource_id is not None:
+
+ _query_params.append(('parent_resource_id', parent_resource_id))
+
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ 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 resource_user_access_status_retrieve(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user.")],
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None,
+ 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,
+ ) -> ResourceUserAccessStatus:
+ """resource_user_access_status_retrieve
+
+ Get user's access status to a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user. (required)
+ :type user_id: str
+ :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.
+ :type access_level_remote_id: str
+ :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._resource_user_access_status_retrieve_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ access_level_remote_id=access_level_remote_id,
+ 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': "ResourceUserAccessStatus",
+ }
+ 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 resource_user_access_status_retrieve_with_http_info(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user.")],
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None,
+ 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[ResourceUserAccessStatus]:
+ """resource_user_access_status_retrieve
+
+ Get user's access status to a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user. (required)
+ :type user_id: str
+ :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.
+ :type access_level_remote_id: str
+ :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._resource_user_access_status_retrieve_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ access_level_remote_id=access_level_remote_id,
+ 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': "ResourceUserAccessStatus",
+ }
+ 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 resource_user_access_status_retrieve_without_preload_content(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user.")],
+ access_level_remote_id: Annotated[Optional[StrictStr], Field(description="The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.")] = None,
+ 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:
+ """resource_user_access_status_retrieve
+
+ Get user's access status to a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user. (required)
+ :type user_id: str
+ :param access_level_remote_id: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used.
+ :type access_level_remote_id: str
+ :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._resource_user_access_status_retrieve_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ access_level_remote_id=access_level_remote_id,
+ 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': "ResourceUserAccessStatus",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _resource_user_access_status_retrieve_serialize(
+ self,
+ resource_id,
+ user_id,
+ access_level_remote_id,
+ 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, str] = {}
+ _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))
+
+ 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`
+ _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='/resource-user-access-status/{resource_id}/{user_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 set_resource_message_channels(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ message_channel_id_list: MessageChannelIDList,
+ _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,
+ ) -> List[str]:
+ """set_resource_message_channels
+
+ Sets the list of audit message channels attached to a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param message_channel_id_list: (required)
+ :type message_channel_id_list: MessageChannelIDList
+ :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._set_resource_message_channels_serialize(
+ resource_id=resource_id,
+ message_channel_id_list=message_channel_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_resource_message_channels_with_http_info(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ message_channel_id_list: MessageChannelIDList,
+ _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[List[str]]:
+ """set_resource_message_channels
+
+ Sets the list of audit message channels attached to a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param message_channel_id_list: (required)
+ :type message_channel_id_list: MessageChannelIDList
+ :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._set_resource_message_channels_serialize(
+ resource_id=resource_id,
+ message_channel_id_list=message_channel_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_resource_message_channels_without_preload_content(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ message_channel_id_list: MessageChannelIDList,
+ _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:
+ """set_resource_message_channels
+
+ Sets the list of audit message channels attached to a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param message_channel_id_list: (required)
+ :type message_channel_id_list: MessageChannelIDList
+ :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._set_resource_message_channels_serialize(
+ resource_id=resource_id,
+ message_channel_id_list=message_channel_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_resource_message_channels_serialize(
+ self,
+ resource_id,
+ message_channel_id_list,
+ _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, str] = {}
+ _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
+ if message_channel_id_list is not None:
+ _body_params = message_channel_id_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/resources/{resource_id}/message-channels',
+ 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 set_resource_reviewer_stages(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ reviewer_stage_list: ReviewerStageList,
+ _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,
+ ) -> List[ReviewerStage]:
+ """set_resource_reviewer_stages
+
+ Sets the list of reviewer stages for a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param reviewer_stage_list: (required)
+ :type reviewer_stage_list: ReviewerStageList
+ :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._set_resource_reviewer_stages_serialize(
+ resource_id=resource_id,
+ reviewer_stage_list=reviewer_stage_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ReviewerStage]",
+ }
+ 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 set_resource_reviewer_stages_with_http_info(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ reviewer_stage_list: ReviewerStageList,
+ _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[List[ReviewerStage]]:
+ """set_resource_reviewer_stages
+
+ Sets the list of reviewer stages for a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param reviewer_stage_list: (required)
+ :type reviewer_stage_list: ReviewerStageList
+ :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._set_resource_reviewer_stages_serialize(
+ resource_id=resource_id,
+ reviewer_stage_list=reviewer_stage_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ReviewerStage]",
+ }
+ 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 set_resource_reviewer_stages_without_preload_content(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ reviewer_stage_list: ReviewerStageList,
+ _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:
+ """set_resource_reviewer_stages
+
+ Sets the list of reviewer stages for a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param reviewer_stage_list: (required)
+ :type reviewer_stage_list: ReviewerStageList
+ :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._set_resource_reviewer_stages_serialize(
+ resource_id=resource_id,
+ reviewer_stage_list=reviewer_stage_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[ReviewerStage]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_resource_reviewer_stages_serialize(
+ self,
+ resource_id,
+ reviewer_stage_list,
+ _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, str] = {}
+ _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
+ if reviewer_stage_list is not None:
+ _body_params = reviewer_stage_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/resources/{resource_id}/reviewer-stages',
+ 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 set_resource_reviewers(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ reviewer_id_list: ReviewerIDList,
+ _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,
+ ) -> List[str]:
+ """set_resource_reviewers
+
+ Sets the list of reviewers for a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param reviewer_id_list: (required)
+ :type reviewer_id_list: ReviewerIDList
+ :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._set_resource_reviewers_serialize(
+ resource_id=resource_id,
+ reviewer_id_list=reviewer_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_resource_reviewers_with_http_info(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ reviewer_id_list: ReviewerIDList,
+ _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[List[str]]:
+ """set_resource_reviewers
+
+ Sets the list of reviewers for a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param reviewer_id_list: (required)
+ :type reviewer_id_list: ReviewerIDList
+ :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._set_resource_reviewers_serialize(
+ resource_id=resource_id,
+ reviewer_id_list=reviewer_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ 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 set_resource_reviewers_without_preload_content(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ reviewer_id_list: ReviewerIDList,
+ _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:
+ """set_resource_reviewers
+
+ Sets the list of reviewers for a resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param reviewer_id_list: (required)
+ :type reviewer_id_list: ReviewerIDList
+ :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._set_resource_reviewers_serialize(
+ resource_id=resource_id,
+ reviewer_id_list=reviewer_id_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[str]",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_resource_reviewers_serialize(
+ self,
+ resource_id,
+ reviewer_id_list,
+ _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, str] = {}
+ _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
+ if reviewer_id_list is not None:
+ _body_params = reviewer_id_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/resources/{resource_id}/reviewers',
+ 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 set_resource_visibility(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ visibility_info: VisibilityInfo,
+ _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,
+ ) -> VisibilityInfo:
+ """set_resource_visibility
+
+ Sets the visibility of this resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param visibility_info: (required)
+ :type visibility_info: VisibilityInfo
+ :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._set_resource_visibility_serialize(
+ resource_id=resource_id,
+ visibility_info=visibility_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VisibilityInfo",
+ }
+ 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 set_resource_visibility_with_http_info(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ visibility_info: VisibilityInfo,
+ _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[VisibilityInfo]:
+ """set_resource_visibility
+
+ Sets the visibility of this resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param visibility_info: (required)
+ :type visibility_info: VisibilityInfo
+ :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._set_resource_visibility_serialize(
+ resource_id=resource_id,
+ visibility_info=visibility_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VisibilityInfo",
+ }
+ 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 set_resource_visibility_without_preload_content(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ visibility_info: VisibilityInfo,
+ _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:
+ """set_resource_visibility
+
+ Sets the visibility of this resource.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param visibility_info: (required)
+ :type visibility_info: VisibilityInfo
+ :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._set_resource_visibility_serialize(
+ resource_id=resource_id,
+ visibility_info=visibility_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "VisibilityInfo",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _set_resource_visibility_serialize(
+ self,
+ resource_id,
+ visibility_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, str] = {}
+ _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
+ if visibility_info is not None:
+ _body_params = visibility_info
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ resource_path='/resources/{resource_id}/visibility',
+ 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_resources(
+ self,
+ update_resource_info_list: Annotated[UpdateResourceInfoList, 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,
+ ) -> UpdateResourceInfoList:
+ """update_resources
+
+ Bulk updates a list of resources.
+
+ :param update_resource_info_list: Resources to be updated (required)
+ :type update_resource_info_list: UpdateResourceInfoList
+ :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_resources_serialize(
+ update_resource_info_list=update_resource_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateResourceInfoList",
+ }
+ 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_resources_with_http_info(
+ self,
+ update_resource_info_list: Annotated[UpdateResourceInfoList, 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[UpdateResourceInfoList]:
+ """update_resources
+
+ Bulk updates a list of resources.
+
+ :param update_resource_info_list: Resources to be updated (required)
+ :type update_resource_info_list: UpdateResourceInfoList
+ :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_resources_serialize(
+ update_resource_info_list=update_resource_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateResourceInfoList",
+ }
+ 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_resources_without_preload_content(
+ self,
+ update_resource_info_list: Annotated[UpdateResourceInfoList, 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:
+ """update_resources
+
+ Bulk updates a list of resources.
+
+ :param update_resource_info_list: Resources to be updated (required)
+ :type update_resource_info_list: UpdateResourceInfoList
+ :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_resources_serialize(
+ update_resource_info_list=update_resource_info_list,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UpdateResourceInfoList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _update_resources_serialize(
+ self,
+ update_resource_info_list,
+ _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, str] = {}
+ _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 update_resource_info_list is not None:
+ _body_params = update_resource_info_list
+
+
+ # set the HTTP header `Accept`
+ _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='PUT',
+ 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
+ )
+
diff --git a/opal/api/sessions_api.py b/opal/api/sessions_api.py
index 5a59657..eede804 100644
--- a/opal/api/sessions_api.py
+++ b/opal/api/sessions_api.py
@@ -1,174 +1,317 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ 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
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from opal.models.sessions_list import SessionsList
-from opal.api_client import ApiClient, Endpoint as _Endpoint
-from opal.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from opal.model.sessions_list import SessionsList
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
-class SessionsApi(object):
+class SessionsApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.sessions_endpoint = _Endpoint(
- settings={
- 'response_type': (SessionsList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/sessions',
- 'operation_id': 'sessions',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'resource_id',
- 'user_id',
- ],
- 'required': [
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'resource_id':
- (str,),
- 'user_id':
- (str,),
- },
- 'attribute_map': {
- 'resource_id': 'resource_id',
- 'user_id': 'user_id',
- },
- 'location_map': {
- 'resource_id': 'query',
- 'user_id': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
+
+ @validate_call
def sessions(
self,
- resource_id,
- **kwargs
- ):
- """sessions # noqa: E501
-
- Returns a list of `Session` objects. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.sessions(resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- resource_id (str): The ID of the resource.
-
- Keyword Args:
- user_id (str): The ID of the user you wish to query sessions for.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- SessionsList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[Optional[StrictStr], Field(description="The ID of the user you wish to query sessions for.")] = 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,
+ ) -> SessionsList:
+ """sessions
+
+ Returns a list of `Session` objects.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user you wish to query sessions for.
+ :type user_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._sessions_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SessionsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def sessions_with_http_info(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[Optional[StrictStr], Field(description="The ID of the user you wish to query sessions for.")] = 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[SessionsList]:
+ """sessions
+
+ Returns a list of `Session` objects.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user you wish to query sessions for.
+ :type user_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._sessions_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SessionsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def sessions_without_preload_content(
+ self,
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource.")],
+ user_id: Annotated[Optional[StrictStr], Field(description="The ID of the user you wish to query sessions for.")] = 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:
+ """sessions
+
+ Returns a list of `Session` objects.
+
+ :param resource_id: The ID of the resource. (required)
+ :type resource_id: str
+ :param user_id: The ID of the user you wish to query sessions for.
+ :type user_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._sessions_serialize(
+ resource_id=resource_id,
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "SessionsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _sessions_serialize(
+ self,
+ resource_id,
+ user_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if resource_id is not None:
+
+ _query_params.append(('resource_id', resource_id))
+
+ if user_id is not None:
+
+ _query_params.append(('user_id', user_id))
+
+ # 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'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/sessions',
+ 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
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['resource_id'] = \
- resource_id
- return self.sessions_endpoint.call_with_http_info(**kwargs)
+
diff --git a/opal/api/tags_api.py b/opal/api/tags_api.py
index df9033e..8e4ee76 100644
--- a/opal/api/tags_api.py
+++ b/opal/api/tags_api.py
@@ -1,1149 +1,2520 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ 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
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from opal.models.create_tag_info import CreateTagInfo
+from opal.models.paginated_tags_list import PaginatedTagsList
+from opal.models.tag import Tag
-from opal.api_client import ApiClient, Endpoint as _Endpoint
-from opal.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from opal.model.tag import Tag
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
-class TagsApi(object):
+class TagsApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.add_group_tag_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tags/{tag_id}/groups/{group_id}',
- 'operation_id': 'add_group_tag',
- 'http_method': 'POST',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_id',
- 'group_id',
- ],
- 'required': [
- 'tag_id',
- 'group_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_id':
- (str,),
- 'group_id':
- (str,),
- },
- 'attribute_map': {
- 'tag_id': 'tag_id',
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'tag_id': 'path',
- 'group_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.add_resource_tag_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tags/{tag_id}/resources/{resource_id}',
- 'operation_id': 'add_resource_tag',
- 'http_method': 'POST',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_id',
- 'resource_id',
- ],
- 'required': [
- 'tag_id',
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_id':
- (str,),
- 'resource_id':
- (str,),
- },
- 'attribute_map': {
- 'tag_id': 'tag_id',
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'tag_id': 'path',
- 'resource_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.add_user_tag_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tags/{tag_id}/users/{user_id}',
- 'operation_id': 'add_user_tag',
- 'http_method': 'POST',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_id',
- 'user_id',
- ],
- 'required': [
- 'tag_id',
- 'user_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_id':
- (str,),
- 'user_id':
- (str,),
- },
- 'attribute_map': {
- 'tag_id': 'tag_id',
- 'user_id': 'user_id',
- },
- 'location_map': {
- 'tag_id': 'path',
- 'user_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.create_tag_endpoint = _Endpoint(
- settings={
- 'response_type': (Tag,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tag',
- 'operation_id': 'create_tag',
- 'http_method': 'POST',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_key',
- 'tag_value',
- 'tag_owner_team_id',
- ],
- 'required': [
- 'tag_key',
- 'tag_value',
- 'tag_owner_team_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_key':
- (str,),
- 'tag_value':
- (str,),
- 'tag_owner_team_id':
- (str,),
- },
- 'attribute_map': {
- 'tag_key': 'tag_key',
- 'tag_value': 'tag_value',
- 'tag_owner_team_id': 'tag_owner_team_id',
- },
- 'location_map': {
- 'tag_key': 'query',
- 'tag_value': 'query',
- 'tag_owner_team_id': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_tag_endpoint = _Endpoint(
- settings={
- 'response_type': (Tag,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tag',
- 'operation_id': 'get_tag',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_key',
- 'tag_value',
- ],
- 'required': [
- 'tag_key',
- 'tag_value',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_key':
- (str,),
- 'tag_value':
- (str,),
- },
- 'attribute_map': {
- 'tag_key': 'tag_key',
- 'tag_value': 'tag_value',
- },
- 'location_map': {
- 'tag_key': 'query',
- 'tag_value': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.remove_group_tag_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tags/{tag_id}/groups/{group_id}',
- 'operation_id': 'remove_group_tag',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_id',
- 'group_id',
- ],
- 'required': [
- 'tag_id',
- 'group_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_id':
- (str,),
- 'group_id':
- (str,),
- },
- 'attribute_map': {
- 'tag_id': 'tag_id',
- 'group_id': 'group_id',
- },
- 'location_map': {
- 'tag_id': 'path',
- 'group_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.remove_resource_tag_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tags/{tag_id}/resources/{resource_id}',
- 'operation_id': 'remove_resource_tag',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_id',
- 'resource_id',
- ],
- 'required': [
- 'tag_id',
- 'resource_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_id':
- (str,),
- 'resource_id':
- (str,),
- },
- 'attribute_map': {
- 'tag_id': 'tag_id',
- 'resource_id': 'resource_id',
- },
- 'location_map': {
- 'tag_id': 'path',
- 'resource_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.remove_user_tag_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/tags/{tag_id}/users/{user_id}',
- 'operation_id': 'remove_user_tag',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'tag_id',
- 'user_id',
- ],
- 'required': [
- 'tag_id',
- 'user_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'tag_id':
- (str,),
- 'user_id':
- (str,),
- },
- 'attribute_map': {
- 'tag_id': 'tag_id',
- 'user_id': 'user_id',
- },
- 'location_map': {
- 'tag_id': 'path',
- 'user_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [],
- 'content_type': [],
- },
- api_client=api_client
- )
+
+ @validate_call
def add_group_tag(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ group_id: Annotated[StrictStr, Field(description="The ID of the group to apply the tag to.")],
+ _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:
+ """add_group_tag
+
+ Applies a tag to a group.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param group_id: The ID of the group to apply the tag to. (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._add_group_tag_serialize(
+ tag_id=tag_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 add_group_tag_with_http_info(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ group_id: Annotated[StrictStr, Field(description="The ID of the group to apply the tag to.")],
+ _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]:
+ """add_group_tag
+
+ Applies a tag to a group.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param group_id: The ID of the group to apply the tag to. (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._add_group_tag_serialize(
+ tag_id=tag_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 add_group_tag_without_preload_content(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ group_id: Annotated[StrictStr, Field(description="The ID of the group to apply the tag to.")],
+ _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_group_tag
+
+ Applies a tag to a group.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param group_id: The ID of the group to apply the tag to. (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._add_group_tag_serialize(
+ tag_id=tag_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 _add_group_tag_serialize(
self,
tag_id,
group_id,
- **kwargs
- ):
- """add_group_tag # noqa: E501
-
- Applies a tag to a group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.add_group_tag(tag_id, group_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_id (str): The ID of the tag to apply.
- group_id (str): The ID of the group to apply the tag to.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_id'] = \
- tag_id
- kwargs['group_id'] = \
- group_id
- return self.add_group_tag_endpoint.call_with_http_info(**kwargs)
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if tag_id is not None:
+ _path_params['tag_id'] = tag_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='POST',
+ resource_path='/tags/{tag_id}/groups/{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 add_resource_tag(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource to apply the tag to.")],
+ _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:
+ """add_resource_tag
+
+ Applies a tag to a resource.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param resource_id: The ID of the resource to apply the tag to. (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._add_resource_tag_serialize(
+ tag_id=tag_id,
+ 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 add_resource_tag_with_http_info(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource to apply the tag to.")],
+ _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]:
+ """add_resource_tag
+
+ Applies a tag to a resource.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param resource_id: The ID of the resource to apply the tag to. (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._add_resource_tag_serialize(
+ tag_id=tag_id,
+ 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 add_resource_tag_without_preload_content(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource to apply the tag to.")],
+ _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_tag
+
+ Applies a tag to a resource.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param resource_id: The ID of the resource to apply the tag to. (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._add_resource_tag_serialize(
+ tag_id=tag_id,
+ 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 _add_resource_tag_serialize(
self,
tag_id,
resource_id,
- **kwargs
- ):
- """add_resource_tag # noqa: E501
-
- Applies a tag to a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.add_resource_tag(tag_id, resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_id (str): The ID of the tag to apply.
- resource_id (str): The ID of the resource to apply the tag to.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_id'] = \
- tag_id
- kwargs['resource_id'] = \
- resource_id
- return self.add_resource_tag_endpoint.call_with_http_info(**kwargs)
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if tag_id is not None:
+ _path_params['tag_id'] = tag_id
+ 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='POST',
+ resource_path='/tags/{tag_id}/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 add_user_tag(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to apply the tag to.")],
+ _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:
+ """add_user_tag
+
+ Applies a tag to a user.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param user_id: The ID of the user to apply the tag to. (required)
+ :type user_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._add_user_tag_serialize(
+ tag_id=tag_id,
+ user_id=user_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 add_user_tag_with_http_info(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to apply the tag to.")],
+ _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]:
+ """add_user_tag
+
+ Applies a tag to a user.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param user_id: The ID of the user to apply the tag to. (required)
+ :type user_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._add_user_tag_serialize(
+ tag_id=tag_id,
+ user_id=user_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 add_user_tag_without_preload_content(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to apply.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to apply the tag to.")],
+ _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_user_tag
+
+ Applies a tag to a user.
+
+ :param tag_id: The ID of the tag to apply. (required)
+ :type tag_id: str
+ :param user_id: The ID of the user to apply the tag to. (required)
+ :type user_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._add_user_tag_serialize(
+ tag_id=tag_id,
+ user_id=user_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 _add_user_tag_serialize(
self,
tag_id,
user_id,
- **kwargs
- ):
- """add_user_tag # noqa: E501
-
- Applies a tag to a user. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.add_user_tag(tag_id, user_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_id (str): The ID of the tag to apply.
- user_id (str): The ID of the user to apply the tag to.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_id'] = \
- tag_id
- kwargs['user_id'] = \
- user_id
- return self.add_user_tag_endpoint.call_with_http_info(**kwargs)
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+ # process the path parameters
+ if tag_id is not None:
+ _path_params['tag_id'] = tag_id
+ if user_id is not None:
+ _path_params['user_id'] = user_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='POST',
+ resource_path='/tags/{tag_id}/users/{user_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 create_tag(
+ self,
+ tag_key: Annotated[Optional[StrictStr], Field(description="The key of the tag to create.")] = None,
+ tag_value: Annotated[Optional[StrictStr], Field(description="The value of the tag to create.")] = None,
+ admin_owner_id: Annotated[Optional[StrictStr], Field(description="The ID of the owner that manages the tag.")] = None,
+ create_tag_info: Optional[CreateTagInfo] = 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,
+ ) -> Tag:
+ """create_tag
+
+ Creates a tag with the given key and value.
+
+ :param tag_key: The key of the tag to create.
+ :type tag_key: str
+ :param tag_value: The value of the tag to create.
+ :type tag_value: str
+ :param admin_owner_id: The ID of the owner that manages the tag.
+ :type admin_owner_id: str
+ :param create_tag_info:
+ :type create_tag_info: CreateTagInfo
+ :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_tag_serialize(
+ tag_key=tag_key,
+ tag_value=tag_value,
+ admin_owner_id=admin_owner_id,
+ create_tag_info=create_tag_info,
+ _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 create_tag_with_http_info(
+ self,
+ tag_key: Annotated[Optional[StrictStr], Field(description="The key of the tag to create.")] = None,
+ tag_value: Annotated[Optional[StrictStr], Field(description="The value of the tag to create.")] = None,
+ admin_owner_id: Annotated[Optional[StrictStr], Field(description="The ID of the owner that manages the tag.")] = None,
+ create_tag_info: Optional[CreateTagInfo] = 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[Tag]:
+ """create_tag
+
+ Creates a tag with the given key and value.
+
+ :param tag_key: The key of the tag to create.
+ :type tag_key: str
+ :param tag_value: The value of the tag to create.
+ :type tag_value: str
+ :param admin_owner_id: The ID of the owner that manages the tag.
+ :type admin_owner_id: str
+ :param create_tag_info:
+ :type create_tag_info: CreateTagInfo
+ :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_tag_serialize(
+ tag_key=tag_key,
+ tag_value=tag_value,
+ admin_owner_id=admin_owner_id,
+ create_tag_info=create_tag_info,
+ _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 create_tag_without_preload_content(
+ self,
+ tag_key: Annotated[Optional[StrictStr], Field(description="The key of the tag to create.")] = None,
+ tag_value: Annotated[Optional[StrictStr], Field(description="The value of the tag to create.")] = None,
+ admin_owner_id: Annotated[Optional[StrictStr], Field(description="The ID of the owner that manages the tag.")] = None,
+ create_tag_info: Optional[CreateTagInfo] = 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:
+ """create_tag
+
+ Creates a tag with the given key and value.
+
+ :param tag_key: The key of the tag to create.
+ :type tag_key: str
+ :param tag_value: The value of the tag to create.
+ :type tag_value: str
+ :param admin_owner_id: The ID of the owner that manages the tag.
+ :type admin_owner_id: str
+ :param create_tag_info:
+ :type create_tag_info: CreateTagInfo
+ :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_tag_serialize(
+ tag_key=tag_key,
+ tag_value=tag_value,
+ admin_owner_id=admin_owner_id,
+ create_tag_info=create_tag_info,
+ _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 _create_tag_serialize(
self,
tag_key,
tag_value,
- tag_owner_team_id,
- **kwargs
- ):
- """create_tag # noqa: E501
-
- Creates a tag with the given key and value. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.create_tag(tag_key, tag_value, tag_owner_team_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_key (str): The key of the tag to create.
- tag_value (str): The value of the tag to create.
- tag_owner_team_id (str): The ID of the team that owns the tag.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- Tag
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_key'] = \
- tag_key
- kwargs['tag_value'] = \
- tag_value
- kwargs['tag_owner_team_id'] = \
- tag_owner_team_id
- return self.create_tag_endpoint.call_with_http_info(**kwargs)
+ admin_owner_id,
+ create_tag_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if tag_key is not None:
+
+ _query_params.append(('tag_key', tag_key))
+
+ if tag_value is not None:
+
+ _query_params.append(('tag_value', tag_value))
+
+ if admin_owner_id is not None:
+
+ _query_params.append(('admin_owner_id', admin_owner_id))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_tag_info is not None:
+ _body_params = create_tag_info
+
+
+ # set the HTTP header `Accept`
+ _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='/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(
+ self,
+ tag_key: Annotated[StrictStr, Field(description="The key of the tag to get.")],
+ tag_value: Annotated[Optional[StrictStr], Field(description="The value of the tag to get.")] = 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,
+ ) -> Tag:
+ """get_tag
+
+ Gets a tag with the given key and value.
+
+ :param tag_key: The key of the tag to get. (required)
+ :type tag_key: str
+ :param tag_value: The value of the tag to get.
+ :type tag_value: 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_serialize(
+ tag_key=tag_key,
+ tag_value=tag_value,
+ _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_with_http_info(
+ self,
+ tag_key: Annotated[StrictStr, Field(description="The key of the tag to get.")],
+ tag_value: Annotated[Optional[StrictStr], Field(description="The value of the tag to get.")] = 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[Tag]:
+ """get_tag
+
+ Gets a tag with the given key and value.
+
+ :param tag_key: The key of the tag to get. (required)
+ :type tag_key: str
+ :param tag_value: The value of the tag to get.
+ :type tag_value: 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_serialize(
+ tag_key=tag_key,
+ tag_value=tag_value,
+ _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_without_preload_content(
+ self,
+ tag_key: Annotated[StrictStr, Field(description="The key of the tag to get.")],
+ tag_value: Annotated[Optional[StrictStr], Field(description="The value of the tag to get.")] = 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_tag
+
+ Gets a tag with the given key and value.
+
+ :param tag_key: The key of the tag to get. (required)
+ :type tag_key: str
+ :param tag_value: The value of the tag to get.
+ :type tag_value: 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_serialize(
+ tag_key=tag_key,
+ tag_value=tag_value,
+ _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_serialize(
self,
tag_key,
tag_value,
- **kwargs
- ):
- """get_tag # noqa: E501
-
- Gets a tag with the given key and value. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_tag(tag_key, tag_value, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_key (str): The key of the tag to get.
- tag_value (str): The value of the tag to get.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- Tag
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_key'] = \
- tag_key
- kwargs['tag_value'] = \
- tag_value
- return self.get_tag_endpoint.call_with_http_info(**kwargs)
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if tag_key is not None:
+
+ _query_params.append(('tag_key', tag_key))
+
+ if tag_value is not None:
+
+ _query_params.append(('tag_value', tag_value))
+
+ # 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'
+ ]
+ )
+
+
+ # 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_tags(
+ 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,
+ ) -> PaginatedTagsList:
+ """get_tags
+
+ Returns a list of tags created by 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_tags_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': "PaginatedTagsList",
+ }
+ 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_tags_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[PaginatedTagsList]:
+ """get_tags
+
+ Returns a list of tags created by 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_tags_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': "PaginatedTagsList",
+ }
+ 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_tags_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_tags
+
+ Returns a list of tags created by 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_tags_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': "PaginatedTagsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_tags_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, str] = {}
+ _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`
+ _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='/tags',
+ 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 remove_group_tag(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ group_id: Annotated[StrictStr, Field(description="The ID of the group to remove the tag from.")],
+ _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:
+ """remove_group_tag
+
+ Removes a tag from a group.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param group_id: The ID of the group to remove the tag from. (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._remove_group_tag_serialize(
+ tag_id=tag_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 remove_group_tag_with_http_info(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ group_id: Annotated[StrictStr, Field(description="The ID of the group to remove the tag from.")],
+ _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]:
+ """remove_group_tag
+
+ Removes a tag from a group.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param group_id: The ID of the group to remove the tag from. (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._remove_group_tag_serialize(
+ tag_id=tag_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 remove_group_tag_without_preload_content(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ group_id: Annotated[StrictStr, Field(description="The ID of the group to remove the tag from.")],
+ _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:
+ """remove_group_tag
+
+ Removes a tag from a group.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param group_id: The ID of the group to remove the tag from. (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._remove_group_tag_serialize(
+ tag_id=tag_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 _remove_group_tag_serialize(
self,
tag_id,
group_id,
- **kwargs
- ):
- """remove_group_tag # noqa: E501
-
- Removes a tag from a group. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.remove_group_tag(tag_id, group_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_id (str): The ID of the tag to remove.
- group_id (str): The ID of the group to remove the tag from.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_id'] = \
- tag_id
- kwargs['group_id'] = \
- group_id
- return self.remove_group_tag_endpoint.call_with_http_info(**kwargs)
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if tag_id is not None:
+ _path_params['tag_id'] = tag_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='/tags/{tag_id}/groups/{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 remove_resource_tag(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource to remove the tag from.")],
+ _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:
+ """remove_resource_tag
+
+ Removes a tag from a resource.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param resource_id: The ID of the resource to remove the tag from. (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._remove_resource_tag_serialize(
+ tag_id=tag_id,
+ 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 remove_resource_tag_with_http_info(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource to remove the tag from.")],
+ _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]:
+ """remove_resource_tag
+
+ Removes a tag from a resource.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param resource_id: The ID of the resource to remove the tag from. (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._remove_resource_tag_serialize(
+ tag_id=tag_id,
+ 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 remove_resource_tag_without_preload_content(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ resource_id: Annotated[StrictStr, Field(description="The ID of the resource to remove the tag from.")],
+ _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:
+ """remove_resource_tag
+
+ Removes a tag from a resource.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param resource_id: The ID of the resource to remove the tag from. (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._remove_resource_tag_serialize(
+ tag_id=tag_id,
+ 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 _remove_resource_tag_serialize(
self,
tag_id,
resource_id,
- **kwargs
- ):
- """remove_resource_tag # noqa: E501
-
- Removes a tag from a resource. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.remove_resource_tag(tag_id, resource_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_id (str): The ID of the tag to remove.
- resource_id (str): The ID of the resource to remove the tag from.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_id'] = \
- tag_id
- kwargs['resource_id'] = \
- resource_id
- return self.remove_resource_tag_endpoint.call_with_http_info(**kwargs)
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if tag_id is not None:
+ _path_params['tag_id'] = tag_id
+ 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='/tags/{tag_id}/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 remove_user_tag(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to remove the tag from.")],
+ _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:
+ """remove_user_tag
+
+ Removes a tag from a user.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param user_id: The ID of the user to remove the tag from. (required)
+ :type user_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._remove_user_tag_serialize(
+ tag_id=tag_id,
+ user_id=user_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 remove_user_tag_with_http_info(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to remove the tag from.")],
+ _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]:
+ """remove_user_tag
+
+ Removes a tag from a user.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param user_id: The ID of the user to remove the tag from. (required)
+ :type user_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._remove_user_tag_serialize(
+ tag_id=tag_id,
+ user_id=user_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 remove_user_tag_without_preload_content(
+ self,
+ tag_id: Annotated[StrictStr, Field(description="The ID of the tag to remove.")],
+ user_id: Annotated[StrictStr, Field(description="The ID of the user to remove the tag from.")],
+ _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:
+ """remove_user_tag
+
+ Removes a tag from a user.
+
+ :param tag_id: The ID of the tag to remove. (required)
+ :type tag_id: str
+ :param user_id: The ID of the user to remove the tag from. (required)
+ :type user_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._remove_user_tag_serialize(
+ tag_id=tag_id,
+ user_id=user_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 _remove_user_tag_serialize(
self,
tag_id,
user_id,
- **kwargs
- ):
- """remove_user_tag # noqa: E501
-
- Removes a tag from a user. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.remove_user_tag(tag_id, user_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- tag_id (str): The ID of the tag to remove.
- user_id (str): The ID of the user to remove the tag from.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['tag_id'] = \
- tag_id
- kwargs['user_id'] = \
- user_id
- return self.remove_user_tag_endpoint.call_with_http_info(**kwargs)
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if tag_id is not None:
+ _path_params['tag_id'] = tag_id
+ if user_id is not None:
+ _path_params['user_id'] = user_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='/tags/{tag_id}/users/{user_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/uars_api.py b/opal/api/uars_api.py
new file mode 100644
index 0000000..77331fc
--- /dev/null
+++ b/opal/api/uars_api.py
@@ -0,0 +1,848 @@
+# 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.create_uar_info import CreateUARInfo
+from opal.models.paginated_uars_list import PaginatedUARsList
+from opal.models.uar import UAR
+
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
+
+
+class UarsApi:
+ """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 create_uar(
+ self,
+ create_uar_info: Annotated[CreateUARInfo, Field(description="The settings of the UAR.")],
+ _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,
+ ) -> UAR:
+ """create_uar
+
+ Starts a User Access Review.
+
+ :param create_uar_info: The settings of the UAR. (required)
+ :type create_uar_info: CreateUARInfo
+ :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_uar_serialize(
+ create_uar_info=create_uar_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UAR",
+ }
+ 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_uar_with_http_info(
+ self,
+ create_uar_info: Annotated[CreateUARInfo, Field(description="The settings of the UAR.")],
+ _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[UAR]:
+ """create_uar
+
+ Starts a User Access Review.
+
+ :param create_uar_info: The settings of the UAR. (required)
+ :type create_uar_info: CreateUARInfo
+ :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_uar_serialize(
+ create_uar_info=create_uar_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UAR",
+ }
+ 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_uar_without_preload_content(
+ self,
+ create_uar_info: Annotated[CreateUARInfo, Field(description="The settings of the UAR.")],
+ _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_uar
+
+ Starts a User Access Review.
+
+ :param create_uar_info: The settings of the UAR. (required)
+ :type create_uar_info: CreateUARInfo
+ :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_uar_serialize(
+ create_uar_info=create_uar_info,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UAR",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_uar_serialize(
+ self,
+ create_uar_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, str] = {}
+ _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_uar_info is not None:
+ _body_params = create_uar_info
+
+
+ # set the HTTP header `Accept`
+ _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='/uar',
+ 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_uar(
+ self,
+ uar_id: Annotated[StrictStr, Field(description="The ID of the UAR.")],
+ _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,
+ ) -> UAR:
+ """get_uar
+
+ Retrieves a specific UAR.
+
+ :param uar_id: The ID of the UAR. (required)
+ :type uar_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_uar_serialize(
+ uar_id=uar_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UAR",
+ }
+ 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_uar_with_http_info(
+ self,
+ uar_id: Annotated[StrictStr, Field(description="The ID of the UAR.")],
+ _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[UAR]:
+ """get_uar
+
+ Retrieves a specific UAR.
+
+ :param uar_id: The ID of the UAR. (required)
+ :type uar_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_uar_serialize(
+ uar_id=uar_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UAR",
+ }
+ 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_uar_without_preload_content(
+ self,
+ uar_id: Annotated[StrictStr, Field(description="The ID of the UAR.")],
+ _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_uar
+
+ Retrieves a specific UAR.
+
+ :param uar_id: The ID of the UAR. (required)
+ :type uar_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_uar_serialize(
+ uar_id=uar_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UAR",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_uar_serialize(
+ self,
+ uar_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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if uar_id is not None:
+ _path_params['uar_id'] = uar_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/uar/{uar_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_uars(
+ 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,
+ ) -> PaginatedUARsList:
+ """get_uars
+
+ Returns a list of `UAR` objects.
+
+ :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_uars_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': "PaginatedUARsList",
+ }
+ 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_uars_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[PaginatedUARsList]:
+ """get_uars
+
+ Returns a list of `UAR` objects.
+
+ :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_uars_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': "PaginatedUARsList",
+ }
+ 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_uars_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_uars
+
+ Returns a list of `UAR` objects.
+
+ :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_uars_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': "PaginatedUARsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_uars_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, str] = {}
+ _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`
+ _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='/uars',
+ 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/users_api.py b/opal/api/users_api.py
index 73b8290..99c0fa1 100644
--- a/opal/api/users_api.py
+++ b/opal/api/users_api.py
@@ -1,298 +1,854 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ 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
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from opal.models.paginated_users_list import PaginatedUsersList
+from opal.models.tags_list import TagsList
+from opal.models.user import User
-from opal.api_client import ApiClient, Endpoint as _Endpoint
-from opal.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from opal.model.tags_list import TagsList
-from opal.model.user import User
+from opal.api_client import ApiClient, RequestSerialized
+from opal.api_response import ApiResponse
+from opal.rest import RESTResponseType
-class UsersApi(object):
+class UsersApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.get_user_tags_endpoint = _Endpoint(
- settings={
- 'response_type': (TagsList,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/users/{user_id}/tags',
- 'operation_id': 'get_user_tags',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'user_id',
- ],
- 'required': [
- 'user_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'user_id':
- (str,),
- },
- 'attribute_map': {
- 'user_id': 'user_id',
- },
- 'location_map': {
- 'user_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def get_user_tags(
+ self,
+ user_id: Annotated[StrictStr, Field(description="The ID of the user whose tags to return.")],
+ _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,
+ ) -> TagsList:
+ """get_user_tags
+
+ Returns all tags applied to the user.
+
+ :param user_id: The ID of the user whose tags to return. (required)
+ :type user_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_user_tags_serialize(
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.user_endpoint = _Endpoint(
- settings={
- 'response_type': (User,),
- 'auth': [
- 'BearerAuth'
- ],
- 'endpoint_path': '/user',
- 'operation_id': 'user',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'user_id',
- 'email',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'user_id':
- (str,),
- 'email':
- (str,),
- },
- 'attribute_map': {
- 'user_id': 'user_id',
- 'email': 'email',
- },
- 'location_map': {
- 'user_id': 'query',
- 'email': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TagsList",
+ }
+ 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
- def get_user_tags(
+
+ @validate_call
+ def get_user_tags_with_http_info(
+ self,
+ user_id: Annotated[StrictStr, Field(description="The ID of the user whose tags to return.")],
+ _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[TagsList]:
+ """get_user_tags
+
+ Returns all tags applied to the user.
+
+ :param user_id: The ID of the user whose tags to return. (required)
+ :type user_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_user_tags_serialize(
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TagsList",
+ }
+ 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_user_tags_without_preload_content(
+ self,
+ user_id: Annotated[StrictStr, Field(description="The ID of the user whose tags to return.")],
+ _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_user_tags
+
+ Returns all tags applied to the user.
+
+ :param user_id: The ID of the user whose tags to return. (required)
+ :type user_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_user_tags_serialize(
+ user_id=user_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "TagsList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _get_user_tags_serialize(
self,
user_id,
- **kwargs
- ):
- """get_user_tags # noqa: E501
-
- Returns all tags applied to the user. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_user_tags(user_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- user_id (str): The ID of the user whose tags to return.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- TagsList
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if user_id is not None:
+ _path_params['user_id'] = user_id
+ # process the query parameters
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users/{user_id}/tags',
+ 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_users(
+ 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,
+ ) -> PaginatedUsersList:
+ """get_users
+
+ Returns a list of users 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_users_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': "PaginatedUsersList",
+ }
+ 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_users_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[PaginatedUsersList]:
+ """get_users
+
+ Returns a list of users 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_users_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedUsersList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def get_users_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_users
+
+ Returns a list of users 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_users_serialize(
+ cursor=cursor,
+ page_size=page_size,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PaginatedUsersList",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _get_users_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, str] = {}
+ _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`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/users',
+ 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
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['user_id'] = \
- user_id
- return self.get_user_tags_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def user(
self,
- **kwargs
- ):
- """user # noqa: E501
-
- Returns a `User` object. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.user(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- user_id (str): The user ID of the user.. [optional]
- email (str): The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- User
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ user_id: Annotated[Optional[StrictStr], Field(description="The user ID of the user.")] = None,
+ email: Annotated[Optional[StrictStr], Field(description="The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.")] = 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,
+ ) -> User:
+ """user
+
+ Returns a `User` object.
+
+ :param user_id: The user ID of the user.
+ :type user_id: str
+ :param email: The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.
+ :type email: 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._user_serialize(
+ user_id=user_id,
+ email=email,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "User",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def user_with_http_info(
+ self,
+ user_id: Annotated[Optional[StrictStr], Field(description="The user ID of the user.")] = None,
+ email: Annotated[Optional[StrictStr], Field(description="The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.")] = 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[User]:
+ """user
+
+ Returns a `User` object.
+
+ :param user_id: The user ID of the user.
+ :type user_id: str
+ :param email: The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.
+ :type email: 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._user_serialize(
+ user_id=user_id,
+ email=email,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "User",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def user_without_preload_content(
+ self,
+ user_id: Annotated[Optional[StrictStr], Field(description="The user ID of the user.")] = None,
+ email: Annotated[Optional[StrictStr], Field(description="The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.")] = 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:
+ """user
+
+ Returns a `User` object.
+
+ :param user_id: The user ID of the user.
+ :type user_id: str
+ :param email: The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur.
+ :type email: 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._user_serialize(
+ user_id=user_id,
+ email=email,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "User",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.user_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _user_serialize(
+ self,
+ user_id,
+ email,
+ _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, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if user_id is not None:
+
+ _query_params.append(('user_id', user_id))
+
+ if email is not None:
+
+ _query_params.append(('email', email))
+
+ # 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'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'BearerAuth'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/user',
+ 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_client.py b/opal/api_client.py
index 7594e40..087fdc3 100644
--- a/opal/api_client.py
+++ b/opal/api_client.py
@@ -1,46 +1,47 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+import datetime
+from dateutil.parser import parse
+from enum import Enum
import json
-import atexit
import mimetypes
-from multiprocessing.pool import ThreadPool
-import io
import os
import re
-import typing
-from urllib.parse import quote
-from urllib3.fields import RequestField
+import tempfile
+from urllib.parse import quote
+from typing import Tuple, Optional, List, Dict
-from opal import rest
from opal.configuration import Configuration
-from opal.exceptions import ApiTypeError, ApiValueError, ApiException
-from opal.model_utils import (
- ModelNormal,
- ModelSimple,
- ModelComposed,
- check_allowed_values,
- check_validations,
- date,
- datetime,
- deserialize_file,
- file_type,
- model_to_dict,
- none_type,
- validate_and_convert_types
+from opal.api_response import ApiResponse, T as ApiResponseT
+import opal.models
+from opal import rest
+from opal.exceptions import (
+ ApiValueError,
+ ApiException,
+ BadRequestException,
+ UnauthorizedException,
+ ForbiddenException,
+ NotFoundException,
+ ServiceException
)
+RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
-class ApiClient(object):
+class ApiClient:
"""Generic API client for OpenAPI client library builds.
OpenAPI generic API client. This client handles the client-
@@ -48,28 +49,38 @@ class ApiClient(object):
the methods and models for each application are generated from the OpenAPI
templates.
- NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
-
:param configuration: .Configuration object for this client
:param header_name: a header to pass when making calls to the API.
:param header_value: a header value to pass when making calls to
the API.
:param cookie: a cookie to include in the header when making calls
to the API
- :param pool_threads: The number of threads to use for async requests
- to the API. More threads means more concurrent API requests.
"""
+ PRIMITIVE_TYPES = (float, bool, bytes, str, int)
+ NATIVE_TYPES_MAPPING = {
+ 'int': int,
+ 'long': int, # TODO remove as only py3 is supported?
+ 'float': float,
+ 'str': str,
+ 'bool': bool,
+ 'date': datetime.date,
+ 'datetime': datetime.datetime,
+ 'object': object,
+ }
_pool = None
- def __init__(self, configuration=None, header_name=None, header_value=None,
- cookie=None, pool_threads=1):
+ def __init__(
+ self,
+ configuration=None,
+ header_name=None,
+ header_value=None,
+ cookie=None
+ ) -> None:
+ # use default configuration if none is provided
if configuration is None:
- configuration = Configuration.get_default_copy()
+ configuration = Configuration.get_default()
self.configuration = configuration
- self.pool_threads = pool_threads
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {}
@@ -78,30 +89,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.0.0/python'
+ self.client_side_validation = configuration.client_side_validation
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
- self.close()
-
- def close(self):
- if self._pool:
- self._pool.close()
- self._pool.join()
- self._pool = None
- if hasattr(atexit, 'unregister'):
- atexit.unregister(self.close)
-
- @property
- def pool(self):
- """Create thread pool on first request
- avoids instantiating unused threadpool for blocking clients.
- """
- if self._pool is None:
- atexit.register(self.close)
- self._pool = ThreadPool(self.pool_threads)
- return self._pool
+ pass
@property
def user_agent(self):
@@ -115,26 +109,69 @@ def user_agent(self, value):
def set_default_header(self, header_name, header_value):
self.default_headers[header_name] = header_value
- def __call_api(
+
+ _default = None
+
+ @classmethod
+ def get_default(cls):
+ """Return new instance of ApiClient.
+
+ This method returns newly created, based on default constructor,
+ object of ApiClient class or returns a copy of default
+ ApiClient.
+
+ :return: The ApiClient object.
+ """
+ if cls._default is None:
+ cls._default = ApiClient()
+ return cls._default
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of ApiClient.
+
+ It stores default ApiClient.
+
+ :param default: object of ApiClient.
+ """
+ cls._default = default
+
+ def param_serialize(
self,
- resource_path: str,
- method: str,
- path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- body: typing.Optional[typing.Any] = None,
- post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
- response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
- auth_settings: typing.Optional[typing.List[str]] = None,
- _return_http_data_only: typing.Optional[bool] = None,
- collection_formats: typing.Optional[typing.Dict[str, str]] = None,
- _preload_content: bool = True,
- _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
- _host: typing.Optional[str] = None,
- _check_type: typing.Optional[bool] = None,
- _content_type: typing.Optional[str] = None
- ):
+ method,
+ resource_path,
+ path_params=None,
+ query_params=None,
+ header_params=None,
+ body=None,
+ post_params=None,
+ files=None, auth_settings=None,
+ collection_formats=None,
+ _host=None,
+ _request_auth=None
+ ) -> RequestSerialized:
+
+ """Builds the HTTP request params needed by the request.
+ :param method: Method to call.
+ :param resource_path: Path to method endpoint.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :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.
+ :return: tuple of form (path, http_method, query_params, header_params,
+ body, post_params, files)
+ """
config = self.configuration
@@ -145,14 +182,17 @@ def __call_api(
header_params['Cookie'] = self.cookie
if header_params:
header_params = self.sanitize_for_serialization(header_params)
- header_params = dict(self.parameters_to_tuples(header_params,
- collection_formats))
+ header_params = dict(
+ self.parameters_to_tuples(header_params,collection_formats)
+ )
# path parameters
if path_params:
path_params = self.sanitize_for_serialization(path_params)
- path_params = self.parameters_to_tuples(path_params,
- collection_formats)
+ path_params = self.parameters_to_tuples(
+ path_params,
+ collection_formats
+ )
for k, v in path_params:
# specified safe chars, encode everything
resource_path = resource_path.replace(
@@ -160,31 +200,31 @@ def __call_api(
quote(str(v), safe=config.safe_chars_for_path_param)
)
- # query parameters
- if query_params:
- query_params = self.sanitize_for_serialization(query_params)
- query_params = self.parameters_to_tuples(query_params,
- collection_formats)
-
# post parameters
if post_params or files:
post_params = post_params if post_params else []
post_params = self.sanitize_for_serialization(post_params)
- post_params = self.parameters_to_tuples(post_params,
- collection_formats)
+ post_params = self.parameters_to_tuples(
+ post_params,
+ collection_formats
+ )
post_params.extend(self.files_parameters(files))
- if header_params['Content-Type'].startswith("multipart"):
- post_params = self.parameters_to_multipart(post_params,
- (dict) )
+
+ # auth setting
+ self.update_params_for_auth(
+ header_params,
+ query_params,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=_request_auth
+ )
# body
if body:
body = self.sanitize_for_serialization(body)
- # auth setting
- self.update_params_for_auth(header_params, query_params,
- auth_settings, resource_path, method, body)
-
# request url
if _host is None:
url = self.configuration.host + resource_path
@@ -192,73 +232,106 @@ def __call_api(
# use server/host defined in path or operation instead
url = _host + resource_path
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ url_query = self.parameters_to_url_query(
+ query_params,
+ collection_formats
+ )
+ url += "?" + url_query
+
+ return method, url, header_params, body, post_params
+
+
+ def call_api(
+ self,
+ method,
+ url,
+ header_params=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ) -> rest.RESTResponse:
+ """Makes the HTTP request (synchronous)
+ :param method: Method to call.
+ :param url: Path to method endpoint.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param _request_timeout: timeout setting for this request.
+ :return: RESTResponse
+ """
+
try:
# perform request and return response
- response_data = self.request(
- method, url, query_params=query_params, headers=header_params,
- post_params=post_params, body=body,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout)
+ response_data = self.rest_client.request(
+ method, url,
+ headers=header_params,
+ body=body, post_params=post_params,
+ _request_timeout=_request_timeout
+ )
+
except ApiException as e:
- e.body = e.body.decode('utf-8')
raise e
- self.last_response = response_data
+ return response_data
+
+ def response_deserialize(
+ self,
+ response_data: rest.RESTResponse,
+ response_types_map: Optional[Dict[str, ApiResponseT]]=None
+ ) -> ApiResponse[ApiResponseT]:
+ """Deserializes response into an object.
+ :param response_data: RESTResponse object to be deserialized.
+ :param response_types_map: dict of response types.
+ :return: ApiResponse
+ """
- return_data = response_data
+ msg = "RESTResponse.read() must be called before passing it to response_deserialize()"
+ assert response_data.data is not None, msg
- if not _preload_content:
- return (return_data)
- return return_data
+ response_type = response_types_map.get(str(response_data.status), None)
+ if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
+ # if not found, look for '1XX', '2XX', etc.
+ response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
# deserialize response data
- if response_type:
- if response_type != (file_type,):
- encoding = "utf-8"
+ response_text = None
+ return_data = None
+ try:
+ if response_type == "bytearray":
+ return_data = response_data.data
+ elif response_type == "file":
+ return_data = self.__deserialize_file(response_data)
+ elif response_type is not None:
+ match = None
content_type = response_data.getheader('content-type')
if content_type is not None:
- match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
- if match:
- encoding = match.group(1)
- response_data.data = response_data.data.decode(encoding)
-
- return_data = self.deserialize(
- response_data,
- response_type,
- _check_type
- )
- else:
- return_data = None
+ 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)
+ finally:
+ if not 200 <= response_data.status <= 299:
+ raise ApiException.from_response(
+ http_resp=response_data,
+ body=response_text,
+ data=return_data,
+ )
- if _return_http_data_only:
- return (return_data)
- else:
- return (return_data, response_data.status,
- response_data.getheaders())
+ return ApiResponse(
+ status_code = response_data.status,
+ data = return_data,
+ headers = response_data.getheaders(),
+ raw_data = response_data.data
+ )
- def parameters_to_multipart(self, params, collection_types):
- """Get parameters as list of tuples, formatting as json if value is collection_types
+ def sanitize_for_serialization(self, obj):
+ """Builds a JSON POST object.
- :param params: Parameters as list of two-tuples
- :param dict collection_types: Parameter collection types
- :return: Parameters as list of tuple or urllib3.fields.RequestField
- """
- new_params = []
- if collection_types is None:
- collection_types = (dict)
- for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
- if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json
- v = json.dumps(v, ensure_ascii=False).encode("utf-8")
- field = RequestField(k, v)
- field.make_multipart(content_type="application/json; charset=utf-8")
- new_params.append(field)
- else:
- new_params.append((k, v))
- return new_params
-
- @classmethod
- def sanitize_for_serialization(cls, obj):
- """Prepares data for transmission before it is sent with the rest client
If obj is None, return None.
If obj is str, int, long, float, bool, return directly.
If obj is datetime.datetime, datetime.date
@@ -266,228 +339,102 @@ def sanitize_for_serialization(cls, obj):
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.
- If obj is io.IOBase, return the bytes
+
:param obj: The data to serialize.
:return: The serialized form of data.
"""
- if isinstance(obj, (ModelNormal, ModelComposed)):
- return {
- key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()
- }
- elif isinstance(obj, io.IOBase):
- return cls.get_file_data_and_close_file(obj)
- elif isinstance(obj, (str, int, float, none_type, bool)):
+ if obj is None:
+ return None
+ elif isinstance(obj, self.PRIMITIVE_TYPES):
return obj
- elif isinstance(obj, (datetime, date)):
+ elif isinstance(obj, list):
+ return [
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ ]
+ elif isinstance(obj, tuple):
+ return tuple(
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ )
+ elif isinstance(obj, (datetime.datetime, datetime.date)):
return obj.isoformat()
- elif isinstance(obj, ModelSimple):
- return cls.sanitize_for_serialization(obj.value)
- elif isinstance(obj, (list, tuple)):
- return [cls.sanitize_for_serialization(item) for item in obj]
- if isinstance(obj, dict):
- return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()}
- raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__))
-
- def deserialize(self, response, response_type, _check_type):
+
+ elif isinstance(obj, dict):
+ obj_dict = obj
+ else:
+ # Convert model obj to dict except
+ # attributes `openapi_types`, `attribute_map`
+ # and attributes which value is not None.
+ # Convert attribute name to json key in
+ # model definition for request.
+ obj_dict = obj.to_dict()
+
+ return {
+ key: self.sanitize_for_serialization(val)
+ for key, val in obj_dict.items()
+ }
+
+ def deserialize(self, response_text, response_type):
"""Deserializes response into an object.
:param response: RESTResponse object to be deserialized.
- :param response_type: For the response, a tuple containing:
- valid classes
- a list containing valid classes (for list schemas)
- a dict containing a tuple of valid classes as the value
- Example values:
- (str,)
- (Pet,)
- (float, none_type)
- ([int, none_type],)
- ({str: (bool, str, int, float, date, datetime, str, none_type)},)
- :param _check_type: boolean, whether to check the types of the data
- received from the server
- :type _check_type: bool
+ :param response_type: class literal for
+ deserialized object, or string of class name.
:return: deserialized object.
"""
- # handle file downloading
- # save response body into a tmp file and return the instance
- if response_type == (file_type,):
- content_disposition = response.getheader("Content-Disposition")
- return deserialize_file(response.data, self.configuration,
- content_disposition=content_disposition)
# fetch data from response object
try:
- received_data = json.loads(response.data)
+ data = json.loads(response_text)
except ValueError:
- received_data = response.data
-
- # store our data under the key of 'received_data' so users have some
- # context if they are deserializing a string and the data type is wrong
- deserialized_data = validate_and_convert_types(
- received_data,
- response_type,
- ['received_data'],
- True,
- _check_type,
- configuration=self.configuration
- )
- return deserialized_data
+ data = response_text
- def call_api(
- self,
- resource_path: str,
- method: str,
- path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- body: typing.Optional[typing.Any] = None,
- post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
- response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
- auth_settings: typing.Optional[typing.List[str]] = None,
- async_req: typing.Optional[bool] = None,
- _return_http_data_only: typing.Optional[bool] = None,
- collection_formats: typing.Optional[typing.Dict[str, str]] = None,
- _preload_content: bool = True,
- _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
- _host: typing.Optional[str] = None,
- _check_type: typing.Optional[bool] = None
- ):
- """Makes the HTTP request (synchronous) and returns deserialized data.
-
- To make an async_req request, set the async_req parameter.
+ return self.__deserialize(data, response_type)
- :param resource_path: Path to method endpoint.
- :param method: Method to call.
- :param path_params: Path parameters in the url.
- :param query_params: Query parameters in the url.
- :param header_params: Header parameters to be
- placed in the request header.
- :param body: Request body.
- :param post_params dict: Request post form parameters,
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
- :param auth_settings list: Auth Settings names for the request.
- :param response_type: For the response, a tuple containing:
- valid classes
- a list containing valid classes (for list schemas)
- a dict containing a tuple of valid classes as the value
- Example values:
- (str,)
- (Pet,)
- (float, none_type)
- ([int, none_type],)
- ({str: (bool, str, int, float, date, datetime, str, none_type)},)
- :param files: key -> field name, value -> a list of open file
- objects for `multipart/form-data`.
- :type files: dict
- :param async_req bool: execute request asynchronously
- :type async_req: bool, optional
- :param _return_http_data_only: response data without head status code
- and headers
- :type _return_http_data_only: bool, optional
- :param collection_formats: dict of collection formats for path, query,
- header, and post parameters.
- :type collection_formats: dict, optional
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :type _preload_content: bool, optional
- :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.
- :param _check_type: boolean describing if the data back from the server
- should have its type checked.
- :type _check_type: bool, optional
- :return:
- If async_req parameter is True,
- the request will be called asynchronously.
- The method will return the request thread.
- If parameter async_req is False or missing,
- then the method will return the response directly.
+ def __deserialize(self, data, klass):
+ """Deserializes dict, list, str into an object.
+
+ :param data: dict, list or str.
+ :param klass: class literal, or string of class name.
+
+ :return: object.
"""
- if not async_req:
- return self.__call_api(resource_path, method,
- path_params, query_params, header_params,
- body, post_params, files,
- response_type, auth_settings,
- _return_http_data_only, collection_formats,
- _preload_content, _request_timeout, _host,
- _check_type)
-
- return self.pool.apply_async(self.__call_api, (resource_path,
- method, path_params,
- query_params,
- header_params, body,
- post_params, files,
- response_type,
- auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content,
- _request_timeout,
- _host, _check_type))
-
- def request(self, method, url, query_params=None, headers=None,
- post_params=None, body=None, _preload_content=True,
- _request_timeout=None):
- """Makes the HTTP request using RESTClient."""
- if method == "GET":
- return self.rest_client.GET(url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers)
- elif method == "HEAD":
- return self.rest_client.HEAD(url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers)
- elif method == "OPTIONS":
- return self.rest_client.OPTIONS(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "POST":
- return self.rest_client.POST(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "PUT":
- return self.rest_client.PUT(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "PATCH":
- return self.rest_client.PATCH(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "DELETE":
- return self.rest_client.DELETE(url,
- query_params=query_params,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
+ if data is None:
+ return None
+
+ if isinstance(klass, str):
+ if klass.startswith('List['):
+ m = re.match(r'List\[(.*)]', klass)
+ assert m is not None, "Malformed List type definition"
+ sub_kls = m.group(1)
+ return [self.__deserialize(sub_data, sub_kls)
+ for sub_data in data]
+
+ if klass.startswith('Dict['):
+ m = re.match(r'Dict\[([^,]*), (.*)]', klass)
+ assert m is not None, "Malformed Dict type definition"
+ sub_kls = m.group(2)
+ return {k: self.__deserialize(v, sub_kls)
+ for k, v in data.items()}
+
+ # convert str to class
+ if klass in self.NATIVE_TYPES_MAPPING:
+ klass = self.NATIVE_TYPES_MAPPING[klass]
+ else:
+ klass = getattr(opal.models, klass)
+
+ if klass in self.PRIMITIVE_TYPES:
+ return self.__deserialize_primitive(data, klass)
+ elif klass == object:
+ return self.__deserialize_object(data)
+ elif klass == datetime.date:
+ return self.__deserialize_date(data)
+ elif klass == datetime.datetime:
+ return self.__deserialize_datetime(data)
+ elif issubclass(klass, Enum):
+ return self.__deserialize_enum(data, klass)
else:
- raise ApiValueError(
- "http method must be `GET`, `HEAD`, `OPTIONS`,"
- " `POST`, `PATCH`, `PUT` or `DELETE`."
- )
+ return self.__deserialize_model(data, klass)
def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
@@ -496,10 +443,10 @@ def parameters_to_tuples(self, params, collection_formats):
:param dict collection_formats: Parameter collection formats
:return: Parameters as list of tuples, collections formatted
"""
- new_params = []
+ new_params: List[Tuple[str, str]] = []
if collection_formats is None:
collection_formats = {}
- for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
+ for k, v in params.items() if isinstance(params, dict) else params:
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
@@ -519,349 +466,294 @@ def parameters_to_tuples(self, params, collection_formats):
new_params.append((k, v))
return new_params
- @staticmethod
- def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes:
- file_data = file_instance.read()
- file_instance.close()
- return file_data
+ def parameters_to_url_query(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
- def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None):
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: URL query string (e.g. a=Hello%20World&b=123)
+ """
+ new_params: List[Tuple[str, str]] = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params:
+ if isinstance(v, bool):
+ v = str(v).lower()
+ if isinstance(v, (int, float)):
+ v = str(v)
+ if isinstance(v, dict):
+ v = json.dumps(v)
+
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, str(value)) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(quote(str(value)) for value in v))
+ )
+ else:
+ new_params.append((k, quote(str(v))))
+
+ return "&".join(["=".join(map(str, item)) for item in new_params])
+
+ def files_parameters(self, files=None):
"""Builds form parameters.
- :param files: None or a dict with key=param_name and
- value is a list of open file objects
- :return: List of tuples of form parameters with file data
+ :param files: File parameters.
+ :return: Form parameters with files.
"""
- if files is None:
- return []
-
params = []
- for param_name, file_instances in files.items():
- if file_instances is None:
- # if the file field is nullable, skip None values
- continue
- for file_instance in file_instances:
- if file_instance is None:
- # if the file field is nullable, skip None values
+
+ if files:
+ for k, v in files.items():
+ if not v:
continue
- if file_instance.closed is True:
- raise ApiValueError(
- "Cannot read a closed file. The passed in file_type "
- "for %s must be open." % param_name
- )
- filename = os.path.basename(file_instance.name)
- filedata = self.get_file_data_and_close_file(file_instance)
- mimetype = (mimetypes.guess_type(filename)[0] or
- 'application/octet-stream')
- params.append(
- tuple([param_name, tuple([filename, filedata, mimetype])]))
+ 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])])
+ )
return params
- def select_header_accept(self, accepts):
+ def select_header_accept(self, accepts: List[str]) -> Optional[str]:
"""Returns `Accept` based on an array of accepts provided.
:param accepts: List of headers.
:return: Accept (e.g. application/json).
"""
if not accepts:
- return
+ return None
- accepts = [x.lower() for x in accepts]
+ for accept in accepts:
+ if re.search('json', accept, re.IGNORECASE):
+ return accept
- if 'application/json' in accepts:
- return 'application/json'
- else:
- return ', '.join(accepts)
+ return accepts[0]
- def select_header_content_type(self, content_types, method=None, body=None):
+ def select_header_content_type(self, content_types):
"""Returns `Content-Type` based on an array of content_types provided.
:param content_types: List of content-types.
- :param method: http method (e.g. POST, PATCH).
- :param body: http body to send.
:return: Content-Type (e.g. application/json).
"""
if not content_types:
- return 'application/json'
-
- content_types = [x.lower() for x in content_types]
+ return None
- if (method == 'PATCH' and
- 'application/json-patch+json' in content_types and
- isinstance(body, list)):
- return 'application/json-patch+json'
+ for content_type in content_types:
+ if re.search('json', content_type, re.IGNORECASE):
+ return content_type
- if 'application/json' in content_types or '*/*' in content_types:
- return 'application/json'
- else:
- return content_types[0]
+ return content_types[0]
- def update_params_for_auth(self, headers, queries, auth_settings,
- resource_path, method, body):
+ def update_params_for_auth(
+ self,
+ headers,
+ queries,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=None
+ ) -> None:
"""Updates header and query params based on authentication setting.
:param headers: Header parameters dict to be updated.
:param queries: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
- :param resource_path: A string representation of the HTTP request resource path.
- :param method: A string representation of the HTTP request method.
- :param body: A object representing the body of the HTTP request.
- The object type is the return value of _encoder.default().
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param request_auth: if set, the provided settings will
+ override the token in the configuration.
"""
if not auth_settings:
return
- for auth in auth_settings:
- auth_setting = self.configuration.auth_settings().get(auth)
- if auth_setting:
- if auth_setting['in'] == 'cookie':
- headers['Cookie'] = auth_setting['value']
- elif auth_setting['in'] == 'header':
- if auth_setting['type'] != 'http-signature':
- headers[auth_setting['key']] = auth_setting['value']
- elif auth_setting['in'] == 'query':
- queries.append((auth_setting['key'], auth_setting['value']))
- else:
- raise ApiValueError(
- 'Authentication token must be in `query` or `header`'
+ if request_auth:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ request_auth
+ )
+ else:
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
)
+ def _apply_auth_params(
+ self,
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
+ ) -> None:
+ """Updates the request parameters based on a single auth_setting
-class Endpoint(object):
- def __init__(self, settings=None, params_map=None, root_map=None,
- headers_map=None, api_client=None, callable=None):
- """Creates an endpoint
-
- Args:
- settings (dict): see below key value pairs
- 'response_type' (tuple/None): response type
- 'auth' (list): a list of auth type keys
- 'endpoint_path' (str): the endpoint path
- 'operation_id' (str): endpoint string identifier
- 'http_method' (str): POST/PUT/PATCH/GET etc
- 'servers' (list): list of str servers that this endpoint is at
- params_map (dict): see below key value pairs
- 'all' (list): list of str endpoint parameter names
- 'required' (list): list of required parameter names
- 'nullable' (list): list of nullable parameter names
- 'enum' (list): list of parameters with enum values
- 'validation' (list): list of parameters with validations
- root_map
- 'validations' (dict): the dict mapping endpoint parameter tuple
- paths to their validation dictionaries
- 'allowed_values' (dict): the dict mapping endpoint parameter
- tuple paths to their allowed_values (enum) dictionaries
- 'openapi_types' (dict): param_name to openapi type
- 'attribute_map' (dict): param_name to camelCase name
- 'location_map' (dict): param_name to 'body', 'file', 'form',
- 'header', 'path', 'query'
- collection_format_map (dict): param_name to `csv` etc.
- headers_map (dict): see below key value pairs
- 'accept' (list): list of Accept header strings
- 'content_type' (list): list of Content-Type header strings
- api_client (ApiClient) api client instance
- callable (function): the function which is invoked when the
- Endpoint is called
+ :param headers: Header parameters dict to be updated.
+ :param queries: Query parameters tuple list to be updated.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param auth_setting: auth settings for the endpoint
"""
- self.settings = settings
- self.params_map = params_map
- self.params_map['all'].extend([
- 'async_req',
- '_host_index',
- '_preload_content',
- '_request_timeout',
- '_return_http_data_only',
- '_check_input_type',
- '_check_return_type',
- '_content_type',
- '_spec_property_naming'
- ])
- self.params_map['nullable'].extend(['_request_timeout'])
- self.validations = root_map['validations']
- self.allowed_values = root_map['allowed_values']
- self.openapi_types = root_map['openapi_types']
- extra_types = {
- 'async_req': (bool,),
- '_host_index': (none_type, int),
- '_preload_content': (bool,),
- '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]),
- '_return_http_data_only': (bool,),
- '_check_input_type': (bool,),
- '_check_return_type': (bool,),
- '_spec_property_naming': (bool,),
- '_content_type': (none_type, str)
- }
- self.openapi_types.update(extra_types)
- self.attribute_map = root_map['attribute_map']
- self.location_map = root_map['location_map']
- self.collection_format_map = root_map['collection_format_map']
- self.headers_map = headers_map
- self.api_client = api_client
- self.callable = callable
-
- def __validate_inputs(self, kwargs):
- for param in self.params_map['enum']:
- if param in kwargs:
- check_allowed_values(
- self.allowed_values,
- (param,),
- kwargs[param]
- )
+ if auth_setting['in'] == 'cookie':
+ headers['Cookie'] = auth_setting['value']
+ elif auth_setting['in'] == 'header':
+ if auth_setting['type'] != 'http-signature':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ queries.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ApiValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
- for param in self.params_map['validation']:
- if param in kwargs:
- check_validations(
- self.validations,
- (param,),
- kwargs[param],
- configuration=self.api_client.configuration
- )
+ def __deserialize_file(self, response):
+ """Deserializes body to file
- if kwargs['_check_input_type'] is False:
- return
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
+
+ handle file downloading
+ save response body into a tmp file and return the instance
- for key, value in kwargs.items():
- fixed_val = validate_and_convert_types(
- value,
- self.openapi_types[key],
- [key],
- kwargs['_spec_property_naming'],
- kwargs['_check_input_type'],
- configuration=self.api_client.configuration
+ :param response: RESTResponse.
+ :return: file path.
+ """
+ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
+
+ content_disposition = response.getheader("Content-Disposition")
+ if content_disposition:
+ m = re.search(
+ r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition
)
- kwargs[key] = fixed_val
-
- def __gather_params(self, kwargs):
- params = {
- 'body': None,
- 'collection_format': {},
- 'file': {},
- 'form': [],
- 'header': {},
- 'path': {},
- 'query': []
- }
+ assert m is not None, "Unexpected 'content-disposition' header value"
+ filename = m.group(1)
+ path = os.path.join(os.path.dirname(path), filename)
- for param_name, param_value in kwargs.items():
- param_location = self.location_map.get(param_name)
- if param_location is None:
- continue
- if param_location:
- if param_location == 'body':
- params['body'] = param_value
- continue
- base_name = self.attribute_map[param_name]
- if (param_location == 'form' and
- self.openapi_types[param_name] == (file_type,)):
- params['file'][base_name] = [param_value]
- elif (param_location == 'form' and
- self.openapi_types[param_name] == ([file_type],)):
- # param_value is already a list
- params['file'][base_name] = param_value
- elif param_location in {'form', 'query'}:
- param_value_full = (base_name, param_value)
- params[param_location].append(param_value_full)
- if param_location not in {'form', 'query'}:
- params[param_location][base_name] = param_value
- collection_format = self.collection_format_map.get(param_name)
- if collection_format:
- params['collection_format'][base_name] = collection_format
+ with open(path, "wb") as f:
+ f.write(response.data)
- return params
+ return path
+
+ def __deserialize_primitive(self, data, klass):
+ """Deserializes string to primitive type.
- def __call__(self, *args, **kwargs):
- """ This method is invoked when endpoints are called
- Example:
+ :param data: str.
+ :param klass: class literal.
- api_instance = EventsApi()
- api_instance.events # this is an instance of the class Endpoint
- api_instance.events() # this invokes api_instance.events.__call__()
- which then invokes the callable functions stored in that endpoint at
- api_instance.events.callable or self.callable in this class
+ :return: int, long, float, str, bool.
+ """
+ try:
+ return klass(data)
+ except UnicodeEncodeError:
+ return str(data)
+ except TypeError:
+ return data
+
+ def __deserialize_object(self, value):
+ """Return an original value.
+ :return: object.
"""
- return self.callable(self, *args, **kwargs)
+ return value
- def call_with_http_info(self, **kwargs):
+ def __deserialize_date(self, string):
+ """Deserializes string to date.
+ :param string: str.
+ :return: date.
+ """
try:
- index = self.api_client.configuration.server_operation_index.get(
- self.settings['operation_id'], self.api_client.configuration.server_index
- ) if kwargs['_host_index'] is None else kwargs['_host_index']
- server_variables = self.api_client.configuration.server_operation_variables.get(
- self.settings['operation_id'], self.api_client.configuration.server_variables
- )
- _host = self.api_client.configuration.get_host_from_settings(
- index, variables=server_variables, servers=self.settings['servers']
+ return parse(string).date()
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason="Failed to parse `{0}` as date object".format(string)
)
- except IndexError:
- if self.settings['servers']:
- raise ApiValueError(
- "Invalid host index. Must be 0 <= index < %s" %
- len(self.settings['servers'])
- )
- _host = None
-
- for key, value in kwargs.items():
- if key not in self.params_map['all']:
- raise ApiTypeError(
- "Got an unexpected parameter '%s'"
- " to method `%s`" %
- (key, self.settings['operation_id'])
- )
- # only throw this nullable ApiValueError if _check_input_type
- # is False, if _check_input_type==True we catch this case
- # in self.__validate_inputs
- if (key not in self.params_map['nullable'] and value is None
- and kwargs['_check_input_type'] is False):
- raise ApiValueError(
- "Value may not be None for non-nullable parameter `%s`"
- " when calling `%s`" %
- (key, self.settings['operation_id'])
- )
- for key in self.params_map['required']:
- if key not in kwargs.keys():
- raise ApiValueError(
- "Missing the required parameter `%s` when calling "
- "`%s`" % (key, self.settings['operation_id'])
+ def __deserialize_datetime(self, string):
+ """Deserializes string to datetime.
+
+ The string should be in iso8601 datetime format.
+
+ :param string: str.
+ :return: datetime.
+ """
+ try:
+ return parse(string)
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as datetime object"
+ .format(string)
)
+ )
- self.__validate_inputs(kwargs)
+ def __deserialize_enum(self, data, klass):
+ """Deserializes primitive type to enum.
- params = self.__gather_params(kwargs)
+ :param data: primitive type.
+ :param klass: class literal.
+ :return: enum value.
+ """
+ try:
+ return klass(data)
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as `{1}`"
+ .format(data, klass)
+ )
+ )
- accept_headers_list = self.headers_map['accept']
- if accept_headers_list:
- params['header']['Accept'] = self.api_client.select_header_accept(
- accept_headers_list)
+ def __deserialize_model(self, data, klass):
+ """Deserializes list or dict to model.
- if kwargs.get('_content_type'):
- params['header']['Content-Type'] = kwargs['_content_type']
- else:
- content_type_headers_list = self.headers_map['content_type']
- if content_type_headers_list:
- if params['body'] != "":
- header_list = self.api_client.select_header_content_type(
- content_type_headers_list, self.settings['http_method'],
- params['body'])
- params['header']['Content-Type'] = header_list
-
- return self.api_client.call_api(
- self.settings['endpoint_path'], self.settings['http_method'],
- params['path'],
- params['query'],
- params['header'],
- body=params['body'],
- post_params=params['form'],
- files=params['file'],
- response_type=self.settings['response_type'],
- auth_settings=self.settings['auth'],
- async_req=kwargs['async_req'],
- _check_type=kwargs['_check_return_type'],
- _return_http_data_only=kwargs['_return_http_data_only'],
- _preload_content=kwargs['_preload_content'],
- _request_timeout=kwargs['_request_timeout'],
- _host=_host,
- collection_formats=params['collection_format'])
+ :param data: dict, list.
+ :param klass: class literal.
+ :return: model object.
+ """
+
+ return klass.from_dict(data)
diff --git a/opal/api_response.py b/opal/api_response.py
new file mode 100644
index 0000000..9bc7c11
--- /dev/null
+++ b/opal/api_response.py
@@ -0,0 +1,21 @@
+"""API response object."""
+
+from __future__ import annotations
+from typing import Optional, Generic, Mapping, TypeVar
+from pydantic import Field, StrictInt, StrictBytes, BaseModel
+
+T = TypeVar("T")
+
+class ApiResponse(BaseModel, Generic[T]):
+ """
+ API response object
+ """
+
+ status_code: StrictInt = Field(description="HTTP status code")
+ headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
+ data: T = Field(description="Deserialized data given the data type")
+ raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
+
+ model_config = {
+ "arbitrary_types_allowed": True
+ }
diff --git a/opal/configuration.py b/opal/configuration.py
index 6ccff20..bb0b15d 100644
--- a/opal/configuration.py
+++ b/opal/configuration.py
@@ -1,23 +1,27 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import copy
import logging
+from logging import FileHandler
import multiprocessing
import sys
+from typing import Optional
import urllib3
-from http import client as http_client
-from opal.exceptions import ApiValueError
-
+import http.client as httplib
JSON_SCHEMA_VALIDATION_KEYWORDS = {
'multipleOf', 'maximum', 'exclusiveMaximum',
@@ -25,46 +29,20 @@
'minLength', 'pattern', 'maxItems', 'minItems'
}
-class Configuration(object):
- """NOTE: This class is auto generated by OpenAPI Generator
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
+class Configuration:
+ """This class contains various settings of the API client.
- :param host: Base url
+ :param host: Base url.
: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.
The dict value is the API key secret.
- :param api_key_prefix: Dict to store API prefix (e.g. Bearer)
+ :param api_key_prefix: Dict to store API prefix (e.g. Bearer).
The dict key is the name of the security scheme in the OAS specification.
The dict value is an API key prefix when generating the auth data.
- :param username: Username for HTTP basic authentication
- :param password: Password for HTTP basic authentication
- :param discard_unknown_keys: Boolean value indicating whether to discard
- unknown properties. A server may send a response that includes additional
- properties that are not known by the client in the following scenarios:
- 1. The OpenAPI document is incomplete, i.e. it does not match the server
- implementation.
- 2. The client was generated using an older version of the OpenAPI document
- and the server has been upgraded since then.
- If a schema in the OpenAPI document defines the additionalProperties attribute,
- then all undeclared properties received by the server are injected into the
- additional properties map. In that case, there are undeclared properties, and
- nothing to discard.
- :param disabled_client_side_validations (string): Comma-separated list of
- JSON schema validation keywords to disable JSON schema structural validation
- rules. The following keywords may be specified: multipleOf, maximum,
- exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern,
- maxItems, minItems.
- By default, the validation is performed for data generated locally by the client
- and data received from the server, independent of any validation performed by
- the server side. If the input data does not satisfy the JSON schema validation
- rules specified in the OpenAPI document, an exception is raised.
- If disabled_client_side_validations is set, structural validation is
- disabled. This can be useful to troubleshoot data validation problem, such as
- when the OpenAPI document validation rules do not match the actual API data
- received by the server.
+ :param username: Username for HTTP basic authentication.
+ :param password: Password for HTTP basic authentication.
+ :param access_token: Access token.
:param server_index: Index to servers configuration.
:param server_variables: Mapping with string values to replace variables in
templated server configuration. The validation of enums is performed for
@@ -73,9 +51,10 @@ class Configuration(object):
configuration.
:param server_operation_variables: Mapping from operation ID to a mapping with
string values to replace variables in templated server configuration.
- The validation of enums is performed for variables with defined enum values before.
+ The validation of enums is performed for variables with defined enum
+ values before.
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
- in PEM format
+ in PEM format.
:Example:
"""
@@ -84,14 +63,12 @@ class Configuration(object):
def __init__(self, host=None,
api_key=None, api_key_prefix=None,
- access_token=None,
username=None, password=None,
- discard_unknown_keys=False,
- disabled_client_side_validations="",
+ access_token=None,
server_index=None, server_variables=None,
server_operation_index=None, server_operation_variables=None,
ssl_ca_cert=None,
- ):
+ ) -> None:
"""Constructor
"""
self._base_path = "https://api.opal.dev/v1" if host is None else host
@@ -109,7 +86,6 @@ def __init__(self, host=None,
"""Temp file folder for downloading files
"""
# Authentication Settings
- self.access_token = access_token
self.api_key = {}
if api_key:
self.api_key = api_key
@@ -129,8 +105,9 @@ def __init__(self, host=None,
self.password = password
"""Password for HTTP basic authentication
"""
- self.discard_unknown_keys = discard_unknown_keys
- self.disabled_client_side_validations = disabled_client_side_validations
+ self.access_token = access_token
+ """Access token
+ """
self.logger = {}
"""Logging Settings
"""
@@ -142,7 +119,7 @@ def __init__(self, host=None,
self.logger_stream_handler = None
"""Log stream handler
"""
- self.logger_file_handler = None
+ self.logger_file_handler: Optional[FileHandler] = None
"""Log file handler
"""
self.logger_file = None
@@ -169,6 +146,10 @@ def __init__(self, host=None,
self.assert_hostname = None
"""Set this to True/False to enable/disable SSL hostname verification.
"""
+ self.tls_server_name = None
+ """SSL/TLS Server Name Indication (SNI)
+ Set this to the SNI value expected by the server.
+ """
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
"""urllib3 connection pool's maximum number of connections saved
@@ -178,12 +159,9 @@ def __init__(self, host=None,
cpu_count * 5 is used as default value to increase performance.
"""
- self.proxy = None
+ self.proxy: Optional[str] = None
"""Proxy URL
"""
- self.no_proxy = None
- """bypass proxy for host in the no_proxy list.
- """
self.proxy_headers = None
"""Proxy headers
"""
@@ -196,8 +174,17 @@ def __init__(self, host=None,
# Enable client side validation
self.client_side_validation = True
- # Options to pass down to the underlying urllib3 socket
self.socket_options = None
+ """Options to pass down to the underlying urllib3 socket
+ """
+
+ self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
+ """datetime format
+ """
+
+ self.date_format = "%Y-%m-%d"
+ """date format
+ """
def __deepcopy__(self, memo):
cls = self.__class__
@@ -215,13 +202,6 @@ def __deepcopy__(self, memo):
def __setattr__(self, name, value):
object.__setattr__(self, name, value)
- if name == 'disabled_client_side_validations':
- s = set(filter(None, value.split(',')))
- for v in s:
- if v not in JSON_SCHEMA_VALIDATION_KEYWORDS:
- raise ApiValueError(
- "Invalid keyword: '{0}''".format(v))
- self._disabled_client_side_validations = s
@classmethod
def set_default(cls, default):
@@ -232,21 +212,31 @@ def set_default(cls, default):
:param default: object of Configuration
"""
- cls._default = copy.deepcopy(default)
+ cls._default = default
@classmethod
def get_default_copy(cls):
- """Return new instance of configuration.
+ """Deprecated. Please use `get_default` instead.
+
+ Deprecated. Please use `get_default` instead.
+
+ :return: The configuration object.
+ """
+ return cls.get_default()
+
+ @classmethod
+ def get_default(cls):
+ """Return the default configuration.
This method returns newly created, based on default constructor,
object of Configuration class or returns a copy of default
- configuration passed by the set_default method.
+ configuration.
:return: The configuration object.
"""
- if cls._default is not None:
- return copy.deepcopy(cls._default)
- return Configuration()
+ if cls._default is None:
+ cls._default = Configuration()
+ return cls._default
@property
def logger_file(self):
@@ -300,15 +290,15 @@ def debug(self, value):
# if debug status is True, turn on debug logging
for _, logger in self.logger.items():
logger.setLevel(logging.DEBUG)
- # turn on http_client debug
- http_client.HTTPConnection.debuglevel = 1
+ # turn on httplib debug
+ httplib.HTTPConnection.debuglevel = 1
else:
# if debug status is False, turn off debug logging,
# setting log level to default `logging.WARNING`
for _, logger in self.logger.items():
logger.setLevel(logging.WARNING)
- # turn off http_client debug
- http_client.HTTPConnection.debuglevel = 0
+ # turn off httplib debug
+ httplib.HTTPConnection.debuglevel = 0
@property
def logger_format(self):
diff --git a/opal/exceptions.py b/opal/exceptions.py
index 8d92b0c..6dfc18e 100644
--- a/opal/exceptions.py
+++ b/opal/exceptions.py
@@ -1,14 +1,19 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
+from typing import Any, Optional
+from typing_extensions import Self
class OpenApiException(Exception):
"""The base exception class for all OpenAPIExceptions"""
@@ -16,7 +21,7 @@ class OpenApiException(Exception):
class ApiTypeError(OpenApiException, TypeError):
def __init__(self, msg, path_to_item=None, valid_classes=None,
- key_type=None):
+ key_type=None) -> None:
""" Raises an exception for TypeErrors
Args:
@@ -44,7 +49,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None,
class ApiValueError(OpenApiException, ValueError):
- def __init__(self, msg, path_to_item=None):
+ def __init__(self, msg, path_to_item=None) -> None:
"""
Args:
msg (str): the exception message
@@ -62,7 +67,7 @@ def __init__(self, msg, path_to_item=None):
class ApiAttributeError(OpenApiException, AttributeError):
- def __init__(self, msg, path_to_item=None):
+ def __init__(self, msg, path_to_item=None) -> None:
"""
Raised when an attribute reference or assignment fails.
@@ -81,7 +86,7 @@ def __init__(self, msg, path_to_item=None):
class ApiKeyError(OpenApiException, KeyError):
- def __init__(self, msg, path_to_item=None):
+ def __init__(self, msg, path_to_item=None) -> None:
"""
Args:
msg (str): the exception message
@@ -99,17 +104,56 @@ def __init__(self, msg, path_to_item=None):
class ApiException(OpenApiException):
- def __init__(self, status=None, reason=None, http_resp=None):
+ def __init__(
+ self,
+ status=None,
+ reason=None,
+ http_resp=None,
+ *,
+ body: Optional[str] = None,
+ data: Optional[Any] = None,
+ ) -> None:
+ self.status = status
+ self.reason = reason
+ self.body = body
+ self.data = data
+ self.headers = None
+
if http_resp:
- self.status = http_resp.status
- self.reason = http_resp.reason
- self.body = http_resp.data
+ if self.status is None:
+ self.status = http_resp.status
+ if self.reason is None:
+ self.reason = http_resp.reason
+ if self.body is None:
+ try:
+ self.body = http_resp.data.decode('utf-8')
+ except Exception:
+ pass
self.headers = http_resp.getheaders()
- else:
- self.status = status
- self.reason = reason
- self.body = None
- self.headers = None
+
+ @classmethod
+ def from_response(
+ cls,
+ *,
+ http_resp,
+ body: Optional[str],
+ data: Optional[Any],
+ ) -> Self:
+ if http_resp.status == 400:
+ raise BadRequestException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 401:
+ raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 403:
+ raise ForbiddenException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 404:
+ raise NotFoundException(http_resp=http_resp, body=body, data=data)
+
+ if 500 <= http_resp.status <= 599:
+ raise ServiceException(http_resp=http_resp, body=body, data=data)
+ raise ApiException(http_resp=http_resp, body=body, data=data)
def __str__(self):
"""Custom error messages for exception"""
@@ -119,34 +163,30 @@ def __str__(self):
error_message += "HTTP response headers: {0}\n".format(
self.headers)
- if self.body:
- error_message += "HTTP response body: {0}\n".format(self.body)
+ if self.data or self.body:
+ error_message += "HTTP response body: {0}\n".format(self.data or self.body)
return error_message
-class NotFoundException(ApiException):
+class BadRequestException(ApiException):
+ pass
- def __init__(self, status=None, reason=None, http_resp=None):
- super(NotFoundException, self).__init__(status, reason, http_resp)
+class NotFoundException(ApiException):
+ pass
-class UnauthorizedException(ApiException):
- def __init__(self, status=None, reason=None, http_resp=None):
- super(UnauthorizedException, self).__init__(status, reason, http_resp)
+class UnauthorizedException(ApiException):
+ pass
class ForbiddenException(ApiException):
-
- def __init__(self, status=None, reason=None, http_resp=None):
- super(ForbiddenException, self).__init__(status, reason, http_resp)
+ pass
class ServiceException(ApiException):
-
- def __init__(self, status=None, reason=None, http_resp=None):
- super(ServiceException, self).__init__(status, reason, http_resp)
+ pass
def render_path(path_to_item):
diff --git a/opal/model/group.py b/opal/model/group.py
index 65a77b9..cfb8a61 100644
--- a/opal/model/group.py
+++ b/opal/model/group.py
@@ -8,7 +8,6 @@
Generated by: https://openapi-generator.tech
"""
-
import re # noqa: F401
import sys # noqa: F401
@@ -25,7 +24,7 @@
file_type,
none_type,
validate_get_composed_info,
- OpenApiModel
+ OpenApiModel,
)
from opal.exceptions import ApiAttributeError
@@ -34,9 +33,10 @@ def lazy_import():
from opal.model.group_function_enum import GroupFunctionEnum
from opal.model.group_type_enum import GroupTypeEnum
from opal.model.visibility_enum import VisibilityEnum
- globals()['GroupFunctionEnum'] = GroupFunctionEnum
- globals()['GroupTypeEnum'] = GroupTypeEnum
- globals()['VisibilityEnum'] = VisibilityEnum
+
+ globals()["GroupFunctionEnum"] = GroupFunctionEnum
+ globals()["GroupTypeEnum"] = GroupTypeEnum
+ globals()["VisibilityEnum"] = VisibilityEnum
class Group(ModelNormal):
@@ -63,11 +63,9 @@ class Group(ModelNormal):
as additional properties values.
"""
- allowed_values = {
- }
+ allowed_values = {}
- validations = {
- }
+ validations = {}
@cached_property
def additional_properties_type():
@@ -76,7 +74,17 @@ def additional_properties_type():
of type self, this must run after the class is loaded
"""
lazy_import()
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+ return (
+ bool,
+ date,
+ datetime,
+ dict,
+ float,
+ int,
+ list,
+ str,
+ none_type,
+ ) # noqa: E501
_nullable = False
@@ -92,40 +100,38 @@ def openapi_types():
"""
lazy_import()
return {
- 'group_id': (str,), # noqa: E501
- 'name': (str,), # noqa: E501
- 'description': (str,), # noqa: E501
- 'owner_team_id': (str,), # noqa: E501
- 'group_function': (GroupFunctionEnum,), # noqa: E501
- 'group_type': (GroupTypeEnum,), # noqa: E501
- 'visibility': (VisibilityEnum,), # noqa: E501
- 'max_duration': (int,), # noqa: E501
- 'require_manager_approval': (bool,), # noqa: E501
- 'require_support_ticket': (bool,), # noqa: E501
- 'folder_id': (str,), # noqa: E501
+ "group_id": (str,), # noqa: E501
+ "name": (str,), # noqa: E501
+ "description": (str,), # noqa: E501
+ "owner_team_id": (str,), # noqa: E501
+ "group_function": (GroupFunctionEnum,), # noqa: E501
+ "group_type": (GroupTypeEnum,), # noqa: E501
+ "visibility": (VisibilityEnum,), # noqa: E501
+ "max_duration": (int,), # noqa: E501
+ "require_manager_approval": (bool,), # noqa: E501
+ "require_support_ticket": (bool,), # noqa: E501
+ "folder_id": (str,), # noqa: E501
}
@cached_property
def discriminator():
return None
-
attribute_map = {
- 'group_id': 'group_id', # noqa: E501
- 'name': 'name', # noqa: E501
- 'description': 'description', # noqa: E501
- 'owner_team_id': 'owner_team_id', # noqa: E501
- 'group_function': 'group_function', # noqa: E501
- 'group_type': 'group_type', # noqa: E501
- 'visibility': 'visibility', # noqa: E501
- 'max_duration': 'max_duration', # noqa: E501
- 'require_manager_approval': 'require_manager_approval', # noqa: E501
- 'require_support_ticket': 'require_support_ticket', # noqa: E501
- 'folder_id': 'folder_id', # noqa: E501
+ "group_id": "group_id", # noqa: E501
+ "name": "name", # noqa: E501
+ "description": "description", # noqa: E501
+ "owner_team_id": "owner_team_id", # noqa: E501
+ "group_function": "group_function", # noqa: E501
+ "group_type": "group_type", # noqa: E501
+ "visibility": "visibility", # noqa: E501
+ "max_duration": "max_duration", # noqa: E501
+ "require_manager_approval": "require_manager_approval", # noqa: E501
+ "require_support_ticket": "require_support_ticket", # noqa: E501
+ "folder_id": "folder_id", # noqa: E501
}
- read_only_vars = {
- }
+ read_only_vars = {}
_composed_schemas = {}
@@ -180,17 +186,18 @@ def _from_openapi_data(cls, group_id, *args, **kwargs): # noqa: E501
folder_id (str): The ID of the folder that the group is located in.. [optional] # noqa: E501
"""
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+ _check_type = kwargs.pop("_check_type", True)
+ _spec_property_naming = kwargs.pop("_spec_property_naming", False)
+ _path_to_item = kwargs.pop("_path_to_item", ())
+ _configuration = kwargs.pop("_configuration", None)
+ _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
+ % (
args,
self.__class__.__name__,
),
@@ -207,23 +214,27 @@ def _from_openapi_data(cls, group_id, *args, **kwargs): # noqa: E501
self.group_id = group_id
for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
+ if (
+ var_name not in self.attribute_map
+ and self._configuration is not None
+ and self._configuration.discard_unknown_keys
+ and self.additional_properties_type is None
+ ):
# discard variable.
continue
setattr(self, var_name, var_value)
return self
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
+ required_properties = set(
+ [
+ "_data_store",
+ "_check_type",
+ "_spec_property_naming",
+ "_path_to_item",
+ "_configuration",
+ "_visited_composed_classes",
+ ]
+ )
@convert_js_args_to_python_args
def __init__(self, group_id, *args, **kwargs): # noqa: E501
@@ -275,15 +286,16 @@ def __init__(self, group_id, *args, **kwargs): # noqa: E501
folder_id (str): The ID of the folder that the group is located in.. [optional] # noqa: E501
"""
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+ _check_type = kwargs.pop("_check_type", True)
+ _spec_property_naming = kwargs.pop("_spec_property_naming", False)
+ _path_to_item = kwargs.pop("_path_to_item", ())
+ _configuration = kwargs.pop("_configuration", None)
+ _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
if args:
raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
+ % (
args,
self.__class__.__name__,
),
@@ -300,13 +312,17 @@ def __init__(self, group_id, *args, **kwargs): # noqa: E501
self.group_id = group_id
for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
+ if (
+ var_name not in self.attribute_map
+ and self._configuration is not None
+ and self._configuration.discard_unknown_keys
+ and self.additional_properties_type is None
+ ):
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
+ raise ApiAttributeError(
+ f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
+ f"class with read only attributes."
+ )
diff --git a/opal/models/__init__.py b/opal/models/__init__.py
index 4c21644..ebf3067 100644
--- a/opal/models/__init__.py
+++ b/opal/models/__init__.py
@@ -1,44 +1,148 @@
+# coding: utf-8
+
# flake8: noqa
+"""
+ 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 all models into this package
-# if you have many models here with many references from one model to another this may
-# raise a RecursionError
-# to avoid this, import only the models that you directly need like:
-# from from opal.model.pet import Pet
-# or import this package, but before doing it, use:
-# import sys
-# sys.setrecursionlimit(n)
-from opal.model.entity_type_enum import EntityTypeEnum
-from opal.model.event import Event
-from opal.model.group import Group
-from opal.model.group_function_enum import GroupFunctionEnum
-from opal.model.group_type_enum import GroupTypeEnum
-from opal.model.message_channel import MessageChannel
-from opal.model.message_channel_id_list import MessageChannelIDList
-from opal.model.message_channel_list import MessageChannelList
-from opal.model.message_channel_provider_enum import MessageChannelProviderEnum
-from opal.model.message_channel_type_enum import MessageChannelTypeEnum
-from opal.model.new_admin_id_list import NewAdminIDList
-from opal.model.paginated_event_list import PaginatedEventList
-from opal.model.paginated_groups_list import PaginatedGroupsList
-from opal.model.paginated_resource_user_list import PaginatedResourceUserList
-from opal.model.paginated_resources_list import PaginatedResourcesList
-from opal.model.resource import Resource
-from opal.model.resource_access_level import ResourceAccessLevel
-from opal.model.resource_type_enum import ResourceTypeEnum
-from opal.model.resource_user import ResourceUser
-from opal.model.resource_user_access_status import ResourceUserAccessStatus
-from opal.model.resource_user_access_status_enum import ResourceUserAccessStatusEnum
-from opal.model.reviewer_id_list import ReviewerIDList
-from opal.model.session import Session
-from opal.model.sessions_list import SessionsList
-from opal.model.tag import Tag
-from opal.model.tags_list import TagsList
-from opal.model.update_group_info import UpdateGroupInfo
-from opal.model.update_group_info_list import UpdateGroupInfoList
-from opal.model.update_resource_info import UpdateResourceInfo
-from opal.model.update_resource_info_list import UpdateResourceInfoList
-from opal.model.user import User
-from opal.model.users_list import UsersList
-from opal.model.visibility_enum import VisibilityEnum
+# import models into model package
+from opal.models.add_group_resource_request import AddGroupResourceRequest
+from opal.models.add_group_user_request import AddGroupUserRequest
+from opal.models.add_resource_user_request import AddResourceUserRequest
+from opal.models.app import App
+from opal.models.app_type_enum import AppTypeEnum
+from opal.models.apps_list import AppsList
+from opal.models.aws_permission_set_metadata import AwsPermissionSetMetadata
+from opal.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet
+from opal.models.condition import Condition
+from opal.models.configuration_template import ConfigurationTemplate
+from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo
+from opal.models.create_group_binding_info import CreateGroupBindingInfo
+from opal.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner
+from opal.models.create_group_info import CreateGroupInfo
+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_request_configuration_info_list import CreateRequestConfigurationInfoList
+from opal.models.create_resource_info import CreateResourceInfo
+from opal.models.create_tag_info import CreateTagInfo
+from opal.models.create_uar_info import CreateUARInfo
+from opal.models.entity_type_enum import EntityTypeEnum
+from opal.models.event import Event
+from opal.models.group import Group
+from opal.models.group_access_level import GroupAccessLevel
+from opal.models.group_binding import GroupBinding
+from opal.models.group_binding_group import GroupBindingGroup
+from opal.models.group_remote_info import GroupRemoteInfo
+from opal.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup
+from opal.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group
+from opal.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup
+from opal.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup
+from opal.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam
+from opal.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup
+from opal.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup
+from opal.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup
+from opal.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup
+from opal.models.group_resource import GroupResource
+from opal.models.group_resource_list import GroupResourceList
+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.message_channel import MessageChannel
+from opal.models.message_channel_id_list import MessageChannelIDList
+from opal.models.message_channel_list import MessageChannelList
+from opal.models.message_channel_provider_enum import MessageChannelProviderEnum
+from opal.models.on_call_schedule import OnCallSchedule
+from opal.models.on_call_schedule_id_list import OnCallScheduleIDList
+from opal.models.on_call_schedule_list import OnCallScheduleList
+from opal.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum
+from opal.models.owner import Owner
+from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList
+from opal.models.paginated_event_list import PaginatedEventList
+from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList
+from opal.models.paginated_groups_list import PaginatedGroupsList
+from opal.models.paginated_owners_list import PaginatedOwnersList
+from opal.models.paginated_resources_list import PaginatedResourcesList
+from opal.models.paginated_tags_list import PaginatedTagsList
+from opal.models.paginated_uars_list import PaginatedUARsList
+from opal.models.paginated_users_list import PaginatedUsersList
+from opal.models.request import Request
+from opal.models.request_configuration import RequestConfiguration
+from opal.models.request_custom_field_response import RequestCustomFieldResponse
+from opal.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue
+from opal.models.request_list import RequestList
+from opal.models.request_status_enum import RequestStatusEnum
+from opal.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum
+from opal.models.requested_item import RequestedItem
+from opal.models.resource import Resource
+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_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
+from opal.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster
+from opal.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole
+from opal.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet
+from opal.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance
+from opal.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset
+from opal.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable
+from opal.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket
+from opal.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance
+from opal.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder
+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_sql_instance import ResourceRemoteInfoGcpSqlInstance
+from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo
+from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject
+from opal.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp
+from opal.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole
+from opal.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole
+from opal.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole
+from opal.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet
+from opal.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile
+from opal.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole
+from opal.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole
+from opal.models.resource_type_enum import ResourceTypeEnum
+from opal.models.resource_user import ResourceUser
+from opal.models.resource_user_access_status import ResourceUserAccessStatus
+from opal.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum
+from opal.models.resource_with_access_level import ResourceWithAccessLevel
+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.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.uar import UAR
+from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum
+from opal.models.uar_scope import UARScope
+from opal.models.update_configuration_template_info import UpdateConfigurationTemplateInfo
+from opal.models.update_group_binding_info import UpdateGroupBindingInfo
+from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList
+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_owner_info import UpdateOwnerInfo
+from opal.models.update_owner_info_list import UpdateOwnerInfoList
+from opal.models.update_resource_info import UpdateResourceInfo
+from opal.models.update_resource_info_list import UpdateResourceInfoList
+from opal.models.user import User
+from opal.models.user_hr_idp_status_enum import UserHrIdpStatusEnum
+from opal.models.user_id_list import UserIDList
+from opal.models.user_list import UserList
+from opal.models.visibility_info import VisibilityInfo
+from opal.models.visibility_type_enum import VisibilityTypeEnum
diff --git a/opal/models/add_group_resource_request.py b/opal/models/add_group_resource_request.py
new file mode 100644
index 0000000..74b59d3
--- /dev/null
+++ b/opal/models/add_group_resource_request.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+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.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["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 AddGroupResourceRequest 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 AddGroupResourceRequest from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "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/add_group_user_request.py b/opal/models/add_group_user_request.py
new file mode 100644
index 0000000..f97ea89
--- /dev/null
+++ b/opal/models/add_group_user_request.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, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AddGroupUserRequest(BaseModel):
+ """
+ AddGroupUserRequest
+ """ # noqa: E501
+ duration_minutes: StrictInt = Field(description="The duration for which the group 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 to this user. 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 AddGroupUserRequest 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 AddGroupUserRequest 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/add_resource_user_request.py b/opal/models/add_resource_user_request.py
new file mode 100644
index 0000000..426aff8
--- /dev/null
+++ b/opal/models/add_resource_user_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 AddResourceUserRequest(BaseModel):
+ """
+ AddResourceUserRequest
+ """ # 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 to this user. 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 AddResourceUserRequest 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 AddResourceUserRequest 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/app.py b/opal/models/app.py
new file mode 100644
index 0000000..2c66934
--- /dev/null
+++ b/opal/models/app.py
@@ -0,0 +1,110 @@
+# 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 opal.models.app_type_enum import AppTypeEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class App(BaseModel):
+ """
+ # App Object ### Description The `App` object is used to represent an app to an application. ### Usage Example List from the `GET Apps` endpoint.
+ """ # noqa: E501
+ app_id: StrictStr = Field(description="The ID of the app.")
+ name: StrictStr = Field(description="The name of the app.")
+ description: StrictStr = Field(description="A description of the app.")
+ admin_owner_id: StrictStr = Field(description="The ID of the owner of the app.")
+ app_type: AppTypeEnum
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["app_id", "name", "description", "admin_owner_id", "app_type"]
+
+ 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 App 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 App from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "app_id": obj.get("app_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "app_type": obj.get("app_type")
+ })
+ # 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/app_type_enum.py b/opal/models/app_type_enum.py
new file mode 100644
index 0000000..016269a
--- /dev/null
+++ b/opal/models/app_type_enum.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
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class AppTypeEnum(str, Enum):
+ """
+ The type of an app.
+ """
+
+ """
+ allowed enum values
+ """
+ ACTIVE_DIRECTORY = 'ACTIVE_DIRECTORY'
+ AZURE_AD = 'AZURE_AD'
+ AWS = 'AWS'
+ AWS_SSO = 'AWS_SSO'
+ CUSTOM = 'CUSTOM'
+ DUO = 'DUO'
+ GCP = 'GCP'
+ GIT_HUB = 'GIT_HUB'
+ GIT_LAB = 'GIT_LAB'
+ GOOGLE_GROUPS = 'GOOGLE_GROUPS'
+ GOOGLE_WORKSPACE = 'GOOGLE_WORKSPACE'
+ LDAP = 'LDAP'
+ MARIADB = 'MARIADB'
+ MONGO = 'MONGO'
+ MONGO_ATLAS = 'MONGO_ATLAS'
+ MYSQL = 'MYSQL'
+ OKTA_DIRECTORY = 'OKTA_DIRECTORY'
+ OPAL = 'OPAL'
+ PAGERDUTY = 'PAGERDUTY'
+ SALESFORCE = 'SALESFORCE'
+ TAILSCALE = 'TAILSCALE'
+ TELEPORT = 'TELEPORT'
+ WORKDAY = 'WORKDAY'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of AppTypeEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/apps_list.py b/opal/models/apps_list.py
new file mode 100644
index 0000000..61b448f
--- /dev/null
+++ b/opal/models/apps_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.app import App
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AppsList(BaseModel):
+ """
+ A list of apps.
+ """ # noqa: E501
+ apps: List[App]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["apps"]
+
+ 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 AppsList 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 apps (list)
+ _items = []
+ if self.apps:
+ for _item in self.apps:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['apps'] = _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 AppsList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "apps": [App.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") 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/aws_permission_set_metadata.py b/opal/models/aws_permission_set_metadata.py
new file mode 100644
index 0000000..b3c59ed
--- /dev/null
+++ b/opal/models/aws_permission_set_metadata.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
+from typing import Any, ClassVar, Dict, List
+from opal.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AwsPermissionSetMetadata(BaseModel):
+ """
+ Metadata for AWS Identity Center permission set.
+ """ # noqa: E501
+ aws_permission_set: AwsPermissionSetMetadataAwsPermissionSet
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["aws_permission_set"]
+
+ 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 AwsPermissionSetMetadata 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 aws_permission_set
+ if self.aws_permission_set:
+ _dict['aws_permission_set'] = self.aws_permission_set.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 AwsPermissionSetMetadata from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "aws_permission_set": AwsPermissionSetMetadataAwsPermissionSet.from_dict(obj["aws_permission_set"]) if obj.get("aws_permission_set") 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/aws_permission_set_metadata_aws_permission_set.py b/opal/models/aws_permission_set_metadata_aws_permission_set.py
new file mode 100644
index 0000000..e22d883
--- /dev/null
+++ b/opal/models/aws_permission_set_metadata_aws_permission_set.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class AwsPermissionSetMetadataAwsPermissionSet(BaseModel):
+ """
+ AwsPermissionSetMetadataAwsPermissionSet
+ """ # noqa: E501
+ arn: StrictStr = Field(description="The ARN of the permission set.")
+ account_id: StrictStr = Field(description="The ID of an AWS account to which this permission set is provisioned.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["arn", "account_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 AwsPermissionSetMetadataAwsPermissionSet 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 AwsPermissionSetMetadataAwsPermissionSet from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "arn": obj.get("arn"),
+ "account_id": obj.get("account_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/condition.py b/opal/models/condition.py
new file mode 100644
index 0000000..89eae92
--- /dev/null
+++ b/opal/models/condition.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Condition(BaseModel):
+ """
+ # Condition Object ### Description The `Condition` object is used to represent a condition. ### Usage Example Used to match request configurations to users in `RequestConfiguration`
+ """ # noqa: E501
+ group_ids: Optional[List[StrictStr]] = Field(default=None, description="The list of group IDs to match.")
+ role_remote_ids: Optional[List[StrictStr]] = Field(default=None, description="The list of role remote IDs to match.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_ids", "role_remote_ids"]
+
+ 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 Condition 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 Condition from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "group_ids": obj.get("group_ids"),
+ "role_remote_ids": obj.get("role_remote_ids")
+ })
+ # 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/configuration_template.py b/opal/models/configuration_template.py
new file mode 100644
index 0000000..f867248
--- /dev/null
+++ b/opal/models/configuration_template.py
@@ -0,0 +1,123 @@
+# 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 opal.models.visibility_info import VisibilityInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ConfigurationTemplate(BaseModel):
+ """
+ # Configuration Template Object ### Description The `ConfigurationTemplate` object is used to represent a configuration template. ### Usage Example Returned from the `GET Configuration Templates` endpoint.
+ """ # noqa: E501
+ 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
+ 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.")
+ 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"]
+
+ 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 ConfigurationTemplate 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 visibility
+ if self.visibility:
+ _dict['visibility'] = self.visibility.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 ConfigurationTemplate from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "configuration_template_id": obj.get("configuration_template_id"),
+ "name": obj.get("name"),
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "visibility": VisibilityInfo.from_dict(obj["visibility"]) if obj.get("visibility") is not None else None,
+ "linked_audit_message_channel_ids": obj.get("linked_audit_message_channel_ids"),
+ "request_configuration_id": obj.get("request_configuration_id"),
+ "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")
+ })
+ # 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_configuration_template_info.py b/opal/models/create_configuration_template_info.py
new file mode 100644
index 0000000..35a9979
--- /dev/null
+++ b/opal/models/create_configuration_template_info.py
@@ -0,0 +1,135 @@
+# 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 opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList
+from opal.models.request_configuration import RequestConfiguration
+from opal.models.visibility_info import VisibilityInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+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
+ 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.")
+ require_mfa_to_approve: StrictBool = Field(description="A bool representing whether or not to require MFA for reviewers to approve requests for this configuration template.")
+ 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
+ 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"]
+
+ 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 CreateConfigurationTemplateInfo 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 visibility
+ if self.visibility:
+ _dict['visibility'] = self.visibility.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())
+ _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()
+ # 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 CreateConfigurationTemplateInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "visibility": VisibilityInfo.from_dict(obj["visibility"]) if obj.get("visibility") is not None else None,
+ "linked_audit_message_channel_ids": obj.get("linked_audit_message_channel_ids"),
+ "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"),
+ "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
+ })
+ # 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_group_binding_info.py b/opal/models/create_group_binding_info.py
new file mode 100644
index 0000000..36f210f
--- /dev/null
+++ b/opal/models/create_group_binding_info.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, StrictStr
+from typing import Any, ClassVar, Dict, List
+from opal.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGroupBindingInfo(BaseModel):
+ """
+ # CreateGroupBindingInfo Object ### Description The `CreateGroupBindingInfo` object is used as an input to the CreateGroupBinding API.
+ """ # noqa: E501
+ source_group_id: StrictStr = Field(description="The ID of the source group.")
+ groups: List[CreateGroupBindingInfoGroupsInner] = Field(description="The list of groups.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["source_group_id", "groups"]
+
+ 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 CreateGroupBindingInfo 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 groups (list)
+ _items = []
+ if self.groups:
+ for _item in self.groups:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['groups'] = _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 CreateGroupBindingInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "source_group_id": obj.get("source_group_id"),
+ "groups": [CreateGroupBindingInfoGroupsInner.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") 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_group_binding_info_groups_inner.py b/opal/models/create_group_binding_info_groups_inner.py
new file mode 100644
index 0000000..0af54a6
--- /dev/null
+++ b/opal/models/create_group_binding_info_groups_inner.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGroupBindingInfoGroupsInner(BaseModel):
+ """
+ CreateGroupBindingInfoGroupsInner
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The ID of the group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 CreateGroupBindingInfoGroupsInner 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 CreateGroupBindingInfoGroupsInner 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")
+ })
+ # 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_group_info.py b/opal/models/create_group_info.py
new file mode 100644
index 0000000..100d8e0
--- /dev/null
+++ b/opal/models/create_group_info.py
@@ -0,0 +1,118 @@
+# 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 opal.models.group_remote_info import GroupRemoteInfo
+from opal.models.group_type_enum import GroupTypeEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateGroupInfo(BaseModel):
+ """
+ # CreateGroupInfo Object ### Description The `CreateGroupInfo` object is used to store creation info for a group. ### Usage Example Use in the `POST Groups` endpoint.
+ """ # noqa: E501
+ name: StrictStr = Field(description="The name of the remote group.")
+ description: Optional[StrictStr] = Field(default=None, description="A description of the remote group.")
+ group_type: GroupTypeEnum
+ app_id: StrictStr = Field(description="The ID of the app for the group.")
+ 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\" } ```")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["name", "description", "group_type", "app_id", "remote_info", "remote_group_id", "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 CreateGroupInfo 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 remote_info
+ if self.remote_info:
+ _dict['remote_info'] = self.remote_info.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 CreateGroupInfo 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"),
+ "description": obj.get("description"),
+ "group_type": obj.get("group_type"),
+ "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")
+ })
+ # 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_message_channel_info.py b/opal/models/create_message_channel_info.py
new file mode 100644
index 0000000..d74541d
--- /dev/null
+++ b/opal/models/create_message_channel_info.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
+from opal.models.message_channel_provider_enum import MessageChannelProviderEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateMessageChannelInfo(BaseModel):
+ """
+ # CreateMessageChannelInfo Object ### Description The `CreateMessageChannelInfo` object is used to describe the message channel object to be created.
+ """ # noqa: E501
+ third_party_provider: MessageChannelProviderEnum
+ remote_id: StrictStr = Field(description="The remote ID of the message channel")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["third_party_provider", "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 CreateMessageChannelInfo 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 CreateMessageChannelInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "third_party_provider": obj.get("third_party_provider"),
+ "remote_id": obj.get("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/create_on_call_schedule_info.py b/opal/models/create_on_call_schedule_info.py
new file mode 100644
index 0000000..005219b
--- /dev/null
+++ b/opal/models/create_on_call_schedule_info.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
+from opal.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateOnCallScheduleInfo(BaseModel):
+ """
+ # CreateOnCallScheduleInfo Object ### Description The `CreateOnCallScheduleInfo` object is used to describe the on call schedule object to be created.
+ """ # noqa: E501
+ third_party_provider: OnCallScheduleProviderEnum
+ remote_id: StrictStr = Field(description="The remote ID of the on call schedule")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["third_party_provider", "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 CreateOnCallScheduleInfo 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 CreateOnCallScheduleInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "third_party_provider": obj.get("third_party_provider"),
+ "remote_id": obj.get("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/create_owner_info.py b/opal/models/create_owner_info.py
new file mode 100644
index 0000000..9f8f37f
--- /dev/null
+++ b/opal/models/create_owner_info.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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateOwnerInfo(BaseModel):
+ """
+ # CreateOwnerInfo Object ### Description The `CreateOwnerInfo` object is used to store creation info for an owner. ### Usage Example Use in the `POST Owners` endpoint.
+ """ # noqa: E501
+ name: StrictStr = Field(description="The name of the owner.")
+ description: Optional[StrictStr] = Field(default=None, description="A description of the owner.")
+ access_request_escalation_period: Optional[StrictInt] = Field(default=None, description="The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy.")
+ user_ids: List[StrictStr] = Field(description="Users to add to the created owner. If setting a source_group_id this list must be empty.")
+ reviewer_message_channel_id: Optional[StrictStr] = Field(default=None, description="The message channel id for the reviewer channel.")
+ source_group_id: Optional[StrictStr] = Field(default=None, description="Sync this owner's user list with a source group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["name", "description", "access_request_escalation_period", "user_ids", "reviewer_message_channel_id", "source_group_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 CreateOwnerInfo 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 CreateOwnerInfo 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"),
+ "description": obj.get("description"),
+ "access_request_escalation_period": obj.get("access_request_escalation_period"),
+ "user_ids": obj.get("user_ids"),
+ "reviewer_message_channel_id": obj.get("reviewer_message_channel_id"),
+ "source_group_id": obj.get("source_group_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
new file mode 100644
index 0000000..3cc52c8
--- /dev/null
+++ b/opal/models/create_request_configuration_info_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, Field
+from typing import Any, ClassVar, Dict, List
+from opal.models.request_configuration import RequestConfiguration
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateRequestConfigurationInfoList(BaseModel):
+ """
+ # CreateRequestConfigurationInfoList Object ### Description The `CreateRequestConfigurationInfoList` object is used as an input to the CreateRequestConfigurations API. ### Formatting Requirements The `CreateRequestConfigurationInfoList` object must contain a list of `RequestConfiguration` objects. Exactly one default `RequestConfiguration` must be provided. A default `RequestConfiguration` is one with a `condition` of `null` and a `priority` of `0`. The default `RequestConfiguration` will be used when no other `RequestConfiguration` matches the request. Only one `RequestConfiguration` may be provided for each priority, and the priorities must be contiguous. For example, if there are two `RequestConfigurations` with priorities 0 and 2, there must be a `RequestConfiguration` with priority 1. To use the `condition` field, the `condition` must be a valid JSON object. The `condition` must be a JSON object with the key `group_ids` (more options may be added in the future), whose value is a list of group IDs. The `condition` will match if the user requesting access is a member of any of the groups in the list. Currently, we only support using a single group as a condition.
+ """ # noqa: E501
+ request_configurations: List[RequestConfiguration] = Field(description="A list of request configurations to create.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["request_configurations"]
+
+ 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 CreateRequestConfigurationInfoList 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 request_configurations (list)
+ _items = []
+ if self.request_configurations:
+ for _item in self.request_configurations:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['request_configurations'] = _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 CreateRequestConfigurationInfoList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "request_configurations": [RequestConfiguration.from_dict(_item) for _item in obj["request_configurations"]] if obj.get("request_configurations") 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_resource_info.py b/opal/models/create_resource_info.py
new file mode 100644
index 0000000..3aa2126
--- /dev/null
+++ b/opal/models/create_resource_info.py
@@ -0,0 +1,118 @@
+# 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 opal.models.resource_remote_info import ResourceRemoteInfo
+from opal.models.resource_type_enum import ResourceTypeEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateResourceInfo(BaseModel):
+ """
+ # CreateResourceInfo Object ### Description The `CreateResourceInfo` object is used to store creation info for a resource. ### Usage Example Use in the `POST Resources` endpoint.
+ """ # noqa: E501
+ name: StrictStr = Field(description="The name of the remote resource.")
+ description: Optional[StrictStr] = Field(default=None, description="A description of the remote resource.")
+ resource_type: ResourceTypeEnum
+ app_id: StrictStr = Field(description="The ID of the app for the resource.")
+ 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\" } ```")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["name", "description", "resource_type", "app_id", "remote_info", "remote_resource_id", "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 CreateResourceInfo 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 remote_info
+ if self.remote_info:
+ _dict['remote_info'] = self.remote_info.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 CreateResourceInfo 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"),
+ "description": obj.get("description"),
+ "resource_type": obj.get("resource_type"),
+ "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")
+ })
+ # 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_tag_info.py b/opal/models/create_tag_info.py
new file mode 100644
index 0000000..175b3be
--- /dev/null
+++ b/opal/models/create_tag_info.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateTagInfo(BaseModel):
+ """
+ # CreateTagInfo Object ### Description The `CreateTagInfo` object is used to represent configuration for a new tag. ### Usage Example Use in the `POST Tag` endpoint.
+ """ # noqa: E501
+ tag_key: StrictStr = Field(description="The key of the tag to create.")
+ tag_value: Optional[StrictStr] = Field(default=None, description="The value of the tag to create.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["tag_key", "tag_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 CreateTagInfo 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 CreateTagInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tag_key": obj.get("tag_key"),
+ "tag_value": obj.get("tag_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_uar_info.py b/opal/models/create_uar_info.py
new file mode 100644
index 0000000..d2971a8
--- /dev/null
+++ b/opal/models/create_uar_info.py
@@ -0,0 +1,119 @@
+# 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, 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
+from typing import Optional, Set
+from typing_extensions import Self
+
+class CreateUARInfo(BaseModel):
+ """
+ Information needed to start a user access review.
+ """ # noqa: E501
+ name: StrictStr = Field(description="The name of the UAR.")
+ reviewer_assignment_policy: UARReviewerAssignmentPolicyEnum
+ send_reviewer_assignment_notification: StrictBool = Field(description="A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False.")
+ 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.")
+ 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"]
+
+ 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 CreateUARInfo 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 uar_scope
+ if self.uar_scope:
+ _dict['uar_scope'] = self.uar_scope.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 CreateUARInfo 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"),
+ "reviewer_assignment_policy": obj.get("reviewer_assignment_policy"),
+ "send_reviewer_assignment_notification": obj.get("send_reviewer_assignment_notification"),
+ "deadline": obj.get("deadline"),
+ "time_zone": obj.get("time_zone"),
+ "self_review_allowed": obj.get("self_review_allowed"),
+ "uar_scope": UARScope.from_dict(obj["uar_scope"]) if obj.get("uar_scope") 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/entity_type_enum.py b/opal/models/entity_type_enum.py
new file mode 100644
index 0000000..bc53566
--- /dev/null
+++ b/opal/models/entity_type_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 EntityTypeEnum(str, Enum):
+ """
+ The type of an entity.
+ """
+
+ """
+ allowed enum values
+ """
+ GROUP = 'GROUP'
+ RESOURCE = 'RESOURCE'
+ USER = 'USER'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EntityTypeEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/event.py b/opal/models/event.py
new file mode 100644
index 0000000..ec080b9
--- /dev/null
+++ b/opal/models/event.py
@@ -0,0 +1,133 @@
+# 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.sub_event import SubEvent
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Event(BaseModel):
+ """
+ # Event Object ### Description The `Event` object is used to represent an event. ### Usage Example Fetch from the `LIST Events` endpoint.
+ """ # 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_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.")
+ actor_ip_address: Optional[StrictStr] = Field(default=None, description="The IP address of the event actor.")
+ api_token_name: Optional[StrictStr] = Field(default=None, description="The name of the API token used to create the event.")
+ api_token_preview: Optional[StrictStr] = Field(default=None, description="The preview of the API token used to create the event.")
+ sub_events: Optional[List[SubEvent]] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["event_id", "actor_user_id", "actor_name", "actor_email", "event_type", "created_at", "actor_ip_address", "api_token_name", "api_token_preview", "sub_events"]
+
+ 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 Event 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 sub_events (list)
+ _items = []
+ if self.sub_events:
+ for _item in self.sub_events:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['sub_events'] = _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 actor_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.actor_name is None and "actor_name" in self.model_fields_set:
+ _dict['actor_name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Event from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "event_id": obj.get("event_id"),
+ "actor_user_id": obj.get("actor_user_id"),
+ "actor_name": obj.get("actor_name"),
+ "actor_email": obj.get("actor_email"),
+ "event_type": obj.get("event_type"),
+ "created_at": obj.get("created_at"),
+ "actor_ip_address": obj.get("actor_ip_address"),
+ "api_token_name": obj.get("api_token_name"),
+ "api_token_preview": obj.get("api_token_preview"),
+ "sub_events": [SubEvent.from_dict(_item) for _item in obj["sub_events"]] if obj.get("sub_events") 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/group.py b/opal/models/group.py
new file mode 100644
index 0000000..2042200
--- /dev/null
+++ b/opal/models/group.py
@@ -0,0 +1,165 @@
+# 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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.group_remote_info import GroupRemoteInfo
+from opal.models.group_type_enum import GroupTypeEnum
+from opal.models.request_configuration import RequestConfiguration
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Group(BaseModel):
+ """
+ # Group Object ### Description The `Group` object is used to represent a group. ### Usage Example Update from the `UPDATE Groups` endpoint.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The ID of the group.")
+ app_id: Optional[StrictStr] = Field(default=None, description="The ID of the group's app.")
+ 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.")
+ 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
+ max_duration: Optional[StrictInt] = Field(default=None, description="The maximum duration for which the group can be requested (in minutes).")
+ recommended_duration: Optional[StrictInt] = Field(default=None, description="The recommended duration for which the group should be requested (in minutes). -1 represents an indefinite duration.")
+ require_manager_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the group require manager approval.")
+ require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the group require an access ticket.")
+ 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 group.")
+ require_mfa_to_request: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for requesting access to this group.")
+ auto_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to automatically approve requests to this group.")
+ request_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated request template.")
+ configuration_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated configuration template.")
+ group_binding_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated group binding.")
+ is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this group.")
+ request_configurations: Optional[List[RequestConfiguration]] = Field(default=None, description="A list of request configurations for this group.")
+ 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
+ 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"]
+
+ 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 Group 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 request_configurations (list)
+ _items = []
+ if self.request_configurations:
+ for _item in self.request_configurations:
+ if _item:
+ _items.append(_item.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())
+ _dict['request_configuration_list'] = _items
+ # 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()
+ # 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 Group 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"),
+ "app_id": obj.get("app_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "remote_id": obj.get("remote_id"),
+ "remote_name": obj.get("remote_name"),
+ "group_type": obj.get("group_type"),
+ "max_duration": obj.get("max_duration"),
+ "recommended_duration": obj.get("recommended_duration"),
+ "require_manager_approval": obj.get("require_manager_approval"),
+ "require_support_ticket": obj.get("require_support_ticket"),
+ "require_mfa_to_approve": obj.get("require_mfa_to_approve"),
+ "require_mfa_to_request": obj.get("require_mfa_to_request"),
+ "auto_approval": obj.get("auto_approval"),
+ "request_template_id": obj.get("request_template_id"),
+ "configuration_template_id": obj.get("configuration_template_id"),
+ "group_binding_id": obj.get("group_binding_id"),
+ "is_requestable": obj.get("is_requestable"),
+ "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
+ })
+ # 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/group_access_level.py b/opal/models/group_access_level.py
new file mode 100644
index 0000000..b22854c
--- /dev/null
+++ b/opal/models/group_access_level.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupAccessLevel(BaseModel):
+ """
+ # Access Level Object ### Description The `GroupAccessLevel` object is used to represent the level of access that a user has to a group or a group has to a group. The \"default\" access level is a `GroupAccessLevel` object whose fields are all empty strings. ### Usage Example View the `GroupAccessLevel` of a group/user or group/group pair to see the level of access granted to the group.
+ """ # 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.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["access_level_name", "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 GroupAccessLevel 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 GroupAccessLevel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "access_level_name": obj.get("access_level_name"),
+ "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/group_binding.py b/opal/models/group_binding.py
new file mode 100644
index 0000000..015dfd6
--- /dev/null
+++ b/opal/models/group_binding.py
@@ -0,0 +1,118 @@
+# 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
+from opal.models.group_binding_group import GroupBindingGroup
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupBinding(BaseModel):
+ """
+ # Group Binding Object ### Description The `GroupBinding` object is used to represent a group binding. ### Usage Example Get group bindings from the `GET Group Bindings` endpoint.
+ """ # noqa: E501
+ group_binding_id: StrictStr = Field(description="The ID of the group binding.")
+ created_by_id: StrictStr = Field(description="The ID of the user that created the group binding.")
+ created_at: datetime = Field(description="The date the group binding was created.")
+ source_group_id: StrictStr = Field(description="The ID of the source group.")
+ groups: List[GroupBindingGroup] = Field(description="The list of groups.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_binding_id", "created_by_id", "created_at", "source_group_id", "groups"]
+
+ 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 GroupBinding 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 groups (list)
+ _items = []
+ if self.groups:
+ for _item in self.groups:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['groups'] = _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 GroupBinding from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "group_binding_id": obj.get("group_binding_id"),
+ "created_by_id": obj.get("created_by_id"),
+ "created_at": obj.get("created_at"),
+ "source_group_id": obj.get("source_group_id"),
+ "groups": [GroupBindingGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") 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/group_binding_group.py b/opal/models/group_binding_group.py
new file mode 100644
index 0000000..bc67c16
--- /dev/null
+++ b/opal/models/group_binding_group.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
+from opal.models.group_type_enum import GroupTypeEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupBindingGroup(BaseModel):
+ """
+ # Group Binding Group Object ### Description The `GroupBindingGroup` object is used to represent a group binding group. ### Usage Example Get group binding groups from the `GET Group Bindings` endpoint.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The ID of the group.")
+ group_type: GroupTypeEnum
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_id", "group_type"]
+
+ 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 GroupBindingGroup 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 GroupBindingGroup 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"),
+ "group_type": obj.get("group_type")
+ })
+ # 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/group_remote_info.py b/opal/models/group_remote_info.py
new file mode 100644
index 0000000..cd74ada
--- /dev/null
+++ b/opal/models/group_remote_info.py
@@ -0,0 +1,153 @@
+# 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.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup
+from opal.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group
+from opal.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup
+from opal.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup
+from opal.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam
+from opal.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup
+from opal.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup
+from opal.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup
+from opal.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfo(BaseModel):
+ """
+ Information that defines the remote group. This replaces the deprecated remote_id and metadata fields.
+ """ # noqa: E501
+ active_directory_group: Optional[GroupRemoteInfoActiveDirectoryGroup] = None
+ github_team: Optional[GroupRemoteInfoGithubTeam] = None
+ gitlab_group: Optional[GroupRemoteInfoGitlabGroup] = None
+ google_group: Optional[GroupRemoteInfoGoogleGroup] = None
+ ldap_group: Optional[GroupRemoteInfoLdapGroup] = None
+ okta_group: Optional[GroupRemoteInfoOktaGroup] = None
+ duo_group: Optional[GroupRemoteInfoDuoGroup] = None
+ azure_ad_security_group: Optional[GroupRemoteInfoAzureAdSecurityGroup] = None
+ azure_ad_microsoft_365_group: Optional[GroupRemoteInfoAzureAdMicrosoft365Group] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["active_directory_group", "github_team", "gitlab_group", "google_group", "ldap_group", "okta_group", "duo_group", "azure_ad_security_group", "azure_ad_microsoft_365_group"]
+
+ 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 GroupRemoteInfo 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 active_directory_group
+ if self.active_directory_group:
+ _dict['active_directory_group'] = self.active_directory_group.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of github_team
+ if self.github_team:
+ _dict['github_team'] = self.github_team.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gitlab_group
+ if self.gitlab_group:
+ _dict['gitlab_group'] = self.gitlab_group.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of google_group
+ if self.google_group:
+ _dict['google_group'] = self.google_group.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of ldap_group
+ if self.ldap_group:
+ _dict['ldap_group'] = self.ldap_group.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of okta_group
+ if self.okta_group:
+ _dict['okta_group'] = self.okta_group.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of duo_group
+ if self.duo_group:
+ _dict['duo_group'] = self.duo_group.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of azure_ad_security_group
+ if self.azure_ad_security_group:
+ _dict['azure_ad_security_group'] = self.azure_ad_security_group.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of azure_ad_microsoft_365_group
+ if self.azure_ad_microsoft_365_group:
+ _dict['azure_ad_microsoft_365_group'] = self.azure_ad_microsoft_365_group.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 GroupRemoteInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "active_directory_group": GroupRemoteInfoActiveDirectoryGroup.from_dict(obj["active_directory_group"]) if obj.get("active_directory_group") is not None else None,
+ "github_team": GroupRemoteInfoGithubTeam.from_dict(obj["github_team"]) if obj.get("github_team") is not None else None,
+ "gitlab_group": GroupRemoteInfoGitlabGroup.from_dict(obj["gitlab_group"]) if obj.get("gitlab_group") is not None else None,
+ "google_group": GroupRemoteInfoGoogleGroup.from_dict(obj["google_group"]) if obj.get("google_group") is not None else None,
+ "ldap_group": GroupRemoteInfoLdapGroup.from_dict(obj["ldap_group"]) if obj.get("ldap_group") is not None else None,
+ "okta_group": GroupRemoteInfoOktaGroup.from_dict(obj["okta_group"]) if obj.get("okta_group") is not None else None,
+ "duo_group": GroupRemoteInfoDuoGroup.from_dict(obj["duo_group"]) if obj.get("duo_group") is not None else None,
+ "azure_ad_security_group": GroupRemoteInfoAzureAdSecurityGroup.from_dict(obj["azure_ad_security_group"]) if obj.get("azure_ad_security_group") is not None else None,
+ "azure_ad_microsoft_365_group": GroupRemoteInfoAzureAdMicrosoft365Group.from_dict(obj["azure_ad_microsoft_365_group"]) if obj.get("azure_ad_microsoft_365_group") 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/group_remote_info_active_directory_group.py b/opal/models/group_remote_info_active_directory_group.py
new file mode 100644
index 0000000..43e3736
--- /dev/null
+++ b/opal/models/group_remote_info_active_directory_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoActiveDirectoryGroup(BaseModel):
+ """
+ Remote info for Active Directory group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the Google group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoActiveDirectoryGroup 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 GroupRemoteInfoActiveDirectoryGroup 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")
+ })
+ # 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/group_remote_info_azure_ad_microsoft365_group.py b/opal/models/group_remote_info_azure_ad_microsoft365_group.py
new file mode 100644
index 0000000..ceff6be
--- /dev/null
+++ b/opal/models/group_remote_info_azure_ad_microsoft365_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoAzureAdMicrosoft365Group(BaseModel):
+ """
+ Remote info for Azure AD Microsoft 365 group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the Azure AD Microsoft 365 group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoAzureAdMicrosoft365Group 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 GroupRemoteInfoAzureAdMicrosoft365Group 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")
+ })
+ # 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/group_remote_info_azure_ad_security_group.py b/opal/models/group_remote_info_azure_ad_security_group.py
new file mode 100644
index 0000000..2f79ca1
--- /dev/null
+++ b/opal/models/group_remote_info_azure_ad_security_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoAzureAdSecurityGroup(BaseModel):
+ """
+ Remote info for Azure AD Security group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the Azure AD Security group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoAzureAdSecurityGroup 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 GroupRemoteInfoAzureAdSecurityGroup 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")
+ })
+ # 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/group_remote_info_duo_group.py b/opal/models/group_remote_info_duo_group.py
new file mode 100644
index 0000000..8469055
--- /dev/null
+++ b/opal/models/group_remote_info_duo_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoDuoGroup(BaseModel):
+ """
+ Remote info for Duo Security group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the Duo Security group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoDuoGroup 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 GroupRemoteInfoDuoGroup 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")
+ })
+ # 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/group_remote_info_github_team.py b/opal/models/group_remote_info_github_team.py
new file mode 100644
index 0000000..c1c6f7d
--- /dev/null
+++ b/opal/models/group_remote_info_github_team.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoGithubTeam(BaseModel):
+ """
+ Remote info for GitHub team.
+ """ # noqa: E501
+ team_id: Optional[StrictStr] = Field(default=None, description="The id of the GitHub team.")
+ team_slug: StrictStr = Field(description="The slug of the GitHub team.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["team_id", "team_slug"]
+
+ 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 GroupRemoteInfoGithubTeam 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 GroupRemoteInfoGithubTeam from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "team_id": obj.get("team_id"),
+ "team_slug": obj.get("team_slug")
+ })
+ # 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/group_remote_info_gitlab_group.py b/opal/models/group_remote_info_gitlab_group.py
new file mode 100644
index 0000000..7e8e1cd
--- /dev/null
+++ b/opal/models/group_remote_info_gitlab_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoGitlabGroup(BaseModel):
+ """
+ Remote info for Gitlab group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the Gitlab group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoGitlabGroup 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 GroupRemoteInfoGitlabGroup 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")
+ })
+ # 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/group_remote_info_google_group.py b/opal/models/group_remote_info_google_group.py
new file mode 100644
index 0000000..22629f2
--- /dev/null
+++ b/opal/models/group_remote_info_google_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoGoogleGroup(BaseModel):
+ """
+ Remote info for Google group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the Google group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoGoogleGroup 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 GroupRemoteInfoGoogleGroup 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")
+ })
+ # 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/group_remote_info_ldap_group.py b/opal/models/group_remote_info_ldap_group.py
new file mode 100644
index 0000000..290a72f
--- /dev/null
+++ b/opal/models/group_remote_info_ldap_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoLdapGroup(BaseModel):
+ """
+ Remote info for LDAP group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the LDAP group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoLdapGroup 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 GroupRemoteInfoLdapGroup 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")
+ })
+ # 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/group_remote_info_okta_group.py b/opal/models/group_remote_info_okta_group.py
new file mode 100644
index 0000000..c2936ca
--- /dev/null
+++ b/opal/models/group_remote_info_okta_group.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupRemoteInfoOktaGroup(BaseModel):
+ """
+ Remote info for Okta Directory group.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The id of the Okta Directory group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_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 GroupRemoteInfoOktaGroup 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 GroupRemoteInfoOktaGroup 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")
+ })
+ # 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/group_resource.py b/opal/models/group_resource.py
new file mode 100644
index 0000000..b329735
--- /dev/null
+++ b/opal/models/group_resource.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, Field, StrictStr
+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
+
+class GroupResource(BaseModel):
+ """
+ # GroupResource Object ### Description The `GroupResource` object is used to represent a relationship between a group and a resource.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The ID of the group.")
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ access_level: ResourceAccessLevel
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_id", "resource_id", "access_level"]
+
+ 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 GroupResource 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 GroupResource 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"),
+ "resource_id": obj.get("resource_id"),
+ "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") 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/group_resource_list.py b/opal/models/group_resource_list.py
new file mode 100644
index 0000000..611ac73
--- /dev/null
+++ b/opal/models/group_resource_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.group_resource import GroupResource
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupResourceList(BaseModel):
+ """
+ GroupResourceList
+ """ # noqa: E501
+ group_resources: List[GroupResource]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_resources"]
+
+ 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 GroupResourceList 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 group_resources (list)
+ _items = []
+ if self.group_resources:
+ for _item in self.group_resources:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['group_resources'] = _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 GroupResourceList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "group_resources": [GroupResource.from_dict(_item) for _item in obj["group_resources"]] if obj.get("group_resources") 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/group_type_enum.py b/opal/models/group_type_enum.py
new file mode 100644
index 0000000..f4000c2
--- /dev/null
+++ b/opal/models/group_type_enum.py
@@ -0,0 +1,47 @@
+# 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 GroupTypeEnum(str, Enum):
+ """
+ The type of the group.
+ """
+
+ """
+ allowed enum values
+ """
+ ACTIVE_DIRECTORY_GROUP = 'ACTIVE_DIRECTORY_GROUP'
+ AWS_SSO_GROUP = 'AWS_SSO_GROUP'
+ DUO_GROUP = 'DUO_GROUP'
+ GIT_HUB_TEAM = 'GIT_HUB_TEAM'
+ GIT_LAB_GROUP = 'GIT_LAB_GROUP'
+ GOOGLE_GROUPS_GROUP = 'GOOGLE_GROUPS_GROUP'
+ LDAP_GROUP = 'LDAP_GROUP'
+ OKTA_GROUP = 'OKTA_GROUP'
+ OPAL_GROUP = 'OPAL_GROUP'
+ AZURE_AD_SECURITY_GROUP = 'AZURE_AD_SECURITY_GROUP'
+ AZURE_AD_MICROSOFT_365_GROUP = 'AZURE_AD_MICROSOFT_365_GROUP'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GroupTypeEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/group_user.py b/opal/models/group_user.py
new file mode 100644
index 0000000..d952c85
--- /dev/null
+++ b/opal/models/group_user.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, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.group_access_level import GroupAccessLevel
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupUser(BaseModel):
+ """
+ # Group Access User Object ### Description The `GroupAccessUser` object is used to represent a user with access to a group. ### Usage Example Fetch from the `LIST GroupUsers` endpoint.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The ID of the group.")
+ user_id: StrictStr = Field(description="The ID of the user.")
+ 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.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_id", "user_id", "access_level", "full_name", "email", "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 GroupUser 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
+
+ # 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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of GroupUser 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"),
+ "user_id": obj.get("user_id"),
+ "access_level": GroupAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None,
+ "full_name": obj.get("full_name"),
+ "email": obj.get("email"),
+ "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/group_user_list.py b/opal/models/group_user_list.py
new file mode 100644
index 0000000..53f14d1
--- /dev/null
+++ b/opal/models/group_user_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.group_user import GroupUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class GroupUserList(BaseModel):
+ """
+ GroupUserList
+ """ # noqa: E501
+ results: Optional[List[GroupUser]] = 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 GroupUserList 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 in self.results:
+ if _item:
+ _items.append(_item.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 GroupUserList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "results": [GroupUser.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/message_channel.py b/opal/models/message_channel.py
new file mode 100644
index 0000000..162a9da
--- /dev/null
+++ b/opal/models/message_channel.py
@@ -0,0 +1,110 @@
+# 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 opal.models.message_channel_provider_enum import MessageChannelProviderEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MessageChannel(BaseModel):
+ """
+ # MessageChannel Object ### Description The `MessageChannel` object is used to represent a message channel. ### Usage Example Update a groups message channel from the `UPDATE Groups` endpoint.
+ """ # noqa: E501
+ message_channel_id: StrictStr = Field(description="The ID of the message channel.")
+ third_party_provider: Optional[MessageChannelProviderEnum] = None
+ remote_id: Optional[StrictStr] = Field(default=None, description="The remote ID of the message channel")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the message channel.")
+ is_private: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not the message channel is private.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["message_channel_id", "third_party_provider", "remote_id", "name", "is_private"]
+
+ 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 MessageChannel 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 MessageChannel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "message_channel_id": obj.get("message_channel_id"),
+ "third_party_provider": obj.get("third_party_provider"),
+ "remote_id": obj.get("remote_id"),
+ "name": obj.get("name"),
+ "is_private": obj.get("is_private")
+ })
+ # 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_id_list.py b/opal/models/message_channel_id_list.py
new file mode 100644
index 0000000..5658eba
--- /dev/null
+++ b/opal/models/message_channel_id_list.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
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MessageChannelIDList(BaseModel):
+ """
+ A list of message channel IDs.
+ """ # noqa: E501
+ message_channel_ids: List[StrictStr]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["message_channel_ids"]
+
+ 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 MessageChannelIDList 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 MessageChannelIDList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "message_channel_ids": obj.get("message_channel_ids")
+ })
+ # 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
new file mode 100644
index 0000000..f4ddb2e
--- /dev/null
+++ b/opal/models/message_channel_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.message_channel import MessageChannel
+from typing import Optional, Set
+from typing_extensions import Self
+
+class MessageChannelList(BaseModel):
+ """
+ MessageChannelList
+ """ # noqa: E501
+ channels: List[MessageChannel]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["channels"]
+
+ 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 MessageChannelList 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 channels (list)
+ _items = []
+ if self.channels:
+ for _item in self.channels:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['channels'] = _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 MessageChannelList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "channels": [MessageChannel.from_dict(_item) for _item in obj["channels"]] if obj.get("channels") 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_provider_enum.py b/opal/models/message_channel_provider_enum.py
new file mode 100644
index 0000000..1148492
--- /dev/null
+++ b/opal/models/message_channel_provider_enum.py
@@ -0,0 +1,37 @@
+# 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 MessageChannelProviderEnum(str, Enum):
+ """
+ The third party provider of the message channel.
+ """
+
+ """
+ allowed enum values
+ """
+ SLACK = 'SLACK'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of MessageChannelProviderEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/on_call_schedule.py b/opal/models/on_call_schedule.py
new file mode 100644
index 0000000..5816957
--- /dev/null
+++ b/opal/models/on_call_schedule.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class OnCallSchedule(BaseModel):
+ """
+ # OnCallSchedule Object ### Description The `OnCallSchedule` object is used to represent an on call schedule. ### Usage Example Update a groups on call schedule from the `UPDATE Groups` endpoint.
+ """ # noqa: E501
+ on_call_schedule_id: Optional[StrictStr] = Field(default=None, description="The ID of the on-call schedule.")
+ third_party_provider: Optional[OnCallScheduleProviderEnum] = None
+ remote_id: Optional[StrictStr] = Field(default=None, description="The remote ID of the on call schedule")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the on call schedule.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["on_call_schedule_id", "third_party_provider", "remote_id", "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 OnCallSchedule 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 OnCallSchedule from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "on_call_schedule_id": obj.get("on_call_schedule_id"),
+ "third_party_provider": obj.get("third_party_provider"),
+ "remote_id": obj.get("remote_id"),
+ "name": obj.get("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/on_call_schedule_id_list.py b/opal/models/on_call_schedule_id_list.py
new file mode 100644
index 0000000..34257ab
--- /dev/null
+++ b/opal/models/on_call_schedule_id_list.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
+from typing import Optional, Set
+from typing_extensions import Self
+
+class OnCallScheduleIDList(BaseModel):
+ """
+ A list of on call schedule Opal UUIDs. To get the matching remote IDs, use the /on-call-schedules endpoints.
+ """ # noqa: E501
+ on_call_schedule_ids: List[StrictStr]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["on_call_schedule_ids"]
+
+ 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 OnCallScheduleIDList 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 OnCallScheduleIDList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "on_call_schedule_ids": obj.get("on_call_schedule_ids")
+ })
+ # 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/on_call_schedule_list.py b/opal/models/on_call_schedule_list.py
new file mode 100644
index 0000000..d0e20de
--- /dev/null
+++ b/opal/models/on_call_schedule_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.on_call_schedule import OnCallSchedule
+from typing import Optional, Set
+from typing_extensions import Self
+
+class OnCallScheduleList(BaseModel):
+ """
+ OnCallScheduleList
+ """ # noqa: E501
+ on_call_schedules: List[OnCallSchedule]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["on_call_schedules"]
+
+ 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 OnCallScheduleList 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 on_call_schedules (list)
+ _items = []
+ if self.on_call_schedules:
+ for _item in self.on_call_schedules:
+ if _item:
+ _items.append(_item.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:
+ 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 OnCallScheduleList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "on_call_schedules": [OnCallSchedule.from_dict(_item) for _item in obj["on_call_schedules"]] if obj.get("on_call_schedules") 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/on_call_schedule_provider_enum.py b/opal/models/on_call_schedule_provider_enum.py
new file mode 100644
index 0000000..630b60d
--- /dev/null
+++ b/opal/models/on_call_schedule_provider_enum.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
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class OnCallScheduleProviderEnum(str, Enum):
+ """
+ The third party provider of the on call schedule.
+ """
+
+ """
+ allowed enum values
+ """
+ OPSGENIE = 'OPSGENIE'
+ PAGER_DUTY = 'PAGER_DUTY'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of OnCallScheduleProviderEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/owner.py b/opal/models/owner.py
new file mode 100644
index 0000000..7b681c3
--- /dev/null
+++ b/opal/models/owner.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 pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Owner(BaseModel):
+ """
+ # Owner Object ### Description The `Owner` object is used to represent an owner.
+ """ # noqa: E501
+ owner_id: StrictStr = Field(description="The ID of the owner.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the owner.")
+ description: Optional[StrictStr] = Field(default=None, description="A description of the owner.")
+ access_request_escalation_period: Optional[StrictInt] = Field(default=None, description="The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy.")
+ reviewer_message_channel_id: Optional[StrictStr] = None
+ source_group_id: Optional[StrictStr] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["owner_id", "name", "description", "access_request_escalation_period", "reviewer_message_channel_id", "source_group_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 Owner 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
+
+ # 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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of Owner from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "owner_id": obj.get("owner_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "access_request_escalation_period": obj.get("access_request_escalation_period"),
+ "reviewer_message_channel_id": obj.get("reviewer_message_channel_id"),
+ "source_group_id": obj.get("source_group_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/paginated_configuration_template_list.py b/opal/models/paginated_configuration_template_list.py
new file mode 100644
index 0000000..d37b9c3
--- /dev/null
+++ b/opal/models/paginated_configuration_template_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.configuration_template import ConfigurationTemplate
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedConfigurationTemplateList(BaseModel):
+ """
+ # PaginatedConfigurationTemplateList Object ### Description The `PaginatedConfigurationTemplateList` object is used to store a list of configuration templates. ### Usage Example Returned from the `GET Configuration Templates` endpoint.
+ """ # noqa: E501
+ results: Optional[List[ConfigurationTemplate]] = 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 PaginatedConfigurationTemplateList 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 in self.results:
+ if _item:
+ _items.append(_item.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 PaginatedConfigurationTemplateList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "results": [ConfigurationTemplate.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/paginated_event_list.py b/opal/models/paginated_event_list.py
new file mode 100644
index 0000000..ef66e28
--- /dev/null
+++ b/opal/models/paginated_event_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.event import Event
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedEventList(BaseModel):
+ """
+ PaginatedEventList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: Optional[List[Event]] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedEventList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedEventList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [Event.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/paginated_group_bindings_list.py b/opal/models/paginated_group_bindings_list.py
new file mode 100644
index 0000000..ca2f5c1
--- /dev/null
+++ b/opal/models/paginated_group_bindings_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.group_binding import GroupBinding
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedGroupBindingsList(BaseModel):
+ """
+ PaginatedGroupBindingsList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: List[GroupBinding]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedGroupBindingsList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedGroupBindingsList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [GroupBinding.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/paginated_groups_list.py b/opal/models/paginated_groups_list.py
new file mode 100644
index 0000000..820a956
--- /dev/null
+++ b/opal/models/paginated_groups_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.group import Group
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedGroupsList(BaseModel):
+ """
+ PaginatedGroupsList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: List[Group]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedGroupsList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedGroupsList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [Group.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/paginated_owners_list.py b/opal/models/paginated_owners_list.py
new file mode 100644
index 0000000..15a0b1a
--- /dev/null
+++ b/opal/models/paginated_owners_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.owner import Owner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedOwnersList(BaseModel):
+ """
+ PaginatedOwnersList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: List[Owner]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedOwnersList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedOwnersList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [Owner.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/paginated_resources_list.py b/opal/models/paginated_resources_list.py
new file mode 100644
index 0000000..21a829f
--- /dev/null
+++ b/opal/models/paginated_resources_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.resource import Resource
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedResourcesList(BaseModel):
+ """
+ PaginatedResourcesList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: List[Resource]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedResourcesList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedResourcesList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [Resource.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/paginated_tags_list.py b/opal/models/paginated_tags_list.py
new file mode 100644
index 0000000..01e1428
--- /dev/null
+++ b/opal/models/paginated_tags_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.tag import Tag
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedTagsList(BaseModel):
+ """
+ PaginatedTagsList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: List[Tag]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedTagsList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedTagsList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [Tag.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/paginated_uars_list.py b/opal/models/paginated_uars_list.py
new file mode 100644
index 0000000..a2e6912
--- /dev/null
+++ b/opal/models/paginated_uars_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.uar import UAR
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedUARsList(BaseModel):
+ """
+ A list of UARs.
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: List[UAR]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedUARsList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedUARsList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [UAR.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/paginated_users_list.py b/opal/models/paginated_users_list.py
new file mode 100644
index 0000000..cdf7c0e
--- /dev/null
+++ b/opal/models/paginated_users_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.user import User
+from typing import Optional, Set
+from typing_extensions import Self
+
+class PaginatedUsersList(BaseModel):
+ """
+ PaginatedUsersList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: List[User]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 PaginatedUsersList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of PaginatedUsersList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [User.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/request.py b/opal/models/request.py
new file mode 100644
index 0000000..5332e6a
--- /dev/null
+++ b/opal/models/request.py
@@ -0,0 +1,137 @@
+# 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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.request_custom_field_response import RequestCustomFieldResponse
+from opal.models.request_status_enum import RequestStatusEnum
+from opal.models.requested_item import RequestedItem
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Request(BaseModel):
+ """
+ # Request Object ### Description The `Request` object is used to represent a request. ### Usage Example Returned from the `GET Requests` endpoint.
+ """ # noqa: E501
+ id: StrictStr = Field(description="The unique identifier of the request.")
+ 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
+ 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"]
+
+ 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 Request 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 requested_items_list (list)
+ _items = []
+ if self.requested_items_list:
+ for _item in self.requested_items_list:
+ if _item:
+ _items.append(_item.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())
+ _dict['custom_fields_responses'] = _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 Request 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"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "requester_id": obj.get("requester_id"),
+ "target_user_id": obj.get("target_user_id"),
+ "status": obj.get("status"),
+ "reason": obj.get("reason"),
+ "duration_minutes": obj.get("duration_minutes"),
+ "requested_items_list": [RequestedItem.from_dict(_item) for _item in obj["requested_items_list"]] if obj.get("requested_items_list") is not None else None,
+ "custom_fields_responses": [RequestCustomFieldResponse.from_dict(_item) for _item in obj["custom_fields_responses"]] if obj.get("custom_fields_responses") 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/request_configuration.py b/opal/models/request_configuration.py
new file mode 100644
index 0000000..29c2916
--- /dev/null
+++ b/opal/models/request_configuration.py
@@ -0,0 +1,131 @@
+# 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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.condition import Condition
+from opal.models.reviewer_stage import ReviewerStage
+from typing import Optional, Set
+from typing_extensions import Self
+
+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
+ 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.")
+ max_duration_minutes: Optional[StrictInt] = Field(default=None, description="The maximum duration for which the resource can be requested (in minutes).")
+ recommended_duration_minutes: Optional[StrictInt] = Field(default=None, description="The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration.")
+ require_support_ticket: StrictBool = Field(description="A bool representing whether or not access requests to the resource require an access ticket.")
+ request_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated request template.")
+ reviewer_stages: List[ReviewerStage] = Field(description="The list of reviewer stages for the request configuration.")
+ priority: StrictInt = Field(description="The priority of the request configuration.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["condition", "allow_requests", "auto_approval", "require_mfa_to_request", "max_duration_minutes", "recommended_duration_minutes", "require_support_ticket", "request_template_id", "reviewer_stages", "priority"]
+
+ 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 RequestConfiguration 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 condition
+ if self.condition:
+ _dict['condition'] = self.condition.to_dict()
+ # 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())
+ _dict['reviewer_stages'] = _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 RequestConfiguration from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "condition": Condition.from_dict(obj["condition"]) if obj.get("condition") is not None else None,
+ "allow_requests": obj.get("allow_requests"),
+ "auto_approval": obj.get("auto_approval"),
+ "require_mfa_to_request": obj.get("require_mfa_to_request"),
+ "max_duration_minutes": obj.get("max_duration_minutes"),
+ "recommended_duration_minutes": obj.get("recommended_duration_minutes"),
+ "require_support_ticket": obj.get("require_support_ticket"),
+ "request_template_id": obj.get("request_template_id"),
+ "reviewer_stages": [ReviewerStage.from_dict(_item) for _item in obj["reviewer_stages"]] if obj.get("reviewer_stages") is not None else None,
+ "priority": obj.get("priority")
+ })
+ # 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/request_custom_field_response.py b/opal/models/request_custom_field_response.py
new file mode 100644
index 0000000..7362747
--- /dev/null
+++ b/opal/models/request_custom_field_response.py
@@ -0,0 +1,110 @@
+# 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_custom_field_response_field_value import RequestCustomFieldResponseFieldValue
+from opal.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RequestCustomFieldResponse(BaseModel):
+ """
+ RequestCustomFieldResponse
+ """ # noqa: E501
+ field_name: StrictStr
+ field_type: RequestTemplateCustomFieldTypeEnum
+ field_value: RequestCustomFieldResponseFieldValue
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["field_name", "field_type", "field_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 RequestCustomFieldResponse 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 field_value
+ if self.field_value:
+ _dict['field_value'] = self.field_value.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 RequestCustomFieldResponse from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "field_name": obj.get("field_name"),
+ "field_type": obj.get("field_type"),
+ "field_value": RequestCustomFieldResponseFieldValue.from_dict(obj["field_value"]) if obj.get("field_value") 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/request_custom_field_response_field_value.py b/opal/models/request_custom_field_response_field_value.py
new file mode 100644
index 0000000..e237f3d
--- /dev/null
+++ b/opal/models/request_custom_field_response_field_value.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 json
+import pprint
+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_extensions import Literal, Self
+
+REQUESTCUSTOMFIELDRESPONSEFIELDVALUE_ONE_OF_SCHEMAS = ["bool", "str"]
+
+class RequestCustomFieldResponseFieldValue(BaseModel):
+ """
+ RequestCustomFieldResponseFieldValue
+ """
+ # data type: str
+ oneof_schema_1_validator: Optional[StrictStr] = None
+ # 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"])
+
+ model_config = ConfigDict(
+ validate_assignment=True,
+ protected_namespaces=(),
+ )
+
+
+ def __init__(self, *args, **kwargs) -> None:
+ if args:
+ if len(args) > 1:
+ raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
+ if kwargs:
+ raise ValueError("If a position argument is used, keyword arguments cannot be used.")
+ super().__init__(actual_instance=args[0])
+ else:
+ super().__init__(**kwargs)
+
+ @field_validator('actual_instance')
+ def actual_instance_must_validate_oneof(cls, v):
+ instance = RequestCustomFieldResponseFieldValue.model_construct()
+ error_messages = []
+ match = 0
+ # validate data type: str
+ try:
+ instance.oneof_schema_1_validator = v
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # validate data type: bool
+ try:
+ instance.oneof_schema_2_validator = v
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when setting `actual_instance` in RequestCustomFieldResponseFieldValue with oneOf schemas: bool, str. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when setting `actual_instance` in RequestCustomFieldResponseFieldValue with oneOf schemas: bool, str. Details: " + ", ".join(error_messages))
+ else:
+ return v
+
+ @classmethod
+ def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
+ return cls.from_json(json.dumps(obj))
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Returns the object represented by the json string"""
+ instance = cls.model_construct()
+ error_messages = []
+ match = 0
+
+ # deserialize data into str
+ try:
+ # validation
+ instance.oneof_schema_1_validator = json.loads(json_str)
+ # assign value to actual_instance
+ instance.actual_instance = instance.oneof_schema_1_validator
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+ # deserialize data into bool
+ try:
+ # validation
+ instance.oneof_schema_2_validator = json.loads(json_str)
+ # assign value to actual_instance
+ instance.actual_instance = instance.oneof_schema_2_validator
+ match += 1
+ except (ValidationError, ValueError) as e:
+ error_messages.append(str(e))
+
+ if match > 1:
+ # more than 1 match
+ raise ValueError("Multiple matches found when deserializing the JSON string into RequestCustomFieldResponseFieldValue with oneOf schemas: bool, str. Details: " + ", ".join(error_messages))
+ elif match == 0:
+ # no match
+ raise ValueError("No match found when deserializing the JSON string into RequestCustomFieldResponseFieldValue with oneOf schemas: bool, str. Details: " + ", ".join(error_messages))
+ else:
+ return instance
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the actual instance"""
+ if self.actual_instance is None:
+ return "null"
+
+ if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
+ return self.actual_instance.to_json()
+ else:
+ return json.dumps(self.actual_instance)
+
+ def to_dict(self) -> Optional[Union[Dict[str, Any], bool, str]]:
+ """Returns the dict representation of the actual instance"""
+ if self.actual_instance is None:
+ return None
+
+ if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
+ return self.actual_instance.to_dict()
+ else:
+ # primitive type
+ return self.actual_instance
+
+ def to_str(self) -> str:
+ """Returns the string representation of the actual instance"""
+ return pprint.pformat(self.model_dump())
+
+
diff --git a/opal/models/request_list.py b/opal/models/request_list.py
new file mode 100644
index 0000000..d9fed00
--- /dev/null
+++ b/opal/models/request_list.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, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.request import Request
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RequestList(BaseModel):
+ """
+ # Request List ### Description The `RequestList` object is used to represent a list of requests. ### Usage Example Returned from the `GET Requests` endpoint.
+ """ # noqa: E501
+ requests: Optional[List[Request]] = Field(default=None, description="The list of requests.")
+ cursor: Optional[StrictStr] = Field(default=None, description="The cursor to use in the next request to get the next page of results.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["requests", "cursor"]
+
+ 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 RequestList 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 requests (list)
+ _items = []
+ if self.requests:
+ for _item in self.requests:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['requests'] = _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 RequestList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "requests": [Request.from_dict(_item) for _item in obj["requests"]] if obj.get("requests") is not None else None,
+ "cursor": obj.get("cursor")
+ })
+ # 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/request_status_enum.py b/opal/models/request_status_enum.py
new file mode 100644
index 0000000..efca42c
--- /dev/null
+++ b/opal/models/request_status_enum.py
@@ -0,0 +1,40 @@
+# 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 RequestStatusEnum(str, Enum):
+ """
+ # Request Status ### Description The `RequestStatus` enum is used to represent the status of a request. ### Usage Example Returned from the `GET Requests` endpoint.
+ """
+
+ """
+ allowed enum values
+ """
+ PENDING = 'pending'
+ APPROVED = 'approved'
+ DENIED = 'denied'
+ CANCELED = 'canceled'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of RequestStatusEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/request_template_custom_field_type_enum.py b/opal/models/request_template_custom_field_type_enum.py
new file mode 100644
index 0000000..3dc9fd8
--- /dev/null
+++ b/opal/models/request_template_custom_field_type_enum.py
@@ -0,0 +1,40 @@
+# 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 RequestTemplateCustomFieldTypeEnum(str, Enum):
+ """
+ The type of the custom request field.
+ """
+
+ """
+ allowed enum values
+ """
+ SHORT_TEXT = 'SHORT_TEXT'
+ LONG_TEXT = 'LONG_TEXT'
+ BOOLEAN = 'BOOLEAN'
+ MULTI_CHOICE = 'MULTI_CHOICE'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of RequestTemplateCustomFieldTypeEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/requested_item.py b/opal/models/requested_item.py
new file mode 100644
index 0000000..bcf96ab
--- /dev/null
+++ b/opal/models/requested_item.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class RequestedItem(BaseModel):
+ """
+ # Requested Item Object ### Description The `RequestedItem` object is used to represent a request target item. ### Usage Example Returned from the `GET Requests` endpoint.
+ """ # noqa: E501
+ resource_id: Optional[StrictStr] = Field(default=None, description="The ID of the resource requested.")
+ group_id: Optional[StrictStr] = Field(default=None, description="The ID of the group requested.")
+ access_level_name: Optional[StrictStr] = Field(default=None, description="The name of the access level requested.")
+ access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The ID of the access level requested on the remote system.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the target.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["resource_id", "group_id", "access_level_name", "access_level_remote_id", "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 RequestedItem 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 RequestedItem 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"),
+ "group_id": obj.get("group_id"),
+ "access_level_name": obj.get("access_level_name"),
+ "access_level_remote_id": obj.get("access_level_remote_id"),
+ "name": obj.get("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/resource.py b/opal/models/resource.py
new file mode 100644
index 0000000..7cb031e
--- /dev/null
+++ b/opal/models/resource.py
@@ -0,0 +1,167 @@
+# 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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.request_configuration import RequestConfiguration
+from opal.models.resource_remote_info import ResourceRemoteInfo
+from opal.models.resource_type_enum import ResourceTypeEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Resource(BaseModel):
+ """
+ # Resource Object ### Description The `Resource` object is used to represent a resource. ### Usage Example Update from the `UPDATE Resources` endpoint.
+ """ # noqa: E501
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ app_id: Optional[StrictStr] = Field(default=None, description="The ID of the app.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the resource.")
+ description: Optional[StrictStr] = Field(default=None, description="A description of the resource.")
+ admin_owner_id: Optional[StrictStr] = Field(default=None, description="The ID of the owner of the resource.")
+ remote_resource_id: Optional[StrictStr] = Field(default=None, description="The ID of the resource on the remote system.")
+ remote_resource_name: Optional[StrictStr] = Field(default=None, description="The name of the resource on the remote system.")
+ resource_type: Optional[ResourceTypeEnum] = None
+ max_duration: Optional[StrictInt] = Field(default=None, description="The maximum duration for which the resource can be requested (in minutes).")
+ recommended_duration: Optional[StrictInt] = Field(default=None, description="The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration.")
+ require_manager_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the resource require manager approval.")
+ require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the resource require an access ticket.")
+ 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 resource.")
+ 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.")
+ 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.")
+ request_template_id: Optional[StrictStr] = Field(default=None, description="The ID of the associated request template.")
+ is_requestable: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to allow access requests to this resource.")
+ parent_resource_id: Optional[StrictStr] = Field(default=None, description="The ID of the parent resource.")
+ 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`.")
+ 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"]
+
+ 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 Resource 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 request_configurations (list)
+ _items = []
+ if self.request_configurations:
+ for _item in self.request_configurations:
+ if _item:
+ _items.append(_item.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())
+ _dict['request_configuration_list'] = _items
+ # 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()
+ # 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 Resource 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"),
+ "app_id": obj.get("app_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "remote_resource_id": obj.get("remote_resource_id"),
+ "remote_resource_name": obj.get("remote_resource_name"),
+ "resource_type": obj.get("resource_type"),
+ "max_duration": obj.get("max_duration"),
+ "recommended_duration": obj.get("recommended_duration"),
+ "require_manager_approval": obj.get("require_manager_approval"),
+ "require_support_ticket": obj.get("require_support_ticket"),
+ "require_mfa_to_approve": obj.get("require_mfa_to_approve"),
+ "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"),
+ "request_template_id": obj.get("request_template_id"),
+ "is_requestable": obj.get("is_requestable"),
+ "parent_resource_id": obj.get("parent_resource_id"),
+ "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,
+ "metadata": obj.get("metadata"),
+ "remote_info": ResourceRemoteInfo.from_dict(obj["remote_info"]) if obj.get("remote_info") 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/resource_access_level.py b/opal/models/resource_access_level.py
new file mode 100644
index 0000000..1480cf5
--- /dev/null
+++ b/opal/models/resource_access_level.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+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.
+ """ # 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.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["access_level_name", "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 ResourceAccessLevel 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 ResourceAccessLevel from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "access_level_name": obj.get("access_level_name"),
+ "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/resource_access_user.py b/opal/models/resource_access_user.py
new file mode 100644
index 0000000..eda9496
--- /dev/null
+++ b/opal/models/resource_access_user.py
@@ -0,0 +1,125 @@
+# 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.resource_access_level import ResourceAccessLevel
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceAccessUser(BaseModel):
+ """
+ # Resource Access User Object ### Description The `ResourceAccessUser` object is used to represent a user with access to a resource, either directly or indirectly through group(s). ### Usage Example Fetch from the `LIST ResourceUsers` endpoint.
+ """ # noqa: E501
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ user_id: StrictStr = Field(description="The ID of the user.")
+ 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.")
+ 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] = {}
+ __properties: ClassVar[List[str]] = ["resource_id", "user_id", "access_level", "full_name", "email", "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 ResourceAccessUser 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
+
+ # 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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ResourceAccessUser 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"),
+ "user_id": obj.get("user_id"),
+ "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None,
+ "full_name": obj.get("full_name"),
+ "email": obj.get("email"),
+ "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/resource_access_user_list.py b/opal/models/resource_access_user_list.py
new file mode 100644
index 0000000..f1755ad
--- /dev/null
+++ b/opal/models/resource_access_user_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.resource_access_user import ResourceAccessUser
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceAccessUserList(BaseModel):
+ """
+ ResourceAccessUserList
+ """ # noqa: E501
+ results: Optional[List[ResourceAccessUser]] = 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 ResourceAccessUserList 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 in self.results:
+ if _item:
+ _items.append(_item.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 ResourceAccessUserList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "results": [ResourceAccessUser.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/resource_remote_info.py b/opal/models/resource_remote_info.py
new file mode 100644
index 0000000..38c8102
--- /dev/null
+++ b/opal/models/resource_remote_info.py
@@ -0,0 +1,249 @@
+# 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.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount
+from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance
+from opal.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster
+from opal.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole
+from opal.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet
+from opal.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance
+from opal.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset
+from opal.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable
+from opal.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket
+from opal.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance
+from opal.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder
+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_sql_instance import ResourceRemoteInfoGcpSqlInstance
+from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo
+from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject
+from opal.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp
+from opal.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole
+from opal.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole
+from opal.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole
+from opal.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet
+from opal.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile
+from opal.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole
+from opal.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfo(BaseModel):
+ """
+ Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields.
+ """ # noqa: E501
+ aws_account: Optional[ResourceRemoteInfoAwsAccount] = None
+ aws_permission_set: Optional[ResourceRemoteInfoAwsPermissionSet] = None
+ aws_iam_role: Optional[ResourceRemoteInfoAwsIamRole] = None
+ aws_ec2_instance: Optional[ResourceRemoteInfoAwsEc2Instance] = None
+ aws_rds_instance: Optional[ResourceRemoteInfoAwsRdsInstance] = None
+ aws_eks_cluster: Optional[ResourceRemoteInfoAwsEksCluster] = None
+ gcp_organization: Optional[ResourceRemoteInfoGcpOrganization] = None
+ gcp_bucket: Optional[ResourceRemoteInfoGcpBucket] = None
+ gcp_compute_instance: Optional[ResourceRemoteInfoGcpComputeInstance] = None
+ gcp_big_query_dataset: Optional[ResourceRemoteInfoGcpBigQueryDataset] = None
+ gcp_big_query_table: Optional[ResourceRemoteInfoGcpBigQueryTable] = None
+ gcp_folder: Optional[ResourceRemoteInfoGcpFolder] = None
+ gcp_gke_cluster: Optional[ResourceRemoteInfoGcpGkeCluster] = None
+ gcp_project: Optional[ResourceRemoteInfoGcpProject] = None
+ gcp_sql_instance: Optional[ResourceRemoteInfoGcpSqlInstance] = None
+ github_repo: Optional[ResourceRemoteInfoGithubRepo] = None
+ gitlab_project: Optional[ResourceRemoteInfoGitlabProject] = None
+ okta_app: Optional[ResourceRemoteInfoOktaApp] = None
+ okta_standard_role: Optional[ResourceRemoteInfoOktaStandardRole] = None
+ okta_custom_role: Optional[ResourceRemoteInfoOktaCustomRole] = None
+ pagerduty_role: Optional[ResourceRemoteInfoPagerdutyRole] = None
+ salesforce_permission_set: Optional[ResourceRemoteInfoSalesforcePermissionSet] = None
+ salesforce_profile: Optional[ResourceRemoteInfoSalesforceProfile] = None
+ 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"]
+
+ 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 ResourceRemoteInfo 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 aws_account
+ if self.aws_account:
+ _dict['aws_account'] = self.aws_account.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of aws_permission_set
+ if self.aws_permission_set:
+ _dict['aws_permission_set'] = self.aws_permission_set.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of aws_iam_role
+ if self.aws_iam_role:
+ _dict['aws_iam_role'] = self.aws_iam_role.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of aws_ec2_instance
+ if self.aws_ec2_instance:
+ _dict['aws_ec2_instance'] = self.aws_ec2_instance.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of aws_rds_instance
+ if self.aws_rds_instance:
+ _dict['aws_rds_instance'] = self.aws_rds_instance.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of aws_eks_cluster
+ if self.aws_eks_cluster:
+ _dict['aws_eks_cluster'] = self.aws_eks_cluster.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_organization
+ if self.gcp_organization:
+ _dict['gcp_organization'] = self.gcp_organization.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_bucket
+ if self.gcp_bucket:
+ _dict['gcp_bucket'] = self.gcp_bucket.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_compute_instance
+ if self.gcp_compute_instance:
+ _dict['gcp_compute_instance'] = self.gcp_compute_instance.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_big_query_dataset
+ if self.gcp_big_query_dataset:
+ _dict['gcp_big_query_dataset'] = self.gcp_big_query_dataset.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_big_query_table
+ if self.gcp_big_query_table:
+ _dict['gcp_big_query_table'] = self.gcp_big_query_table.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_folder
+ if self.gcp_folder:
+ _dict['gcp_folder'] = self.gcp_folder.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_gke_cluster
+ if self.gcp_gke_cluster:
+ _dict['gcp_gke_cluster'] = self.gcp_gke_cluster.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gcp_project
+ if self.gcp_project:
+ _dict['gcp_project'] = self.gcp_project.to_dict()
+ # 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 github_repo
+ if self.github_repo:
+ _dict['github_repo'] = self.github_repo.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of gitlab_project
+ if self.gitlab_project:
+ _dict['gitlab_project'] = self.gitlab_project.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of okta_app
+ if self.okta_app:
+ _dict['okta_app'] = self.okta_app.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of okta_standard_role
+ if self.okta_standard_role:
+ _dict['okta_standard_role'] = self.okta_standard_role.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of okta_custom_role
+ if self.okta_custom_role:
+ _dict['okta_custom_role'] = self.okta_custom_role.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of pagerduty_role
+ if self.pagerduty_role:
+ _dict['pagerduty_role'] = self.pagerduty_role.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of salesforce_permission_set
+ if self.salesforce_permission_set:
+ _dict['salesforce_permission_set'] = self.salesforce_permission_set.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of salesforce_profile
+ if self.salesforce_profile:
+ _dict['salesforce_profile'] = self.salesforce_profile.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of salesforce_role
+ if self.salesforce_role:
+ _dict['salesforce_role'] = self.salesforce_role.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of teleport_role
+ if self.teleport_role:
+ _dict['teleport_role'] = self.teleport_role.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 ResourceRemoteInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "aws_account": ResourceRemoteInfoAwsAccount.from_dict(obj["aws_account"]) if obj.get("aws_account") is not None else None,
+ "aws_permission_set": ResourceRemoteInfoAwsPermissionSet.from_dict(obj["aws_permission_set"]) if obj.get("aws_permission_set") is not None else None,
+ "aws_iam_role": ResourceRemoteInfoAwsIamRole.from_dict(obj["aws_iam_role"]) if obj.get("aws_iam_role") is not None else None,
+ "aws_ec2_instance": ResourceRemoteInfoAwsEc2Instance.from_dict(obj["aws_ec2_instance"]) if obj.get("aws_ec2_instance") is not None else None,
+ "aws_rds_instance": ResourceRemoteInfoAwsRdsInstance.from_dict(obj["aws_rds_instance"]) if obj.get("aws_rds_instance") is not None else None,
+ "aws_eks_cluster": ResourceRemoteInfoAwsEksCluster.from_dict(obj["aws_eks_cluster"]) if obj.get("aws_eks_cluster") is not None else None,
+ "gcp_organization": ResourceRemoteInfoGcpOrganization.from_dict(obj["gcp_organization"]) if obj.get("gcp_organization") is not None else None,
+ "gcp_bucket": ResourceRemoteInfoGcpBucket.from_dict(obj["gcp_bucket"]) if obj.get("gcp_bucket") is not None else None,
+ "gcp_compute_instance": ResourceRemoteInfoGcpComputeInstance.from_dict(obj["gcp_compute_instance"]) if obj.get("gcp_compute_instance") is not None else None,
+ "gcp_big_query_dataset": ResourceRemoteInfoGcpBigQueryDataset.from_dict(obj["gcp_big_query_dataset"]) if obj.get("gcp_big_query_dataset") is not None else None,
+ "gcp_big_query_table": ResourceRemoteInfoGcpBigQueryTable.from_dict(obj["gcp_big_query_table"]) if obj.get("gcp_big_query_table") is not None else None,
+ "gcp_folder": ResourceRemoteInfoGcpFolder.from_dict(obj["gcp_folder"]) if obj.get("gcp_folder") is not None else None,
+ "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,
+ "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,
+ "okta_standard_role": ResourceRemoteInfoOktaStandardRole.from_dict(obj["okta_standard_role"]) if obj.get("okta_standard_role") is not None else None,
+ "okta_custom_role": ResourceRemoteInfoOktaCustomRole.from_dict(obj["okta_custom_role"]) if obj.get("okta_custom_role") is not None else None,
+ "pagerduty_role": ResourceRemoteInfoPagerdutyRole.from_dict(obj["pagerduty_role"]) if obj.get("pagerduty_role") is not None else None,
+ "salesforce_permission_set": ResourceRemoteInfoSalesforcePermissionSet.from_dict(obj["salesforce_permission_set"]) if obj.get("salesforce_permission_set") is not None else None,
+ "salesforce_profile": ResourceRemoteInfoSalesforceProfile.from_dict(obj["salesforce_profile"]) if obj.get("salesforce_profile") is not None else None,
+ "salesforce_role": ResourceRemoteInfoSalesforceRole.from_dict(obj["salesforce_role"]) if obj.get("salesforce_role") is not None else None,
+ "teleport_role": ResourceRemoteInfoTeleportRole.from_dict(obj["teleport_role"]) if obj.get("teleport_role") 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/resource_remote_info_aws_account.py b/opal/models/resource_remote_info_aws_account.py
new file mode 100644
index 0000000..1ae10d2
--- /dev/null
+++ b/opal/models/resource_remote_info_aws_account.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoAwsAccount(BaseModel):
+ """
+ Remote info for AWS account.
+ """ # noqa: E501
+ account_id: StrictStr = Field(description="The id of the AWS account.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["account_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 ResourceRemoteInfoAwsAccount 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 ResourceRemoteInfoAwsAccount from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "account_id": obj.get("account_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_remote_info_aws_ec2_instance.py b/opal/models/resource_remote_info_aws_ec2_instance.py
new file mode 100644
index 0000000..6fbdb33
--- /dev/null
+++ b/opal/models/resource_remote_info_aws_ec2_instance.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 ResourceRemoteInfoAwsEc2Instance(BaseModel):
+ """
+ Remote info for AWS EC2 instance.
+ """ # noqa: E501
+ instance_id: StrictStr = Field(description="The instanceId of the EC2 instance.")
+ region: StrictStr = Field(description="The region of the EC2 instance.")
+ account_id: Optional[StrictStr] = Field(default=None, description="The id of the AWS account. Required for AWS Organizations.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["instance_id", "region", "account_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 ResourceRemoteInfoAwsEc2Instance 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 ResourceRemoteInfoAwsEc2Instance from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "instance_id": obj.get("instance_id"),
+ "region": obj.get("region"),
+ "account_id": obj.get("account_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_remote_info_aws_eks_cluster.py b/opal/models/resource_remote_info_aws_eks_cluster.py
new file mode 100644
index 0000000..827b457
--- /dev/null
+++ b/opal/models/resource_remote_info_aws_eks_cluster.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoAwsEksCluster(BaseModel):
+ """
+ Remote info for AWS EKS cluster.
+ """ # noqa: E501
+ arn: StrictStr = Field(description="The ARN of the EKS cluster.")
+ account_id: Optional[StrictStr] = Field(default=None, description="The id of the AWS account. Required for AWS Organizations.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["arn", "account_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 ResourceRemoteInfoAwsEksCluster 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 ResourceRemoteInfoAwsEksCluster from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "arn": obj.get("arn"),
+ "account_id": obj.get("account_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_remote_info_aws_iam_role.py b/opal/models/resource_remote_info_aws_iam_role.py
new file mode 100644
index 0000000..0e69be0
--- /dev/null
+++ b/opal/models/resource_remote_info_aws_iam_role.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoAwsIamRole(BaseModel):
+ """
+ Remote info for AWS IAM role.
+ """ # noqa: E501
+ arn: StrictStr = Field(description="The ARN of the IAM role.")
+ account_id: Optional[StrictStr] = Field(default=None, description="The id of the AWS account. Required for AWS Organizations.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["arn", "account_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 ResourceRemoteInfoAwsIamRole 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 ResourceRemoteInfoAwsIamRole from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "arn": obj.get("arn"),
+ "account_id": obj.get("account_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_remote_info_aws_permission_set.py b/opal/models/resource_remote_info_aws_permission_set.py
new file mode 100644
index 0000000..152ab24
--- /dev/null
+++ b/opal/models/resource_remote_info_aws_permission_set.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoAwsPermissionSet(BaseModel):
+ """
+ Remote info for AWS Identity Center permission set.
+ """ # noqa: E501
+ arn: StrictStr = Field(description="The ARN of the permission set.")
+ account_id: StrictStr = Field(description="The ID of an AWS account to which this permission set is provisioned.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["arn", "account_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 ResourceRemoteInfoAwsPermissionSet 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 ResourceRemoteInfoAwsPermissionSet from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "arn": obj.get("arn"),
+ "account_id": obj.get("account_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_remote_info_aws_rds_instance.py b/opal/models/resource_remote_info_aws_rds_instance.py
new file mode 100644
index 0000000..5d7ed90
--- /dev/null
+++ b/opal/models/resource_remote_info_aws_rds_instance.py
@@ -0,0 +1,107 @@
+# 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 ResourceRemoteInfoAwsRdsInstance(BaseModel):
+ """
+ Remote info for AWS RDS instance.
+ """ # noqa: E501
+ instance_id: StrictStr = Field(description="The instanceId of the RDS instance.")
+ region: StrictStr = Field(description="The region of the RDS instance.")
+ resource_id: StrictStr = Field(description="The resourceId of the RDS instance.")
+ account_id: Optional[StrictStr] = Field(default=None, description="The id of the AWS account. Required for AWS Organizations.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["instance_id", "region", "resource_id", "account_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 ResourceRemoteInfoAwsRdsInstance 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 ResourceRemoteInfoAwsRdsInstance from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "instance_id": obj.get("instance_id"),
+ "region": obj.get("region"),
+ "resource_id": obj.get("resource_id"),
+ "account_id": obj.get("account_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_remote_info_gcp_big_query_dataset.py b/opal/models/resource_remote_info_gcp_big_query_dataset.py
new file mode 100644
index 0000000..8ef255a
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_big_query_dataset.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGcpBigQueryDataset(BaseModel):
+ """
+ Remote info for GCP BigQuery Dataset.
+ """ # noqa: E501
+ project_id: StrictStr = Field(description="The id of the project the dataset is in.")
+ dataset_id: StrictStr = Field(description="The id of the dataset.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["project_id", "dataset_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 ResourceRemoteInfoGcpBigQueryDataset 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 ResourceRemoteInfoGcpBigQueryDataset from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "project_id": obj.get("project_id"),
+ "dataset_id": obj.get("dataset_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_remote_info_gcp_big_query_table.py b/opal/models/resource_remote_info_gcp_big_query_table.py
new file mode 100644
index 0000000..590ea5f
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_big_query_table.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 ResourceRemoteInfoGcpBigQueryTable(BaseModel):
+ """
+ Remote info for GCP BigQuery Table.
+ """ # noqa: E501
+ project_id: StrictStr = Field(description="The id of the project the table is in.")
+ dataset_id: StrictStr = Field(description="The id of the dataset the table is in.")
+ table_id: StrictStr = Field(description="The id of the table.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["project_id", "dataset_id", "table_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 ResourceRemoteInfoGcpBigQueryTable 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 ResourceRemoteInfoGcpBigQueryTable from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "project_id": obj.get("project_id"),
+ "dataset_id": obj.get("dataset_id"),
+ "table_id": obj.get("table_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_remote_info_gcp_bucket.py b/opal/models/resource_remote_info_gcp_bucket.py
new file mode 100644
index 0000000..93fd16a
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_bucket.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGcpBucket(BaseModel):
+ """
+ Remote info for GCP bucket.
+ """ # noqa: E501
+ bucket_id: StrictStr = Field(description="The id of the bucket.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["bucket_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 ResourceRemoteInfoGcpBucket 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 ResourceRemoteInfoGcpBucket from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "bucket_id": obj.get("bucket_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_remote_info_gcp_compute_instance.py b/opal/models/resource_remote_info_gcp_compute_instance.py
new file mode 100644
index 0000000..24d6dc0
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_compute_instance.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 ResourceRemoteInfoGcpComputeInstance(BaseModel):
+ """
+ Remote info for GCP compute instance.
+ """ # noqa: E501
+ instance_id: StrictStr = Field(description="The id of the instance.")
+ project_id: StrictStr = Field(description="The id of the project the instance is in.")
+ zone: StrictStr = Field(description="The zone the instance is in.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["instance_id", "project_id", "zone"]
+
+ 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 ResourceRemoteInfoGcpComputeInstance 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 ResourceRemoteInfoGcpComputeInstance from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "instance_id": obj.get("instance_id"),
+ "project_id": obj.get("project_id"),
+ "zone": obj.get("zone")
+ })
+ # 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_gcp_folder.py b/opal/models/resource_remote_info_gcp_folder.py
new file mode 100644
index 0000000..cb3da27
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_folder.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGcpFolder(BaseModel):
+ """
+ Remote info for GCP folder.
+ """ # noqa: E501
+ folder_id: StrictStr = Field(description="The id of the folder.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["folder_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 ResourceRemoteInfoGcpFolder 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 ResourceRemoteInfoGcpFolder from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "folder_id": obj.get("folder_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_remote_info_gcp_gke_cluster.py b/opal/models/resource_remote_info_gcp_gke_cluster.py
new file mode 100644
index 0000000..c71dddd
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_gke_cluster.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGcpGkeCluster(BaseModel):
+ """
+ Remote info for GCP GKE cluster.
+ """ # noqa: E501
+ cluster_name: StrictStr = Field(description="The name of the GKE cluster.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["cluster_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 ResourceRemoteInfoGcpGkeCluster 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 ResourceRemoteInfoGcpGkeCluster from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "cluster_name": obj.get("cluster_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/resource_remote_info_gcp_organization.py b/opal/models/resource_remote_info_gcp_organization.py
new file mode 100644
index 0000000..578bd48
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_organization.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGcpOrganization(BaseModel):
+ """
+ Remote info for GCP organization.
+ """ # noqa: E501
+ organization_id: StrictStr = Field(description="The id of the organization.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["organization_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 ResourceRemoteInfoGcpOrganization 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 ResourceRemoteInfoGcpOrganization from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "organization_id": obj.get("organization_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_remote_info_gcp_project.py b/opal/models/resource_remote_info_gcp_project.py
new file mode 100644
index 0000000..5732d62
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_project.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGcpProject(BaseModel):
+ """
+ Remote info for GCP project.
+ """ # noqa: E501
+ project_id: StrictStr = Field(description="The id of the project.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["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 ResourceRemoteInfoGcpProject 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 ResourceRemoteInfoGcpProject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "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_remote_info_gcp_sql_instance.py b/opal/models/resource_remote_info_gcp_sql_instance.py
new file mode 100644
index 0000000..d86ed9b
--- /dev/null
+++ b/opal/models/resource_remote_info_gcp_sql_instance.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGcpSqlInstance(BaseModel):
+ """
+ Remote info for GCP SQL instance.
+ """ # noqa: E501
+ instance_id: StrictStr = Field(description="The id of the SQL instance.")
+ project_id: StrictStr = Field(description="The id of the project the instance is in.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["instance_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 ResourceRemoteInfoGcpSqlInstance 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 ResourceRemoteInfoGcpSqlInstance from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "instance_id": obj.get("instance_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_remote_info_github_repo.py b/opal/models/resource_remote_info_github_repo.py
new file mode 100644
index 0000000..a25d568
--- /dev/null
+++ b/opal/models/resource_remote_info_github_repo.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGithubRepo(BaseModel):
+ """
+ Remote info for GitHub repository.
+ """ # noqa: E501
+ repo_id: Optional[StrictStr] = Field(default=None, description="The id of the repository.")
+ repo_name: StrictStr = Field(description="The name of the repository.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["repo_id", "repo_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 ResourceRemoteInfoGithubRepo 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 ResourceRemoteInfoGithubRepo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "repo_id": obj.get("repo_id"),
+ "repo_name": obj.get("repo_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/resource_remote_info_gitlab_project.py b/opal/models/resource_remote_info_gitlab_project.py
new file mode 100644
index 0000000..78019de
--- /dev/null
+++ b/opal/models/resource_remote_info_gitlab_project.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoGitlabProject(BaseModel):
+ """
+ Remote info for Gitlab project.
+ """ # noqa: E501
+ project_id: StrictStr = Field(description="The id of the project.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["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 ResourceRemoteInfoGitlabProject 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 ResourceRemoteInfoGitlabProject from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "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_remote_info_okta_app.py b/opal/models/resource_remote_info_okta_app.py
new file mode 100644
index 0000000..9387839
--- /dev/null
+++ b/opal/models/resource_remote_info_okta_app.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoOktaApp(BaseModel):
+ """
+ Remote info for Okta directory app.
+ """ # noqa: E501
+ app_id: StrictStr = Field(description="The id of the app.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["app_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 ResourceRemoteInfoOktaApp 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 ResourceRemoteInfoOktaApp from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "app_id": obj.get("app_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_remote_info_okta_custom_role.py b/opal/models/resource_remote_info_okta_custom_role.py
new file mode 100644
index 0000000..d6609d9
--- /dev/null
+++ b/opal/models/resource_remote_info_okta_custom_role.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoOktaCustomRole(BaseModel):
+ """
+ Remote info for Okta directory custom role.
+ """ # noqa: E501
+ role_id: StrictStr = Field(description="The id of the custom role.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["role_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 ResourceRemoteInfoOktaCustomRole 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 ResourceRemoteInfoOktaCustomRole from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "role_id": obj.get("role_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_remote_info_okta_standard_role.py b/opal/models/resource_remote_info_okta_standard_role.py
new file mode 100644
index 0000000..14e2146
--- /dev/null
+++ b/opal/models/resource_remote_info_okta_standard_role.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoOktaStandardRole(BaseModel):
+ """
+ Remote info for Okta directory standard role.
+ """ # noqa: E501
+ role_type: StrictStr = Field(description="The type of the standard role.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["role_type"]
+
+ 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 ResourceRemoteInfoOktaStandardRole 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 ResourceRemoteInfoOktaStandardRole from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "role_type": obj.get("role_type")
+ })
+ # 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_pagerduty_role.py b/opal/models/resource_remote_info_pagerduty_role.py
new file mode 100644
index 0000000..74bc7b7
--- /dev/null
+++ b/opal/models/resource_remote_info_pagerduty_role.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoPagerdutyRole(BaseModel):
+ """
+ Remote info for Pagerduty role.
+ """ # noqa: E501
+ role_name: StrictStr = Field(description="The name of the role.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["role_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 ResourceRemoteInfoPagerdutyRole 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 ResourceRemoteInfoPagerdutyRole from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "role_name": obj.get("role_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/resource_remote_info_salesforce_permission_set.py b/opal/models/resource_remote_info_salesforce_permission_set.py
new file mode 100644
index 0000000..fdfb694
--- /dev/null
+++ b/opal/models/resource_remote_info_salesforce_permission_set.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoSalesforcePermissionSet(BaseModel):
+ """
+ Remote info for Salesforce permission set.
+ """ # noqa: E501
+ permission_set_id: StrictStr = Field(description="The id of the permission set.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["permission_set_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 ResourceRemoteInfoSalesforcePermissionSet 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 ResourceRemoteInfoSalesforcePermissionSet from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "permission_set_id": obj.get("permission_set_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_remote_info_salesforce_profile.py b/opal/models/resource_remote_info_salesforce_profile.py
new file mode 100644
index 0000000..876a491
--- /dev/null
+++ b/opal/models/resource_remote_info_salesforce_profile.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoSalesforceProfile(BaseModel):
+ """
+ Remote info for Salesforce profile.
+ """ # noqa: E501
+ profile_id: StrictStr = Field(description="The id of the permission set.")
+ user_license_id: StrictStr = Field(description="The id of the user license.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["profile_id", "user_license_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 ResourceRemoteInfoSalesforceProfile 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 ResourceRemoteInfoSalesforceProfile from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "profile_id": obj.get("profile_id"),
+ "user_license_id": obj.get("user_license_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_remote_info_salesforce_role.py b/opal/models/resource_remote_info_salesforce_role.py
new file mode 100644
index 0000000..9dbb81b
--- /dev/null
+++ b/opal/models/resource_remote_info_salesforce_role.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoSalesforceRole(BaseModel):
+ """
+ Remote info for Salesforce role.
+ """ # noqa: E501
+ role_id: StrictStr = Field(description="The id of the role.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["role_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 ResourceRemoteInfoSalesforceRole 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 ResourceRemoteInfoSalesforceRole from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "role_id": obj.get("role_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_remote_info_teleport_role.py b/opal/models/resource_remote_info_teleport_role.py
new file mode 100644
index 0000000..f25bad9
--- /dev/null
+++ b/opal/models/resource_remote_info_teleport_role.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceRemoteInfoTeleportRole(BaseModel):
+ """
+ Remote info for Teleport role.
+ """ # noqa: E501
+ role_name: StrictStr = Field(description="The name role.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["role_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 ResourceRemoteInfoTeleportRole 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 ResourceRemoteInfoTeleportRole from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "role_name": obj.get("role_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/resource_type_enum.py b/opal/models/resource_type_enum.py
new file mode 100644
index 0000000..2abad99
--- /dev/null
+++ b/opal/models/resource_type_enum.py
@@ -0,0 +1,68 @@
+# 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 ResourceTypeEnum(str, Enum):
+ """
+ The type of the resource.
+ """
+
+ """
+ allowed enum values
+ """
+ AWS_IAM_ROLE = 'AWS_IAM_ROLE'
+ AWS_EC2_INSTANCE = 'AWS_EC2_INSTANCE'
+ AWS_EKS_CLUSTER = 'AWS_EKS_CLUSTER'
+ AWS_RDS_POSTGRES_INSTANCE = 'AWS_RDS_POSTGRES_INSTANCE'
+ AWS_RDS_MYSQL_INSTANCE = 'AWS_RDS_MYSQL_INSTANCE'
+ AWS_ACCOUNT = 'AWS_ACCOUNT'
+ AWS_SSO_PERMISSION_SET = 'AWS_SSO_PERMISSION_SET'
+ CUSTOM = 'CUSTOM'
+ GCP_BUCKET = 'GCP_BUCKET'
+ GCP_COMPUTE_INSTANCE = 'GCP_COMPUTE_INSTANCE'
+ GCP_FOLDER = 'GCP_FOLDER'
+ GCP_GKE_CLUSTER = 'GCP_GKE_CLUSTER'
+ GCP_PROJECT = 'GCP_PROJECT'
+ GCP_CLOUD_SQL_POSTGRES_INSTANCE = 'GCP_CLOUD_SQL_POSTGRES_INSTANCE'
+ GCP_CLOUD_SQL_MYSQL_INSTANCE = 'GCP_CLOUD_SQL_MYSQL_INSTANCE'
+ GIT_HUB_REPO = 'GIT_HUB_REPO'
+ GIT_LAB_PROJECT = 'GIT_LAB_PROJECT'
+ GOOGLE_WORKSPACE_ROLE = 'GOOGLE_WORKSPACE_ROLE'
+ MONGO_INSTANCE = 'MONGO_INSTANCE'
+ MONGO_ATLAS_INSTANCE = 'MONGO_ATLAS_INSTANCE'
+ OKTA_APP = 'OKTA_APP'
+ OKTA_ROLE = 'OKTA_ROLE'
+ OPAL_ROLE = 'OPAL_ROLE'
+ PAGERDUTY_ROLE = 'PAGERDUTY_ROLE'
+ TAILSCALE_SSH = 'TAILSCALE_SSH'
+ SALESFORCE_PERMISSION_SET = 'SALESFORCE_PERMISSION_SET'
+ SALESFORCE_PROFILE = 'SALESFORCE_PROFILE'
+ SALESFORCE_ROLE = 'SALESFORCE_ROLE'
+ WORKDAY_ROLE = 'WORKDAY_ROLE'
+ MYSQL_INSTANCE = 'MYSQL_INSTANCE'
+ MARIADB_INSTANCE = 'MARIADB_INSTANCE'
+ TELEPORT_ROLE = 'TELEPORT_ROLE'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ResourceTypeEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/resource_user.py b/opal/models/resource_user.py
new file mode 100644
index 0000000..67608fc
--- /dev/null
+++ b/opal/models/resource_user.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, 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 ResourceUser(BaseModel):
+ """
+ # Resource User Object ### Description The `ResourceUser` object is used to represent a user with direct access to a resource.
+ """ # noqa: E501
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ user_id: StrictStr = Field(description="The ID of the user.")
+ 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.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["resource_id", "user_id", "access_level", "full_name", "email", "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 ResourceUser 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
+
+ # 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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ResourceUser 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"),
+ "user_id": obj.get("user_id"),
+ "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None,
+ "full_name": obj.get("full_name"),
+ "email": obj.get("email"),
+ "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_user_access_status.py b/opal/models/resource_user_access_status.py
new file mode 100644
index 0000000..5bf88ae
--- /dev/null
+++ b/opal/models/resource_user_access_status.py
@@ -0,0 +1,120 @@
+# 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 opal.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceUserAccessStatus(BaseModel):
+ """
+ # AccessStatus Object ### Description The `AccessStatus` object is used to represent the user's access to the resource. ### Usage Example View the `AccessStatus` for a resource/user pair to determine if the user has access to the resource.
+ """ # noqa: E501
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ 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.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["resource_id", "user_id", "access_level", "status", "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 ResourceUserAccessStatus 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
+
+ # 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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of ResourceUserAccessStatus 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"),
+ "user_id": obj.get("user_id"),
+ "access_level": ResourceAccessLevel.from_dict(obj["access_level"]) if obj.get("access_level") is not None else None,
+ "status": obj.get("status"),
+ "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_user_access_status_enum.py b/opal/models/resource_user_access_status_enum.py
new file mode 100644
index 0000000..2c2b3ca
--- /dev/null
+++ b/opal/models/resource_user_access_status_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 ResourceUserAccessStatusEnum(str, Enum):
+ """
+ The status of the user's access to the resource.
+ """
+
+ """
+ allowed enum values
+ """
+ AUTHORIZED = 'AUTHORIZED'
+ REQUESTED = 'REQUESTED'
+ UNAUTHORIZED = 'UNAUTHORIZED'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ResourceUserAccessStatusEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/resource_with_access_level.py b/opal/models/resource_with_access_level.py
new file mode 100644
index 0000000..3e7d548
--- /dev/null
+++ b/opal/models/resource_with_access_level.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ResourceWithAccessLevel(BaseModel):
+ """
+ Information about a resource and corresponding access level
+ """ # noqa: E501
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ access_level_remote_id: Optional[StrictStr] = Field(default=None, description="The ID of the resource.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["resource_id", "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 ResourceWithAccessLevel 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 ResourceWithAccessLevel 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"),
+ "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/reviewer_id_list.py b/opal/models/reviewer_id_list.py
new file mode 100644
index 0000000..7ae60ae
--- /dev/null
+++ b/opal/models/reviewer_id_list.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
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReviewerIDList(BaseModel):
+ """
+ A list of reviewer IDs.
+ """ # noqa: E501
+ reviewer_ids: List[StrictStr]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["reviewer_ids"]
+
+ 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 ReviewerIDList 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 ReviewerIDList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "reviewer_ids": obj.get("reviewer_ids")
+ })
+ # 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/reviewer_stage.py b/opal/models/reviewer_stage.py
new file mode 100644
index 0000000..6175778
--- /dev/null
+++ b/opal/models/reviewer_stage.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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+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.")
+ owner_ids: List[StrictStr]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["require_manager_approval", "operator", "owner_ids"]
+
+ @field_validator('operator')
+ def operator_validate_enum(cls, value):
+ """Validates the enum"""
+ if value not in set(['AND', 'OR']):
+ raise ValueError("must be one of enum values ('AND', 'OR')")
+ return 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 ReviewerStage 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 ReviewerStage from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "require_manager_approval": obj.get("require_manager_approval"),
+ "operator": obj.get("operator"),
+ "owner_ids": obj.get("owner_ids")
+ })
+ # 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/reviewer_stage_list.py b/opal/models/reviewer_stage_list.py
new file mode 100644
index 0000000..dc24d02
--- /dev/null
+++ b/opal/models/reviewer_stage_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, Field
+from typing import Any, ClassVar, Dict, List
+from opal.models.reviewer_stage import ReviewerStage
+from typing import Optional, Set
+from typing_extensions import Self
+
+class ReviewerStageList(BaseModel):
+ """
+ ReviewerStageList
+ """ # noqa: E501
+ stages: List[ReviewerStage] = Field(description="A list of reviewer stages.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["stages"]
+
+ 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 ReviewerStageList 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 stages (list)
+ _items = []
+ if self.stages:
+ for _item in self.stages:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['stages'] = _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 ReviewerStageList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "stages": [ReviewerStage.from_dict(_item) for _item in obj["stages"]] if obj.get("stages") 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/session.py b/opal/models/session.py
new file mode 100644
index 0000000..97afa80
--- /dev/null
+++ b/opal/models/session.py
@@ -0,0 +1,114 @@
+# 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
+from opal.models.resource_access_level import ResourceAccessLevel
+from typing import Optional, Set
+from typing_extensions import Self
+
+class Session(BaseModel):
+ """
+ # Session Object ### Description The `Session` object is used to represent an access session. Some resources can be accessed temporarily via a time-bounded session. ### Usage Example Fetch from the `LIST Sessions` endpoint.
+ """ # noqa: E501
+ connection_id: StrictStr = Field(description="The ID of the connection.")
+ user_id: StrictStr = Field(description="The ID of the user.")
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ access_level: ResourceAccessLevel
+ expiration_date: datetime = Field(description="The day and time the user's access will expire.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["connection_id", "user_id", "resource_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 Session 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 Session from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "connection_id": obj.get("connection_id"),
+ "user_id": obj.get("user_id"),
+ "resource_id": obj.get("resource_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/sessions_list.py b/opal/models/sessions_list.py
new file mode 100644
index 0000000..dba2529
--- /dev/null
+++ b/opal/models/sessions_list.py
@@ -0,0 +1,123 @@
+# 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 opal.models.session import Session
+from typing import Optional, Set
+from typing_extensions import Self
+
+class SessionsList(BaseModel):
+ """
+ SessionsList
+ """ # noqa: E501
+ next: Optional[StrictStr] = Field(default=None, description="The cursor with which to continue pagination if additional result pages exist.")
+ previous: Optional[StrictStr] = Field(default=None, description="The cursor used to obtain the current result page.")
+ results: Optional[List[Session]] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["next", "previous", "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 SessionsList 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 in self.results:
+ if _item:
+ _items.append(_item.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
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
+ """Create an instance of SessionsList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "next": obj.get("next"),
+ "previous": obj.get("previous"),
+ "results": [Session.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/sub_event.py b/opal/models/sub_event.py
new file mode 100644
index 0000000..884efd0
--- /dev/null
+++ b/opal/models/sub_event.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List
+from typing import Optional, Set
+from typing_extensions import Self
+
+class SubEvent(BaseModel):
+ """
+ # Sub event Object ### Description The `SubEvent` object is used to represent a subevent. ### Usage Example Fetch from the `LIST Events` endpoint.
+ """ # noqa: E501
+ sub_event_type: StrictStr = Field(description="The subevent type.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["sub_event_type"]
+
+ 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 SubEvent 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 SubEvent from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "sub_event_type": obj.get("sub_event_type")
+ })
+ # 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/tag.py b/opal/models/tag.py
new file mode 100644
index 0000000..b62f45d
--- /dev/null
+++ b/opal/models/tag.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 typing import Optional, Set
+from typing_extensions import Self
+
+class Tag(BaseModel):
+ """
+ # Tag Object ### Description The `Tag` object is used to represent a tag. ### Usage Example Get tags from the `GET Tag` endpoint.
+ """ # noqa: E501
+ tag_id: StrictStr = Field(description="The ID of the tag.")
+ created_at: Optional[datetime] = Field(default=None, description="The date the tag was created.")
+ updated_at: Optional[datetime] = Field(default=None, description="The date the tag was last updated.")
+ user_creator_id: Optional[StrictStr] = Field(default=None, description="The ID of the user that created the tag.")
+ key: Optional[StrictStr] = Field(default=None, description="The key of the tag.")
+ value: Optional[StrictStr] = Field(default=None, description="The value of the tag.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["tag_id", "created_at", "updated_at", "user_creator_id", "key", "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 Tag 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 Tag from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tag_id": obj.get("tag_id"),
+ "created_at": obj.get("created_at"),
+ "updated_at": obj.get("updated_at"),
+ "user_creator_id": obj.get("user_creator_id"),
+ "key": obj.get("key"),
+ "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/tag_filter.py b/opal/models/tag_filter.py
new file mode 100644
index 0000000..13834e1
--- /dev/null
+++ b/opal/models/tag_filter.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, Field, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TagFilter(BaseModel):
+ """
+ A tag filter defined by the tags key and value.
+ """ # noqa: E501
+ key: StrictStr = Field(description="The key of the tag.")
+ value: Optional[StrictStr] = Field(default=None, description="The value of the tag.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["key", "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 TagFilter 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 TagFilter from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "key": obj.get("key"),
+ "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/tags_list.py b/opal/models/tags_list.py
new file mode 100644
index 0000000..6f93d52
--- /dev/null
+++ b/opal/models/tags_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.tag import Tag
+from typing import Optional, Set
+from typing_extensions import Self
+
+class TagsList(BaseModel):
+ """
+ TagsList
+ """ # noqa: E501
+ tags: List[Tag]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["tags"]
+
+ 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 TagsList 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 tags (list)
+ _items = []
+ if self.tags:
+ for _item in self.tags:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tags'] = _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 TagsList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "tags": [Tag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") 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/uar.py b/opal/models/uar.py
new file mode 100644
index 0000000..656a7f2
--- /dev/null
+++ b/opal/models/uar.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, 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
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UAR(BaseModel):
+ """
+ A user access review.
+ """ # noqa: E501
+ uar_id: StrictStr = Field(description="The ID of the UAR.")
+ name: StrictStr = Field(description="The name of the UAR.")
+ reviewer_assignment_policy: UARReviewerAssignmentPolicyEnum
+ send_reviewer_assignment_notification: StrictBool = Field(description="A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False.")
+ 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.")
+ uar_scope: Optional[UARScope] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["uar_id", "name", "reviewer_assignment_policy", "send_reviewer_assignment_notification", "deadline", "time_zone", "self_review_allowed", "uar_scope"]
+
+ 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 UAR 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 uar_scope
+ if self.uar_scope:
+ _dict['uar_scope'] = self.uar_scope.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 UAR from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "uar_id": obj.get("uar_id"),
+ "name": obj.get("name"),
+ "reviewer_assignment_policy": obj.get("reviewer_assignment_policy"),
+ "send_reviewer_assignment_notification": obj.get("send_reviewer_assignment_notification"),
+ "deadline": obj.get("deadline"),
+ "time_zone": obj.get("time_zone"),
+ "self_review_allowed": obj.get("self_review_allowed"),
+ "uar_scope": UARScope.from_dict(obj["uar_scope"]) if obj.get("uar_scope") 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/uar_reviewer_assignment_policy_enum.py b/opal/models/uar_reviewer_assignment_policy_enum.py
new file mode 100644
index 0000000..0a3ee0d
--- /dev/null
+++ b/opal/models/uar_reviewer_assignment_policy_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 UARReviewerAssignmentPolicyEnum(str, Enum):
+ """
+ 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.
+ """
+
+ """
+ allowed enum values
+ """
+ MANUALLY = 'MANUALLY'
+ BY_OWNING_TEAM_ADMIN = 'BY_OWNING_TEAM_ADMIN'
+ BY_MANAGER = 'BY_MANAGER'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UARReviewerAssignmentPolicyEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/uar_scope.py b/opal/models/uar_scope.py
new file mode 100644
index 0000000..2201c6b
--- /dev/null
+++ b/opal/models/uar_scope.py
@@ -0,0 +1,113 @@
+# 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 opal.models.tag_filter import TagFilter
+from typing import Optional, Set
+from typing_extensions import Self
+
+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
+ 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"]
+
+ 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 UARScope 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 tags (list)
+ _items = []
+ if self.tags:
+ for _item in self.tags:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['tags'] = _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 UARScope from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "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")
+ })
+ # 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_configuration_template_info.py b/opal/models/update_configuration_template_info.py
new file mode 100644
index 0000000..4291dae
--- /dev/null
+++ b/opal/models/update_configuration_template_info.py
@@ -0,0 +1,137 @@
+# 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 opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList
+from opal.models.request_configuration import RequestConfiguration
+from opal.models.visibility_info import VisibilityInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateConfigurationTemplateInfo(BaseModel):
+ """
+ # UpdateConfigurationTemplateInfo Object ### Description The `ConfigurationTemplate` object is used to represent an update to a configuration template. ### Usage Example Use in the `PUT Configuration Templates` endpoint.
+ """ # noqa: E501
+ 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
+ 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
+ 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.")
+ 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"]
+
+ 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 UpdateConfigurationTemplateInfo 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 visibility
+ if self.visibility:
+ _dict['visibility'] = self.visibility.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())
+ _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()
+ # 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 UpdateConfigurationTemplateInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "configuration_template_id": obj.get("configuration_template_id"),
+ "name": obj.get("name"),
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "visibility": VisibilityInfo.from_dict(obj["visibility"]) if obj.get("visibility") is not None else None,
+ "linked_audit_message_channel_ids": obj.get("linked_audit_message_channel_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,
+ "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")
+ })
+ # 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_group_binding_info.py b/opal/models/update_group_binding_info.py
new file mode 100644
index 0000000..2ac99a0
--- /dev/null
+++ b/opal/models/update_group_binding_info.py
@@ -0,0 +1,113 @@
+# 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 opal.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateGroupBindingInfo(BaseModel):
+ """
+ # UpdateGroupBindingInfo Object ### Description The `UpdateGroupBindingInfo` object is used as an input to the UpdateGroupBinding API.
+ """ # noqa: E501
+ group_binding_id: StrictStr = Field(description="The ID of the group binding.")
+ source_group_id: StrictStr = Field(description="The ID of the source group.")
+ groups: List[CreateGroupBindingInfoGroupsInner] = Field(description="The list of groups.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_binding_id", "source_group_id", "groups"]
+
+ 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 UpdateGroupBindingInfo 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 groups (list)
+ _items = []
+ if self.groups:
+ for _item in self.groups:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['groups'] = _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 UpdateGroupBindingInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "group_binding_id": obj.get("group_binding_id"),
+ "source_group_id": obj.get("source_group_id"),
+ "groups": [CreateGroupBindingInfoGroupsInner.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") 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_group_binding_info_list.py b/opal/models/update_group_binding_info_list.py
new file mode 100644
index 0000000..1e27b58
--- /dev/null
+++ b/opal/models/update_group_binding_info_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, Field
+from typing import Any, ClassVar, Dict, List
+from opal.models.update_group_binding_info import UpdateGroupBindingInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateGroupBindingInfoList(BaseModel):
+ """
+ UpdateGroupBindingInfoList
+ """ # noqa: E501
+ group_bindings: List[UpdateGroupBindingInfo] = Field(description="A list of group bindings with information to update.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["group_bindings"]
+
+ 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 UpdateGroupBindingInfoList 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 group_bindings (list)
+ _items = []
+ if self.group_bindings:
+ for _item in self.group_bindings:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['group_bindings'] = _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 UpdateGroupBindingInfoList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "group_bindings": [UpdateGroupBindingInfo.from_dict(_item) for _item in obj["group_bindings"]] if obj.get("group_bindings") 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_group_info.py b/opal/models/update_group_info.py
new file mode 100644
index 0000000..d97cb7f
--- /dev/null
+++ b/opal/models/update_group_info.py
@@ -0,0 +1,145 @@
+# 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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList
+from opal.models.request_configuration import RequestConfiguration
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateGroupInfo(BaseModel):
+ """
+ # UpdateGroupInfo Object ### Description The `UpdateGroupInfo` object is used as an input to the UpdateGroup API.
+ """ # noqa: E501
+ group_id: StrictStr = Field(description="The ID of the group.")
+ 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.")
+ max_duration: Optional[StrictInt] = Field(default=None, description="The maximum duration for which the group can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`.")
+ recommended_duration: Optional[StrictInt] = Field(default=None, description="The recommended duration for which the group should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`.")
+ require_manager_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the group require manager approval. Deprecated in favor of `request_configurations`.")
+ require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the group require an access ticket. Deprecated in favor of `request_configurations`.")
+ folder_id: Optional[StrictStr] = Field(default=None, description="The ID of the folder that the group is located in.")
+ 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 group.")
+ require_mfa_to_request: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to require MFA for requesting access to this group. Deprecated in favor of `request_configurations`.")
+ auto_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not to automatically approve requests to this group. Deprecated in favor of `request_configurations`.")
+ 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`.")
+ 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
+ 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"]
+
+ 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 UpdateGroupInfo 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 request_configurations (list)
+ _items = []
+ if self.request_configurations:
+ for _item in self.request_configurations:
+ if _item:
+ _items.append(_item.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()
+ # 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 UpdateGroupInfo 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"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "max_duration": obj.get("max_duration"),
+ "recommended_duration": obj.get("recommended_duration"),
+ "require_manager_approval": obj.get("require_manager_approval"),
+ "require_support_ticket": obj.get("require_support_ticket"),
+ "folder_id": obj.get("folder_id"),
+ "require_mfa_to_approve": obj.get("require_mfa_to_approve"),
+ "require_mfa_to_request": obj.get("require_mfa_to_request"),
+ "auto_approval": obj.get("auto_approval"),
+ "configuration_template_id": obj.get("configuration_template_id"),
+ "request_template_id": obj.get("request_template_id"),
+ "is_requestable": obj.get("is_requestable"),
+ "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
+ })
+ # 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_group_info_list.py b/opal/models/update_group_info_list.py
new file mode 100644
index 0000000..e7e3469
--- /dev/null
+++ b/opal/models/update_group_info_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, Field
+from typing import Any, ClassVar, Dict, List
+from opal.models.update_group_info import UpdateGroupInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateGroupInfoList(BaseModel):
+ """
+ UpdateGroupInfoList
+ """ # noqa: E501
+ groups: List[UpdateGroupInfo] = Field(description="A list of groups with information to update.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["groups"]
+
+ 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 UpdateGroupInfoList 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 groups (list)
+ _items = []
+ if self.groups:
+ for _item in self.groups:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['groups'] = _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 UpdateGroupInfoList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "groups": [UpdateGroupInfo.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") 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_group_resources_info.py b/opal/models/update_group_resources_info.py
new file mode 100644
index 0000000..ac4b909
--- /dev/null
+++ b/opal/models/update_group_resources_info.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.resource_with_access_level import ResourceWithAccessLevel
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateGroupResourcesInfo(BaseModel):
+ """
+ UpdateGroupResourcesInfo
+ """ # noqa: E501
+ resources: List[ResourceWithAccessLevel]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["resources"]
+
+ 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 UpdateGroupResourcesInfo 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 in self.resources:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['resources'] = _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 UpdateGroupResourcesInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resources": [ResourceWithAccessLevel.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") 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_owner_info.py b/opal/models/update_owner_info.py
new file mode 100644
index 0000000..8e67152
--- /dev/null
+++ b/opal/models/update_owner_info.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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateOwnerInfo(BaseModel):
+ """
+ # UpdateOwnerInfo Object ### Description The `UpdateOwnerInfo` object is used as an input to the UpdateOwner API.
+ """ # noqa: E501
+ owner_id: StrictStr = Field(description="The ID of the owner.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the owner.")
+ description: Optional[StrictStr] = Field(default=None, description="A description of the owner.")
+ access_request_escalation_period: Optional[StrictInt] = Field(default=None, description="The amount of time (in minutes) before the next reviewer is notified. Use 0 to remove escalation policy.")
+ reviewer_message_channel_id: Optional[StrictStr] = Field(default=None, description="The message channel id for the reviewer channel. Use \"\" to remove an existing message channel.")
+ source_group_id: Optional[StrictStr] = Field(default=None, description="Sync this owner's user list with a source group. Use \"\" to remove an existing source group.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["owner_id", "name", "description", "access_request_escalation_period", "reviewer_message_channel_id", "source_group_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 UpdateOwnerInfo 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 UpdateOwnerInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "owner_id": obj.get("owner_id"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "access_request_escalation_period": obj.get("access_request_escalation_period"),
+ "reviewer_message_channel_id": obj.get("reviewer_message_channel_id"),
+ "source_group_id": obj.get("source_group_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/update_owner_info_list.py b/opal/models/update_owner_info_list.py
new file mode 100644
index 0000000..0a9db97
--- /dev/null
+++ b/opal/models/update_owner_info_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, Field
+from typing import Any, ClassVar, Dict, List
+from opal.models.update_owner_info import UpdateOwnerInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateOwnerInfoList(BaseModel):
+ """
+ UpdateOwnerInfoList
+ """ # noqa: E501
+ owners: List[UpdateOwnerInfo] = Field(description="A list of owners with information to update.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["owners"]
+
+ 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 UpdateOwnerInfoList 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 owners (list)
+ _items = []
+ if self.owners:
+ for _item in self.owners:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['owners'] = _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 UpdateOwnerInfoList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "owners": [UpdateOwnerInfo.from_dict(_item) for _item in obj["owners"]] if obj.get("owners") 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_resource_info.py b/opal/models/update_resource_info.py
new file mode 100644
index 0000000..ffd0f0c
--- /dev/null
+++ b/opal/models/update_resource_info.py
@@ -0,0 +1,147 @@
+# 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, StrictInt, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList
+from opal.models.request_configuration import RequestConfiguration
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateResourceInfo(BaseModel):
+ """
+ # UpdateResourceInfo Object ### Description The `UpdateResourceInfo` object is used as an input to the UpdateResource API.
+ """ # noqa: E501
+ resource_id: StrictStr = Field(description="The ID of the resource.")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the resource.")
+ description: Optional[StrictStr] = Field(default=None, description="A description of the resource.")
+ admin_owner_id: Optional[StrictStr] = Field(default=None, description="The ID of the owner of the resource.")
+ max_duration: Optional[StrictInt] = Field(default=None, description="The maximum duration for which the resource can be requested (in minutes). Use -1 to set to indefinite. Deprecated in favor of `request_configurations`.")
+ recommended_duration: Optional[StrictInt] = Field(default=None, description="The recommended duration for which the resource should be requested (in minutes). Will be the default value in a request. Use -1 to set to indefinite and 0 to unset. Deprecated in favor of `request_configurations`.")
+ require_manager_approval: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the resource require manager approval.")
+ require_support_ticket: Optional[StrictBool] = Field(default=None, description="A bool representing whether or not access requests to the resource require an access ticket. Deprecated in favor of `request_configurations`.")
+ folder_id: Optional[StrictStr] = Field(default=None, description="The ID of the folder that the resource is located in.")
+ 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 resource.")
+ 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`.")
+ 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
+ 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"]
+
+ 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 UpdateResourceInfo 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 request_configurations (list)
+ _items = []
+ if self.request_configurations:
+ for _item in self.request_configurations:
+ if _item:
+ _items.append(_item.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()
+ # 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 UpdateResourceInfo 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"),
+ "name": obj.get("name"),
+ "description": obj.get("description"),
+ "admin_owner_id": obj.get("admin_owner_id"),
+ "max_duration": obj.get("max_duration"),
+ "recommended_duration": obj.get("recommended_duration"),
+ "require_manager_approval": obj.get("require_manager_approval"),
+ "require_support_ticket": obj.get("require_support_ticket"),
+ "folder_id": obj.get("folder_id"),
+ "require_mfa_to_approve": obj.get("require_mfa_to_approve"),
+ "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"),
+ "configuration_template_id": obj.get("configuration_template_id"),
+ "request_template_id": obj.get("request_template_id"),
+ "is_requestable": obj.get("is_requestable"),
+ "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
+ })
+ # 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_resource_info_list.py b/opal/models/update_resource_info_list.py
new file mode 100644
index 0000000..d487c3f
--- /dev/null
+++ b/opal/models/update_resource_info_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, Field
+from typing import Any, ClassVar, Dict, List
+from opal.models.update_resource_info import UpdateResourceInfo
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UpdateResourceInfoList(BaseModel):
+ """
+ UpdateResourceInfoList
+ """ # noqa: E501
+ resources: List[UpdateResourceInfo] = Field(description="A list of resources with information to update.")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["resources"]
+
+ 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 UpdateResourceInfoList 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 in self.resources:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['resources'] = _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 UpdateResourceInfoList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "resources": [UpdateResourceInfo.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") 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/user.py b/opal/models/user.py
new file mode 100644
index 0000000..3dfa8f3
--- /dev/null
+++ b/opal/models/user.py
@@ -0,0 +1,114 @@
+# 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 opal.models.user_hr_idp_status_enum import UserHrIdpStatusEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class User(BaseModel):
+ """
+ # User Object ### Description The `User` object is used to represent a user. ### Usage Example Fetch from the `LIST Sessions` endpoint.
+ """ # noqa: E501
+ user_id: StrictStr = Field(description="The ID of the user.")
+ email: StrictStr = Field(description="The email of the user.")
+ full_name: StrictStr = Field(description="The full name of the user.")
+ first_name: StrictStr = Field(description="The first name of the user.")
+ last_name: StrictStr = Field(description="The last name of the user.")
+ position: StrictStr = Field(description="The user's position.")
+ hr_idp_status: Optional[UserHrIdpStatusEnum] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["user_id", "email", "full_name", "first_name", "last_name", "position", "hr_idp_status"]
+
+ 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 User 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 User from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "user_id": obj.get("user_id"),
+ "email": obj.get("email"),
+ "full_name": obj.get("full_name"),
+ "first_name": obj.get("first_name"),
+ "last_name": obj.get("last_name"),
+ "position": obj.get("position"),
+ "hr_idp_status": obj.get("hr_idp_status")
+ })
+ # 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/user_hr_idp_status_enum.py b/opal/models/user_hr_idp_status_enum.py
new file mode 100644
index 0000000..5fbf240
--- /dev/null
+++ b/opal/models/user_hr_idp_status_enum.py
@@ -0,0 +1,41 @@
+# 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 UserHrIdpStatusEnum(str, Enum):
+ """
+ User status pulled from an HR/IDP provider.
+ """
+
+ """
+ allowed enum values
+ """
+ ACTIVE = 'ACTIVE'
+ SUSPENDED = 'SUSPENDED'
+ DEPROVISIONED = 'DEPROVISIONED'
+ DELETED = 'DELETED'
+ NOT_FOUND = 'NOT_FOUND'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UserHrIdpStatusEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/models/user_id_list.py b/opal/models/user_id_list.py
new file mode 100644
index 0000000..01e36c4
--- /dev/null
+++ b/opal/models/user_id_list.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
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UserIDList(BaseModel):
+ """
+ A list of user IDs.
+ """ # noqa: E501
+ user_ids: List[StrictStr]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["user_ids"]
+
+ 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 UserIDList 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 UserIDList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "user_ids": obj.get("user_ids")
+ })
+ # 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/user_list.py b/opal/models/user_list.py
new file mode 100644
index 0000000..f79d3ba
--- /dev/null
+++ b/opal/models/user_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.user import User
+from typing import Optional, Set
+from typing_extensions import Self
+
+class UserList(BaseModel):
+ """
+ A list of users.
+ """ # noqa: E501
+ users: List[User]
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["users"]
+
+ 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 UserList 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 users (list)
+ _items = []
+ if self.users:
+ for _item in self.users:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['users'] = _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 UserList from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "users": [User.from_dict(_item) for _item in obj["users"]] if obj.get("users") 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/visibility_info.py b/opal/models/visibility_info.py
new file mode 100644
index 0000000..c7ca210
--- /dev/null
+++ b/opal/models/visibility_info.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, StrictStr
+from typing import Any, ClassVar, Dict, List, Optional
+from opal.models.visibility_type_enum import VisibilityTypeEnum
+from typing import Optional, Set
+from typing_extensions import Self
+
+class VisibilityInfo(BaseModel):
+ """
+ Visibility infomation of an entity.
+ """ # noqa: E501
+ visibility: VisibilityTypeEnum
+ visibility_group_ids: Optional[List[StrictStr]] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["visibility", "visibility_group_ids"]
+
+ 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 VisibilityInfo 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 VisibilityInfo from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "visibility": obj.get("visibility"),
+ "visibility_group_ids": obj.get("visibility_group_ids")
+ })
+ # 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/visibility_type_enum.py b/opal/models/visibility_type_enum.py
new file mode 100644
index 0000000..fb6537b
--- /dev/null
+++ b/opal/models/visibility_type_enum.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
+
+
+from __future__ import annotations
+import json
+from enum import Enum
+from typing_extensions import Self
+
+
+class VisibilityTypeEnum(str, Enum):
+ """
+ The visibility level of the entity.
+ """
+
+ """
+ allowed enum values
+ """
+ GLOBAL = 'GLOBAL'
+ LIMITED = 'LIMITED'
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of VisibilityTypeEnum from a JSON string"""
+ return cls(json.loads(json_str))
+
+
diff --git a/opal/py.typed b/opal/py.typed
new file mode 100644
index 0000000..e69de29
diff --git a/opal/rest.py b/opal/rest.py
index d73027a..cb6edb1 100644
--- a/opal/rest.py
+++ b/opal/rest.py
@@ -1,55 +1,69 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import io
import json
-import logging
import re
import ssl
-from urllib.parse import urlencode
-from urllib.parse import urlparse
-from urllib.request import proxy_bypass_environment
+
import urllib3
-import ipaddress
-from opal.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError
+from opal.exceptions import ApiException, ApiValueError
+SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
+RESTResponseType = urllib3.HTTPResponse
-logger = logging.getLogger(__name__)
+
+def is_socks_proxy_url(url):
+ if url is None:
+ return False
+ split_section = url.split("://")
+ if len(split_section) < 2:
+ return False
+ else:
+ return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
class RESTResponse(io.IOBase):
- def __init__(self, resp):
- self.urllib3_response = resp
+ def __init__(self, resp) -> None:
+ self.response = resp
self.status = resp.status
self.reason = resp.reason
- self.data = resp.data
+ self.data = None
+
+ def read(self):
+ if self.data is None:
+ self.data = self.response.data
+ return self.data
def getheaders(self):
"""Returns a dictionary of the response headers."""
- return self.urllib3_response.getheaders()
+ return self.response.headers
def getheader(self, name, default=None):
"""Returns a given response header."""
- return self.urllib3_response.getheader(name, default)
+ return self.response.headers.get(name, default)
-class RESTClientObject(object):
+class RESTClientObject:
- def __init__(self, configuration, pools_size=4, maxsize=None):
+ def __init__(self, configuration) -> None:
# urllib3.PoolManager will pass all kw parameters to connectionpool
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
- # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
# Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
# cert_reqs
@@ -58,70 +72,79 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
else:
cert_reqs = ssl.CERT_NONE
- addition_pool_args = {}
+ pool_args = {
+ "cert_reqs": cert_reqs,
+ "ca_certs": configuration.ssl_ca_cert,
+ "cert_file": configuration.cert_file,
+ "key_file": configuration.key_file,
+ }
if configuration.assert_hostname is not None:
- addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
+ pool_args['assert_hostname'] = (
+ configuration.assert_hostname
+ )
if configuration.retries is not None:
- addition_pool_args['retries'] = configuration.retries
+ pool_args['retries'] = configuration.retries
+
+ if configuration.tls_server_name:
+ pool_args['server_hostname'] = configuration.tls_server_name
+
if configuration.socket_options is not None:
- addition_pool_args['socket_options'] = configuration.socket_options
+ pool_args['socket_options'] = configuration.socket_options
- if maxsize is None:
- if configuration.connection_pool_maxsize is not None:
- maxsize = configuration.connection_pool_maxsize
- else:
- maxsize = 4
+ if configuration.connection_pool_maxsize is not None:
+ pool_args['maxsize'] = configuration.connection_pool_maxsize
# https pool manager
- if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''):
- self.pool_manager = urllib3.ProxyManager(
- num_pools=pools_size,
- maxsize=maxsize,
- cert_reqs=cert_reqs,
- ca_certs=configuration.ssl_ca_cert,
- cert_file=configuration.cert_file,
- key_file=configuration.key_file,
- proxy_url=configuration.proxy,
- proxy_headers=configuration.proxy_headers,
- **addition_pool_args
- )
+ self.pool_manager: urllib3.PoolManager
+
+ if configuration.proxy:
+ if is_socks_proxy_url(configuration.proxy):
+ from urllib3.contrib.socks import SOCKSProxyManager
+ pool_args["proxy_url"] = configuration.proxy
+ pool_args["headers"] = configuration.proxy_headers
+ self.pool_manager = SOCKSProxyManager(**pool_args)
+ else:
+ pool_args["proxy_url"] = configuration.proxy
+ pool_args["proxy_headers"] = configuration.proxy_headers
+ self.pool_manager = urllib3.ProxyManager(**pool_args)
else:
- self.pool_manager = urllib3.PoolManager(
- num_pools=pools_size,
- maxsize=maxsize,
- cert_reqs=cert_reqs,
- ca_certs=configuration.ssl_ca_cert,
- cert_file=configuration.cert_file,
- key_file=configuration.key_file,
- **addition_pool_args
- )
-
- def request(self, method, url, query_params=None, headers=None,
- body=None, post_params=None, _preload_content=True,
- _request_timeout=None):
+ self.pool_manager = urllib3.PoolManager(**pool_args)
+
+ def request(
+ self,
+ method,
+ url,
+ headers=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ):
"""Perform requests.
:param method: http request method
:param url: http request url
- :param query_params: query parameters in the url
:param headers: http request headers
:param body: request json body, for `application/json`
:param post_params: request post parameters,
`application/x-www-form-urlencoded`
and `multipart/form-data`
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
: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.
"""
method = method.upper()
- assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
- 'PATCH', 'OPTIONS']
+ assert method in [
+ 'GET',
+ 'HEAD',
+ 'DELETE',
+ 'POST',
+ 'PUT',
+ 'PATCH',
+ 'OPTIONS'
+ ]
if post_params and body:
raise ApiValueError(
@@ -133,60 +156,81 @@ def request(self, method, url, query_params=None, headers=None,
timeout = None
if _request_timeout:
- if isinstance(_request_timeout, (int, float)): # noqa: E501,F821
+ if isinstance(_request_timeout, (int, float)):
timeout = urllib3.Timeout(total=_request_timeout)
- elif (isinstance(_request_timeout, tuple) and
- len(_request_timeout) == 2):
+ elif (
+ isinstance(_request_timeout, tuple)
+ and len(_request_timeout) == 2
+ ):
timeout = urllib3.Timeout(
- connect=_request_timeout[0], read=_request_timeout[1])
+ connect=_request_timeout[0],
+ read=_request_timeout[1]
+ )
try:
# For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
- # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests
- if (method != 'DELETE') and ('Content-Type' not in headers):
- headers['Content-Type'] = 'application/json'
- if query_params:
- url += '?' + urlencode(query_params)
- if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)):
+
+ # no content type provided or payload is json
+ content_type = headers.get('Content-Type')
+ if (
+ not content_type
+ or re.search('json', content_type, re.IGNORECASE)
+ ):
request_body = None
if body is not None:
request_body = json.dumps(body)
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
body=request_body,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
- elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
+ headers=headers,
+ preload_content=False
+ )
+ elif content_type == 'application/x-www-form-urlencoded':
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
fields=post_params,
encode_multipart=False,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
- elif headers['Content-Type'] == 'multipart/form-data':
+ headers=headers,
+ preload_content=False
+ )
+ elif content_type == 'multipart/form-data':
# must del headers['Content-Type'], or the correct
# Content-Type which generated by urllib3 will be
# overwritten.
del headers['Content-Type']
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
fields=post_params,
encode_multipart=True,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
+ headers=headers,
+ preload_content=False
+ )
# Pass a `string` parameter directly in the body to support
- # other content types than Json when `body` argument is
- # provided in serialized form
+ # other content types than JSON when `body` argument is
+ # provided in serialized form.
elif isinstance(body, str) or isinstance(body, bytes):
- request_body = body
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
+ body=body,
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
+ request_body = "true" if body else "false"
+ r = self.pool_manager.request(
+ method,
+ url,
body=request_body,
- preload_content=_preload_content,
+ preload_content=False,
timeout=timeout,
headers=headers)
else:
@@ -197,151 +241,16 @@ def request(self, method, url, query_params=None, headers=None,
raise ApiException(status=0, reason=msg)
# For `GET`, `HEAD`
else:
- r = self.pool_manager.request(method, url,
- fields=query_params,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers)
+ r = self.pool_manager.request(
+ method,
+ url,
+ fields={},
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
except urllib3.exceptions.SSLError as e:
- msg = "{0}\n{1}".format(type(e).__name__, str(e))
+ msg = "\n".join([type(e).__name__, str(e)])
raise ApiException(status=0, reason=msg)
- if _preload_content:
- r = RESTResponse(r)
-
- # log response body
- logger.debug("response body: %s", r.data)
-
- if not 200 <= r.status <= 299:
- if r.status == 401:
- raise UnauthorizedException(http_resp=r)
-
- if r.status == 403:
- raise ForbiddenException(http_resp=r)
-
- if r.status == 404:
- raise NotFoundException(http_resp=r)
-
- if 500 <= r.status <= 599:
- raise ServiceException(http_resp=r)
-
- raise ApiException(http_resp=r)
-
- return r
-
- def GET(self, url, headers=None, query_params=None, _preload_content=True,
- _request_timeout=None):
- return self.request("GET", url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params)
-
- def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
- _request_timeout=None):
- return self.request("HEAD", url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params)
-
- def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("OPTIONS", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def DELETE(self, url, headers=None, query_params=None, body=None,
- _preload_content=True, _request_timeout=None):
- return self.request("DELETE", url,
- headers=headers,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def POST(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("POST", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def PUT(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("PUT", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def PATCH(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("PATCH", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
-# end of class RESTClientObject
-def is_ipv4(target):
- """ Test if IPv4 address or not
- """
- try:
- chk = ipaddress.IPv4Address(target)
- return True
- except ipaddress.AddressValueError:
- return False
-
-def in_ipv4net(target, net):
- """ Test if target belongs to given IPv4 network
- """
- try:
- nw = ipaddress.IPv4Network(net)
- ip = ipaddress.IPv4Address(target)
- if ip in nw:
- return True
- return False
- except ipaddress.AddressValueError:
- return False
- except ipaddress.NetmaskValueError:
- return False
-
-def should_bypass_proxies(url, no_proxy=None):
- """ Yet another requests.should_bypass_proxies
- Test if proxies should not be used for a particular url.
- """
-
- parsed = urlparse(url)
-
- # special cases
- if parsed.hostname in [None, '']:
- return True
-
- # special cases
- if no_proxy in [None , '']:
- return False
- if no_proxy == '*':
- return True
-
- no_proxy = no_proxy.lower().replace(' ','');
- entries = (
- host for host in no_proxy.split(',') if host
- )
-
- if is_ipv4(parsed.hostname):
- for item in entries:
- if in_ipv4net(parsed.hostname, item):
- return True
- return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} )
+ return RESTResponse(r)
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..740a5bc
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,71 @@
+[tool.poetry]
+name = "opal"
+version = "1.0.0"
+description = "Opal API"
+authors = ["Opal Team "]
+license = "NoLicense"
+readme = "README.md"
+repository = "https://github.com/opalsecurity/opal-python"
+keywords = ["OpenAPI", "OpenAPI-Generator", "Opal API"]
+include = ["opal/py.typed"]
+
+[tool.poetry.dependencies]
+python = "^3.7"
+
+urllib3 = ">= 1.25.3"
+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"
+
+
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
+
+[tool.pylint.'MESSAGES CONTROL']
+extension-pkg-whitelist = "pydantic"
+
+[tool.mypy]
+files = [
+ "opal",
+ #"test", # auto-generated tests
+ "tests", # hand-written tests
+]
+# TODO: enable "strict" once all these individual checks are passing
+# strict = true
+
+# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
+warn_unused_configs = true
+warn_redundant_casts = true
+warn_unused_ignores = true
+
+## Getting these passing should be easy
+strict_equality = true
+strict_concatenate = true
+
+## Strongly recommend enabling this one as soon as you can
+check_untyped_defs = true
+
+## These shouldn't be too much additional work, but may be tricky to
+## get passing if you use a lot of untyped libraries
+disallow_subclassing_any = true
+disallow_untyped_decorators = true
+disallow_any_generics = true
+
+### These next few are various gradations of forcing use of type annotations
+#disallow_untyped_calls = true
+#disallow_incomplete_defs = true
+#disallow_untyped_defs = true
+#
+### This one isn't too hard to get passing, but return on investment is lower
+#no_implicit_reexport = true
+#
+### This one can be tricky to get passing if you use a lot of untyped libraries
+#warn_return_any = true
diff --git a/requirements.txt b/requirements.txt
index 96947f6..cc85509 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,5 @@
python_dateutil >= 2.5.3
setuptools >= 21.0.0
-urllib3 >= 1.25.3
+urllib3 >= 1.25.3, < 2.1.0
+pydantic >= 2
+typing-extensions >= 4.7.1
diff --git a/setup.py b/setup.py
index cea8ae1..c027d12 100644
--- a/setup.py
+++ b/setup.py
@@ -1,28 +1,34 @@
+# coding: utf-8
+
"""
Opal API
- Your Home For Developer Resources. # noqa: E501
+ Your Home For Developer Resources.
The version of the OpenAPI document: 1.0
Contact: hello@opal.dev
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
from setuptools import setup, find_packages # noqa: H301
-NAME = "opal"
-VERSION = "1.0.0"
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
-
+NAME = "opal"
+VERSION = "1.0.0"
+PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
- "urllib3 >= 1.25.3",
- "python-dateutil",
+ "urllib3 >= 1.25.3, < 2.1.0",
+ "python-dateutil",
+ "pydantic >= 2",
+ "typing-extensions >= 4.7.1",
]
setup(
@@ -33,11 +39,12 @@
author_email="hello@opal.dev",
url="",
keywords=["OpenAPI", "OpenAPI-Generator", "Opal API"],
- python_requires=">=3.6",
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
+ long_description_content_type='text/markdown',
long_description="""\
- Your Home For Developer Resources. # noqa: E501
- """
+ Your Home For Developer Resources.
+ """, # noqa: E501
+ package_data={"opal": ["py.typed"]},
)
diff --git a/test-requirements.txt b/test-requirements.txt
index bb4f22b..8e6d8cb 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1 +1,5 @@
+pytest~=7.1.3
pytest-cov>=2.8.1
+pytest-randomly>=3.12.0
+mypy>=1.4.1
+types-python-dateutil>=2.8.19
diff --git a/test/test_add_group_resource_request.py b/test/test_add_group_resource_request.py
new file mode 100644
index 0000000..46a903b
--- /dev/null
+++ b/test/test_add_group_resource_request.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.add_group_resource_request import AddGroupResourceRequest
+
+class TestAddGroupResourceRequest(unittest.TestCase):
+ """AddGroupResourceRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AddGroupResourceRequest:
+ """Test AddGroupResourceRequest
+ include_option 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 `AddGroupResourceRequest`
+ """
+ model = AddGroupResourceRequest()
+ if include_optional:
+ return AddGroupResourceRequest(
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess'
+ )
+ else:
+ return AddGroupResourceRequest(
+ )
+ """
+
+ def testAddGroupResourceRequest(self):
+ """Test AddGroupResourceRequest"""
+ # 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_group_user_request.py b/test/test_add_group_user_request.py
new file mode 100644
index 0000000..0bdceea
--- /dev/null
+++ b/test/test_add_group_user_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_group_user_request import AddGroupUserRequest
+
+class TestAddGroupUserRequest(unittest.TestCase):
+ """AddGroupUserRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AddGroupUserRequest:
+ """Test AddGroupUserRequest
+ include_option 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 `AddGroupUserRequest`
+ """
+ model = AddGroupUserRequest()
+ if include_optional:
+ return AddGroupUserRequest(
+ duration_minutes = 60,
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess'
+ )
+ else:
+ return AddGroupUserRequest(
+ duration_minutes = 60,
+ )
+ """
+
+ def testAddGroupUserRequest(self):
+ """Test AddGroupUserRequest"""
+ # 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_user_request.py b/test/test_add_resource_user_request.py
new file mode 100644
index 0000000..1bec0c5
--- /dev/null
+++ b/test/test_add_resource_user_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_user_request import AddResourceUserRequest
+
+class TestAddResourceUserRequest(unittest.TestCase):
+ """AddResourceUserRequest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AddResourceUserRequest:
+ """Test AddResourceUserRequest
+ include_option 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 `AddResourceUserRequest`
+ """
+ model = AddResourceUserRequest()
+ if include_optional:
+ return AddResourceUserRequest(
+ duration_minutes = 60,
+ access_level_remote_id = 'arn:aws:iam::590304332660:role/AdministratorAccess'
+ )
+ else:
+ return AddResourceUserRequest(
+ duration_minutes = 60,
+ )
+ """
+
+ def testAddResourceUserRequest(self):
+ """Test AddResourceUserRequest"""
+ # 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_app.py b/test/test_app.py
new file mode 100644
index 0000000..72d1d84
--- /dev/null
+++ b/test/test_app.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.app import App
+
+class TestApp(unittest.TestCase):
+ """App unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> App:
+ """Test App
+ include_option 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 `App`
+ """
+ model = App()
+ if include_optional:
+ return App(
+ app_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ name = 'Okta Org',
+ description = 'Okta directory for the engineering team.',
+ admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ app_type = 'OKTA_DIRECTORY'
+ )
+ else:
+ return App(
+ app_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ name = 'Okta Org',
+ description = 'Okta directory for the engineering team.',
+ admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ app_type = 'OKTA_DIRECTORY',
+ )
+ """
+
+ def testApp(self):
+ """Test App"""
+ # 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_app_type_enum.py b/test/test_app_type_enum.py
new file mode 100644
index 0000000..2ada9b6
--- /dev/null
+++ b/test/test_app_type_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.app_type_enum import AppTypeEnum
+
+class TestAppTypeEnum(unittest.TestCase):
+ """AppTypeEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAppTypeEnum(self):
+ """Test AppTypeEnum"""
+ # inst = AppTypeEnum()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_apps_api.py b/test/test_apps_api.py
new file mode 100644
index 0000000..8be79b8
--- /dev/null
+++ b/test/test_apps_api.py
@@ -0,0 +1,44 @@
+# 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.apps_api import AppsApi
+
+
+class TestAppsApi(unittest.TestCase):
+ """AppsApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = AppsApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_get_app(self) -> None:
+ """Test case for get_app
+
+ """
+ pass
+
+ def test_get_apps(self) -> None:
+ """Test case for get_apps
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_apps_list.py b/test/test_apps_list.py
new file mode 100644
index 0000000..5bbf597
--- /dev/null
+++ b/test/test_apps_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.apps_list import AppsList
+
+class TestAppsList(unittest.TestCase):
+ """AppsList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AppsList:
+ """Test AppsList
+ include_option 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 `AppsList`
+ """
+ model = AppsList()
+ if include_optional:
+ return AppsList(
+ apps = [
+ {"app_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"Okta Org","description":"Okta directory for the engineering team.","admin_owner_id":"7c86c85d-0651-43e2-a748-d69d658418e8","app_type":"OKTA_DIRECTORY"}
+ ]
+ )
+ else:
+ return AppsList(
+ apps = [
+ {"app_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"Okta Org","description":"Okta directory for the engineering team.","admin_owner_id":"7c86c85d-0651-43e2-a748-d69d658418e8","app_type":"OKTA_DIRECTORY"}
+ ],
+ )
+ """
+
+ def testAppsList(self):
+ """Test AppsList"""
+ # 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_aws_permission_set_metadata.py b/test/test_aws_permission_set_metadata.py
new file mode 100644
index 0000000..058016f
--- /dev/null
+++ b/test/test_aws_permission_set_metadata.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.aws_permission_set_metadata import AwsPermissionSetMetadata
+
+class TestAwsPermissionSetMetadata(unittest.TestCase):
+ """AwsPermissionSetMetadata unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AwsPermissionSetMetadata:
+ """Test AwsPermissionSetMetadata
+ include_option 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 `AwsPermissionSetMetadata`
+ """
+ model = AwsPermissionSetMetadata()
+ if include_optional:
+ return AwsPermissionSetMetadata(
+ aws_permission_set = opal.models.aws_permission_set_metadata_aws_permission_set.AwsPermissionSetMetadata_aws_permission_set(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234', )
+ )
+ else:
+ return AwsPermissionSetMetadata(
+ aws_permission_set = opal.models.aws_permission_set_metadata_aws_permission_set.AwsPermissionSetMetadata_aws_permission_set(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234', ),
+ )
+ """
+
+ def testAwsPermissionSetMetadata(self):
+ """Test AwsPermissionSetMetadata"""
+ # 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_aws_permission_set_metadata_aws_permission_set.py b/test/test_aws_permission_set_metadata_aws_permission_set.py
new file mode 100644
index 0000000..87455aa
--- /dev/null
+++ b/test/test_aws_permission_set_metadata_aws_permission_set.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.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet
+
+class TestAwsPermissionSetMetadataAwsPermissionSet(unittest.TestCase):
+ """AwsPermissionSetMetadataAwsPermissionSet unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> AwsPermissionSetMetadataAwsPermissionSet:
+ """Test AwsPermissionSetMetadataAwsPermissionSet
+ include_option 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 `AwsPermissionSetMetadataAwsPermissionSet`
+ """
+ model = AwsPermissionSetMetadataAwsPermissionSet()
+ if include_optional:
+ return AwsPermissionSetMetadataAwsPermissionSet(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234'
+ )
+ else:
+ return AwsPermissionSetMetadataAwsPermissionSet(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234',
+ )
+ """
+
+ def testAwsPermissionSetMetadataAwsPermissionSet(self):
+ """Test AwsPermissionSetMetadataAwsPermissionSet"""
+ # 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_condition.py b/test/test_condition.py
new file mode 100644
index 0000000..19b9004
--- /dev/null
+++ b/test/test_condition.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.condition import Condition
+
+class TestCondition(unittest.TestCase):
+ """Condition unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> Condition:
+ """Test Condition
+ include_option 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 `Condition`
+ """
+ model = Condition()
+ if include_optional:
+ return Condition(
+ group_ids = ["1b978423-db0a-4037-a4cf-f79c60cb67b3"],
+ role_remote_ids = ["arn:aws:iam::590304332660:role/AdministratorAccess"]
+ )
+ else:
+ return Condition(
+ )
+ """
+
+ def testCondition(self):
+ """Test Condition"""
+ # 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_configuration_template.py b/test/test_configuration_template.py
new file mode 100644
index 0000000..52f567c
--- /dev/null
+++ b/test/test_configuration_template.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.configuration_template import ConfigurationTemplate
+
+class TestConfigurationTemplate(unittest.TestCase):
+ """ConfigurationTemplate unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ConfigurationTemplate:
+ """Test ConfigurationTemplate
+ include_option 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 `ConfigurationTemplate`
+ """
+ model = ConfigurationTemplate()
+ if include_optional:
+ return ConfigurationTemplate(
+ configuration_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ name = 'Prod AWS Template',
+ admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ visibility = {"visibility":"LIMITED","visibility_group_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]},
+ linked_audit_message_channel_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ request_configuration_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ member_oncall_schedule_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ break_glass_user_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ require_mfa_to_approve = False,
+ require_mfa_to_connect = False
+ )
+ else:
+ return ConfigurationTemplate(
+ )
+ """
+
+ def testConfigurationTemplate(self):
+ """Test ConfigurationTemplate"""
+ # 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_configuration_templates_api.py b/test/test_configuration_templates_api.py
new file mode 100644
index 0000000..01beb45
--- /dev/null
+++ b/test/test_configuration_templates_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.configuration_templates_api import ConfigurationTemplatesApi
+
+
+class TestConfigurationTemplatesApi(unittest.TestCase):
+ """ConfigurationTemplatesApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = ConfigurationTemplatesApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_create_configuration_template(self) -> None:
+ """Test case for create_configuration_template
+
+ """
+ pass
+
+ def test_get_configuration_templates(self) -> None:
+ """Test case for get_configuration_templates
+
+ """
+ pass
+
+ def test_update_configuration_template(self) -> None:
+ """Test case for update_configuration_template
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_create_configuration_template_info.py b/test/test_create_configuration_template_info.py
new file mode 100644
index 0000000..0e5e0f0
--- /dev/null
+++ b/test/test_create_configuration_template_info.py
@@ -0,0 +1,68 @@
+# 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_configuration_template_info import CreateConfigurationTemplateInfo
+
+class TestCreateConfigurationTemplateInfo(unittest.TestCase):
+ """CreateConfigurationTemplateInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateConfigurationTemplateInfo:
+ """Test CreateConfigurationTemplateInfo
+ include_option 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 `CreateConfigurationTemplateInfo`
+ """
+ model = CreateConfigurationTemplateInfo()
+ if include_optional:
+ return CreateConfigurationTemplateInfo(
+ admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ visibility = {"visibility":"LIMITED","visibility_group_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]},
+ linked_audit_message_channel_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ member_oncall_schedule_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ break_glass_user_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ require_mfa_to_approve = False,
+ require_mfa_to_connect = False,
+ name = 'Prod AWS Template',
+ request_configurations = [
+ {"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e8","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","created_at":"2021-01-06T20:00:00Z","updated_at":"2021-01-06T20:00:00Z","condition":{"group_id":"1b978423-db0a-4037-a4cf-f79c60cb67b3"},"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":1}
+ ],
+ request_configuration_list = {"request_configurations":[{"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e8","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","condition":null,"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":0},{"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e9","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","condition":{"group_id":"1b978423-db0a-4037-a4cf-f79c60cb67b4"},"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":1}]}
+ )
+ else:
+ return CreateConfigurationTemplateInfo(
+ admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ visibility = {"visibility":"LIMITED","visibility_group_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]},
+ require_mfa_to_approve = False,
+ require_mfa_to_connect = False,
+ name = 'Prod AWS Template',
+ )
+ """
+
+ def testCreateConfigurationTemplateInfo(self):
+ """Test CreateConfigurationTemplateInfo"""
+ # 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_group_binding_info.py b/test/test_create_group_binding_info.py
new file mode 100644
index 0000000..ea06b5d
--- /dev/null
+++ b/test/test_create_group_binding_info.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.create_group_binding_info import CreateGroupBindingInfo
+
+class TestCreateGroupBindingInfo(unittest.TestCase):
+ """CreateGroupBindingInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateGroupBindingInfo:
+ """Test CreateGroupBindingInfo
+ include_option 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 `CreateGroupBindingInfo`
+ """
+ model = CreateGroupBindingInfo()
+ if include_optional:
+ return CreateGroupBindingInfo(
+ source_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ groups = [
+ opal.models.create_group_binding_info_groups_inner.CreateGroupBindingInfo_groups_inner(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', )
+ ]
+ )
+ else:
+ return CreateGroupBindingInfo(
+ source_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ groups = [
+ opal.models.create_group_binding_info_groups_inner.CreateGroupBindingInfo_groups_inner(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', )
+ ],
+ )
+ """
+
+ def testCreateGroupBindingInfo(self):
+ """Test CreateGroupBindingInfo"""
+ # 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_group_binding_info_groups_inner.py b/test/test_create_group_binding_info_groups_inner.py
new file mode 100644
index 0000000..a26898a
--- /dev/null
+++ b/test/test_create_group_binding_info_groups_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.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner
+
+class TestCreateGroupBindingInfoGroupsInner(unittest.TestCase):
+ """CreateGroupBindingInfoGroupsInner unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateGroupBindingInfoGroupsInner:
+ """Test CreateGroupBindingInfoGroupsInner
+ include_option 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 `CreateGroupBindingInfoGroupsInner`
+ """
+ model = CreateGroupBindingInfoGroupsInner()
+ if include_optional:
+ return CreateGroupBindingInfoGroupsInner(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353'
+ )
+ else:
+ return CreateGroupBindingInfoGroupsInner(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ )
+ """
+
+ def testCreateGroupBindingInfoGroupsInner(self):
+ """Test CreateGroupBindingInfoGroupsInner"""
+ # 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_group_info.py b/test/test_create_group_info.py
new file mode 100644
index 0000000..a4342e8
--- /dev/null
+++ b/test/test_create_group_info.py
@@ -0,0 +1,80 @@
+# 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_group_info import CreateGroupInfo
+
+class TestCreateGroupInfo(unittest.TestCase):
+ """CreateGroupInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateGroupInfo:
+ """Test CreateGroupInfo
+ include_option 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 `CreateGroupInfo`
+ """
+ model = CreateGroupInfo()
+ if include_optional:
+ return CreateGroupInfo(
+ name = 'mongo-db-prod',
+ description = 'Engineering team Okta group.',
+ group_type = 'OPAL_GROUP',
+ app_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ remote_info = opal.models.group_remote_info.GroupRemoteInfo(
+ active_directory_group = opal.models.group_remote_info_active_directory_group.GroupRemoteInfo_active_directory_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', ),
+ github_team = opal.models.group_remote_info_github_team.GroupRemoteInfo_github_team(
+ team_id = '898931321',
+ team_slug = 'opal-security', ),
+ gitlab_group = opal.models.group_remote_info_gitlab_group.GroupRemoteInfo_gitlab_group(
+ group_id = '898931321', ),
+ google_group = opal.models.group_remote_info_google_group.GroupRemoteInfo_google_group(
+ group_id = '1y6w882181n7sg', ),
+ ldap_group = opal.models.group_remote_info_ldap_group.GroupRemoteInfo_ldap_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', ),
+ okta_group = opal.models.group_remote_info_okta_group.GroupRemoteInfo_okta_group(
+ group_id = '00gjs33pe8rtmRrp3rd6', ),
+ duo_group = opal.models.group_remote_info_duo_group.GroupRemoteInfo_duo_group(
+ group_id = 'DSRD8W89B9DNDBY4RHAC', ),
+ azure_ad_security_group = opal.models.group_remote_info_azure_ad_security_group.GroupRemoteInfo_azure_ad_security_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', ),
+ azure_ad_microsoft_365_group = opal.models.group_remote_info_azure_ad_microsoft_365_group.GroupRemoteInfo_azure_ad_microsoft_365_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', ), ),
+ remote_group_id = '00g4fixjd6Bc9w012345',
+ metadata = '{ "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } }'
+ )
+ else:
+ return CreateGroupInfo(
+ name = 'mongo-db-prod',
+ group_type = 'OPAL_GROUP',
+ app_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ )
+ """
+
+ def testCreateGroupInfo(self):
+ """Test CreateGroupInfo"""
+ # 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_message_channel_info.py b/test/test_create_message_channel_info.py
new file mode 100644
index 0000000..32d5c43
--- /dev/null
+++ b/test/test_create_message_channel_info.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_message_channel_info import CreateMessageChannelInfo
+
+class TestCreateMessageChannelInfo(unittest.TestCase):
+ """CreateMessageChannelInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateMessageChannelInfo:
+ """Test CreateMessageChannelInfo
+ include_option 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 `CreateMessageChannelInfo`
+ """
+ model = CreateMessageChannelInfo()
+ if include_optional:
+ return CreateMessageChannelInfo(
+ third_party_provider = 'SLACK',
+ remote_id = 'C03FJR97276'
+ )
+ else:
+ return CreateMessageChannelInfo(
+ third_party_provider = 'SLACK',
+ remote_id = 'C03FJR97276',
+ )
+ """
+
+ def testCreateMessageChannelInfo(self):
+ """Test CreateMessageChannelInfo"""
+ # 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_on_call_schedule_info.py b/test/test_create_on_call_schedule_info.py
new file mode 100644
index 0000000..2157525
--- /dev/null
+++ b/test/test_create_on_call_schedule_info.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_on_call_schedule_info import CreateOnCallScheduleInfo
+
+class TestCreateOnCallScheduleInfo(unittest.TestCase):
+ """CreateOnCallScheduleInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateOnCallScheduleInfo:
+ """Test CreateOnCallScheduleInfo
+ include_option 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 `CreateOnCallScheduleInfo`
+ """
+ model = CreateOnCallScheduleInfo()
+ if include_optional:
+ return CreateOnCallScheduleInfo(
+ third_party_provider = 'PAGER_DUTY',
+ remote_id = 'PNZNINN'
+ )
+ else:
+ return CreateOnCallScheduleInfo(
+ third_party_provider = 'PAGER_DUTY',
+ remote_id = 'PNZNINN',
+ )
+ """
+
+ def testCreateOnCallScheduleInfo(self):
+ """Test CreateOnCallScheduleInfo"""
+ # 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_owner_info.py b/test/test_create_owner_info.py
new file mode 100644
index 0000000..e1e3820
--- /dev/null
+++ b/test/test_create_owner_info.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_owner_info import CreateOwnerInfo
+
+class TestCreateOwnerInfo(unittest.TestCase):
+ """CreateOwnerInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateOwnerInfo:
+ """Test CreateOwnerInfo
+ include_option 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 `CreateOwnerInfo`
+ """
+ model = CreateOwnerInfo()
+ if include_optional:
+ return CreateOwnerInfo(
+ name = 'API Owner',
+ description = 'This owner represents the API team owners.',
+ access_request_escalation_period = 120,
+ user_ids = ["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"],
+ reviewer_message_channel_id = '37cb7e41-12ba-46da-92ff-030abe0450b1',
+ source_group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3'
+ )
+ else:
+ return CreateOwnerInfo(
+ name = 'API Owner',
+ user_ids = ["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"],
+ )
+ """
+
+ def testCreateOwnerInfo(self):
+ """Test CreateOwnerInfo"""
+ # 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_configuration_info_list.py b/test/test_create_request_configuration_info_list.py
new file mode 100644
index 0000000..16d4381
--- /dev/null
+++ b/test/test_create_request_configuration_info_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.create_request_configuration_info_list import CreateRequestConfigurationInfoList
+
+class TestCreateRequestConfigurationInfoList(unittest.TestCase):
+ """CreateRequestConfigurationInfoList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateRequestConfigurationInfoList:
+ """Test CreateRequestConfigurationInfoList
+ include_option 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 `CreateRequestConfigurationInfoList`
+ """
+ model = CreateRequestConfigurationInfoList()
+ if include_optional:
+ return CreateRequestConfigurationInfoList(
+ request_configurations = [
+ {"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e8","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","created_at":"2021-01-06T20:00:00Z","updated_at":"2021-01-06T20:00:00Z","condition":{"group_id":"1b978423-db0a-4037-a4cf-f79c60cb67b3"},"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":1}
+ ]
+ )
+ else:
+ return CreateRequestConfigurationInfoList(
+ request_configurations = [
+ {"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e8","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","created_at":"2021-01-06T20:00:00Z","updated_at":"2021-01-06T20:00:00Z","condition":{"group_id":"1b978423-db0a-4037-a4cf-f79c60cb67b3"},"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":1}
+ ],
+ )
+ """
+
+ def testCreateRequestConfigurationInfoList(self):
+ """Test CreateRequestConfigurationInfoList"""
+ # 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_resource_info.py b/test/test_create_resource_info.py
new file mode 100644
index 0000000..15af456
--- /dev/null
+++ b/test/test_create_resource_info.py
@@ -0,0 +1,133 @@
+# 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_resource_info import CreateResourceInfo
+
+class TestCreateResourceInfo(unittest.TestCase):
+ """CreateResourceInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateResourceInfo:
+ """Test CreateResourceInfo
+ include_option 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 `CreateResourceInfo`
+ """
+ model = CreateResourceInfo()
+ if include_optional:
+ return CreateResourceInfo(
+ name = 'mongo-db-prod',
+ description = 'Engineering team Okta role.',
+ resource_type = 'AWS_IAM_ROLE',
+ app_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ remote_info = opal.models.resource_remote_info.ResourceRemoteInfo(
+ aws_account = opal.models.resource_remote_info_aws_account.ResourceRemoteInfo_aws_account(
+ account_id = '234234234234', ),
+ aws_permission_set = opal.models.resource_remote_info_aws_permission_set.ResourceRemoteInfo_aws_permission_set(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234', ),
+ aws_iam_role = opal.models.resource_remote_info_aws_iam_role.ResourceRemoteInfo_aws_iam_role(
+ arn = 'arn:aws:iam::179308207300:role/MyRole',
+ account_id = '234234234234', ),
+ aws_ec2_instance = opal.models.resource_remote_info_aws_ec2_instance.ResourceRemoteInfo_aws_ec2_instance(
+ instance_id = 'i-13f1a1e2899f9e93a',
+ region = 'us-east-2',
+ account_id = '234234234234', ),
+ aws_rds_instance = opal.models.resource_remote_info_aws_rds_instance.ResourceRemoteInfo_aws_rds_instance(
+ instance_id = 'demo-mysql-db',
+ region = 'us-east-2',
+ resource_id = 'db-AOO8V0XUCNU13XLZXQDQRSN0NQ',
+ account_id = '234234234234', ),
+ aws_eks_cluster = opal.models.resource_remote_info_aws_eks_cluster.ResourceRemoteInfo_aws_eks_cluster(
+ arn = 'arn:aws:eks:us-east-2:234234234234:cluster/testcluster',
+ account_id = '234234234234', ),
+ gcp_organization = opal.models.resource_remote_info_gcp_organization.ResourceRemoteInfo_gcp_organization(
+ organization_id = 'organizations/898931321', ),
+ gcp_bucket = opal.models.resource_remote_info_gcp_bucket.ResourceRemoteInfo_gcp_bucket(
+ bucket_id = 'example-bucket-898931321', ),
+ gcp_compute_instance = opal.models.resource_remote_info_gcp_compute_instance.ResourceRemoteInfo_gcp_compute_instance(
+ instance_id = 'example-instance-898931321',
+ project_id = 'example-project-898931321',
+ zone = 'us-central1-a', ),
+ gcp_big_query_dataset = opal.models.resource_remote_info_gcp_big_query_dataset.ResourceRemoteInfo_gcp_big_query_dataset(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321', ),
+ gcp_big_query_table = opal.models.resource_remote_info_gcp_big_query_table.ResourceRemoteInfo_gcp_big_query_table(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321',
+ table_id = 'example-table-898931321', ),
+ gcp_folder = opal.models.resource_remote_info_gcp_folder.ResourceRemoteInfo_gcp_folder(
+ folder_id = 'folder/898931321', ),
+ gcp_gke_cluster = opal.models.resource_remote_info_gcp_gke_cluster.ResourceRemoteInfo_gcp_gke_cluster(
+ cluster_name = 'example-cluster-898931321', ),
+ gcp_project = opal.models.resource_remote_info_gcp_project.ResourceRemoteInfo_gcp_project(
+ project_id = 'example-project-898931321', ),
+ gcp_sql_instance = opal.models.resource_remote_info_gcp_sql_instance.ResourceRemoteInfo_gcp_sql_instance(
+ instance_id = 'example-sql-898931321',
+ project_id = 'example-project-898931321', ),
+ github_repo = opal.models.resource_remote_info_github_repo.ResourceRemoteInfo_github_repo(
+ repo_id = '898931321',
+ repo_name = 'Opal Security', ),
+ gitlab_project = opal.models.resource_remote_info_gitlab_project.ResourceRemoteInfo_gitlab_project(
+ project_id = '898931321', ),
+ okta_app = opal.models.resource_remote_info_okta_app.ResourceRemoteInfo_okta_app(
+ app_id = 'a9dfas0f678asdf67867', ),
+ okta_standard_role = opal.models.resource_remote_info_okta_standard_role.ResourceRemoteInfo_okta_standard_role(
+ role_type = 'ORG_ADMIN', ),
+ okta_custom_role = opal.models.resource_remote_info_okta_custom_role.ResourceRemoteInfo_okta_custom_role(
+ role_id = 'a9dfas0f678asdf67867', ),
+ pagerduty_role = opal.models.resource_remote_info_pagerduty_role.ResourceRemoteInfo_pagerduty_role(
+ role_name = 'owner', ),
+ salesforce_permission_set = opal.models.resource_remote_info_salesforce_permission_set.ResourceRemoteInfo_salesforce_permission_set(
+ permission_set_id = '0PS5Y090202wOV7WAM', ),
+ salesforce_profile = opal.models.resource_remote_info_salesforce_profile.ResourceRemoteInfo_salesforce_profile(
+ profile_id = '0PS5Y090202wOV7WAM',
+ user_license_id = '1005Y030081Qb5XJHS', ),
+ salesforce_role = opal.models.resource_remote_info_salesforce_role.ResourceRemoteInfo_salesforce_role(
+ role_id = '0PS5Y090202wOV7WAM', ),
+ teleport_role = opal.models.resource_remote_info_teleport_role.ResourceRemoteInfo_teleport_role(
+ role_name = 'admin_role', ), ),
+ remote_resource_id = 'API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345',
+ metadata = '{
+ "okta_directory_role":
+ {
+ "role_id": "SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345",
+ "role_type": "SUPER_ADMIN",
+ },
+}'
+ )
+ else:
+ return CreateResourceInfo(
+ name = 'mongo-db-prod',
+ resource_type = 'AWS_IAM_ROLE',
+ app_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ )
+ """
+
+ def testCreateResourceInfo(self):
+ """Test CreateResourceInfo"""
+ # 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_tag_info.py b/test/test_create_tag_info.py
new file mode 100644
index 0000000..ee00ef5
--- /dev/null
+++ b/test/test_create_tag_info.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_tag_info import CreateTagInfo
+
+class TestCreateTagInfo(unittest.TestCase):
+ """CreateTagInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateTagInfo:
+ """Test CreateTagInfo
+ include_option 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 `CreateTagInfo`
+ """
+ model = CreateTagInfo()
+ if include_optional:
+ return CreateTagInfo(
+ tag_key = 'api-scope',
+ tag_value = 'production'
+ )
+ else:
+ return CreateTagInfo(
+ tag_key = 'api-scope',
+ )
+ """
+
+ def testCreateTagInfo(self):
+ """Test CreateTagInfo"""
+ # 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_uar_info.py b/test/test_create_uar_info.py
new file mode 100644
index 0000000..0ea4415
--- /dev/null
+++ b/test/test_create_uar_info.py
@@ -0,0 +1,64 @@
+# 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_uar_info import CreateUARInfo
+
+class TestCreateUARInfo(unittest.TestCase):
+ """CreateUARInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> CreateUARInfo:
+ """Test CreateUARInfo
+ include_option 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 `CreateUARInfo`
+ """
+ model = CreateUARInfo()
+ if include_optional:
+ return CreateUARInfo(
+ name = 'Monthly UAR (July)',
+ reviewer_assignment_policy = 'MANUALLY',
+ send_reviewer_assignment_notification = False,
+ deadline = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ time_zone = 'America/Los_Angeles',
+ self_review_allowed = False,
+ uar_scope = {"tags":[{"key":"uar_scope","value":"high_priority"}],"names":["demo","api"],"admins":["f454d283-ca87-4a8a-bdbb-df212eca5353","8763d283-ca87-4a8a-bdbb-df212ecab139"]}
+ )
+ else:
+ return CreateUARInfo(
+ name = 'Monthly UAR (July)',
+ reviewer_assignment_policy = 'MANUALLY',
+ send_reviewer_assignment_notification = False,
+ deadline = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ time_zone = 'America/Los_Angeles',
+ self_review_allowed = False,
+ )
+ """
+
+ def testCreateUARInfo(self):
+ """Test CreateUARInfo"""
+ # 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_group_access_level.py b/test/test_group_access_level.py
new file mode 100644
index 0000000..53ebdc4
--- /dev/null
+++ b/test/test_group_access_level.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.group_access_level import GroupAccessLevel
+
+class TestGroupAccessLevel(unittest.TestCase):
+ """GroupAccessLevel unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupAccessLevel:
+ """Test GroupAccessLevel
+ include_option 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 `GroupAccessLevel`
+ """
+ model = GroupAccessLevel()
+ if include_optional:
+ return GroupAccessLevel(
+ access_level_name = 'Developer',
+ access_level_remote_id = '20'
+ )
+ else:
+ return GroupAccessLevel(
+ access_level_name = 'Developer',
+ access_level_remote_id = '20',
+ )
+ """
+
+ def testGroupAccessLevel(self):
+ """Test GroupAccessLevel"""
+ # 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_group_binding.py b/test/test_group_binding.py
new file mode 100644
index 0000000..cf82aba
--- /dev/null
+++ b/test/test_group_binding.py
@@ -0,0 +1,65 @@
+# 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.group_binding import GroupBinding
+
+class TestGroupBinding(unittest.TestCase):
+ """GroupBinding unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupBinding:
+ """Test GroupBinding
+ include_option 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 `GroupBinding`
+ """
+ model = GroupBinding()
+ if include_optional:
+ return GroupBinding(
+ group_binding_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ created_by_id = '99d0b81d-14be-4cf6-bd27-348b4af1d11b',
+ created_at = '2022-01-23T04:56:07Z',
+ source_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ groups = [
+ {"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","group_type":"OKTA_GROUP"}
+ ]
+ )
+ else:
+ return GroupBinding(
+ group_binding_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ created_by_id = '99d0b81d-14be-4cf6-bd27-348b4af1d11b',
+ created_at = '2022-01-23T04:56:07Z',
+ source_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ groups = [
+ {"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","group_type":"OKTA_GROUP"}
+ ],
+ )
+ """
+
+ def testGroupBinding(self):
+ """Test GroupBinding"""
+ # 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_group_binding_group.py b/test/test_group_binding_group.py
new file mode 100644
index 0000000..33df83b
--- /dev/null
+++ b/test/test_group_binding_group.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.group_binding_group import GroupBindingGroup
+
+class TestGroupBindingGroup(unittest.TestCase):
+ """GroupBindingGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupBindingGroup:
+ """Test GroupBindingGroup
+ include_option 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 `GroupBindingGroup`
+ """
+ model = GroupBindingGroup()
+ if include_optional:
+ return GroupBindingGroup(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ group_type = 'OPAL_GROUP'
+ )
+ else:
+ return GroupBindingGroup(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ group_type = 'OPAL_GROUP',
+ )
+ """
+
+ def testGroupBindingGroup(self):
+ """Test GroupBindingGroup"""
+ # 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_group_bindings_api.py b/test/test_group_bindings_api.py
new file mode 100644
index 0000000..d5f4cf2
--- /dev/null
+++ b/test/test_group_bindings_api.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.api.group_bindings_api import GroupBindingsApi
+
+
+class TestGroupBindingsApi(unittest.TestCase):
+ """GroupBindingsApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = GroupBindingsApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_create_group_binding(self) -> None:
+ """Test case for create_group_binding
+
+ """
+ pass
+
+ def test_delete_group_binding(self) -> None:
+ """Test case for delete_group_binding
+
+ """
+ pass
+
+ def test_get_group_binding(self) -> None:
+ """Test case for get_group_binding
+
+ """
+ pass
+
+ def test_get_group_bindings(self) -> None:
+ """Test case for get_group_bindings
+
+ """
+ pass
+
+ def test_update_group_bindings(self) -> None:
+ """Test case for update_group_bindings
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_group_remote_info.py b/test/test_group_remote_info.py
new file mode 100644
index 0000000..9049ba0
--- /dev/null
+++ b/test/test_group_remote_info.py
@@ -0,0 +1,70 @@
+# 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.group_remote_info import GroupRemoteInfo
+
+class TestGroupRemoteInfo(unittest.TestCase):
+ """GroupRemoteInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfo:
+ """Test GroupRemoteInfo
+ include_option 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 `GroupRemoteInfo`
+ """
+ model = GroupRemoteInfo()
+ if include_optional:
+ return GroupRemoteInfo(
+ active_directory_group = opal.models.group_remote_info_active_directory_group.GroupRemoteInfo_active_directory_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', ),
+ github_team = opal.models.group_remote_info_github_team.GroupRemoteInfo_github_team(
+ team_id = '898931321',
+ team_slug = 'opal-security', ),
+ gitlab_group = opal.models.group_remote_info_gitlab_group.GroupRemoteInfo_gitlab_group(
+ group_id = '898931321', ),
+ google_group = opal.models.group_remote_info_google_group.GroupRemoteInfo_google_group(
+ group_id = '1y6w882181n7sg', ),
+ ldap_group = opal.models.group_remote_info_ldap_group.GroupRemoteInfo_ldap_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', ),
+ okta_group = opal.models.group_remote_info_okta_group.GroupRemoteInfo_okta_group(
+ group_id = '00gjs33pe8rtmRrp3rd6', ),
+ duo_group = opal.models.group_remote_info_duo_group.GroupRemoteInfo_duo_group(
+ group_id = 'DSRD8W89B9DNDBY4RHAC', ),
+ azure_ad_security_group = opal.models.group_remote_info_azure_ad_security_group.GroupRemoteInfo_azure_ad_security_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', ),
+ azure_ad_microsoft_365_group = opal.models.group_remote_info_azure_ad_microsoft_365_group.GroupRemoteInfo_azure_ad_microsoft_365_group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884', )
+ )
+ else:
+ return GroupRemoteInfo(
+ )
+ """
+
+ def testGroupRemoteInfo(self):
+ """Test GroupRemoteInfo"""
+ # 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_group_remote_info_active_directory_group.py b/test/test_group_remote_info_active_directory_group.py
new file mode 100644
index 0000000..4a7c9c6
--- /dev/null
+++ b/test/test_group_remote_info_active_directory_group.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.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup
+
+class TestGroupRemoteInfoActiveDirectoryGroup(unittest.TestCase):
+ """GroupRemoteInfoActiveDirectoryGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoActiveDirectoryGroup:
+ """Test GroupRemoteInfoActiveDirectoryGroup
+ include_option 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 `GroupRemoteInfoActiveDirectoryGroup`
+ """
+ model = GroupRemoteInfoActiveDirectoryGroup()
+ if include_optional:
+ return GroupRemoteInfoActiveDirectoryGroup(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884'
+ )
+ else:
+ return GroupRemoteInfoActiveDirectoryGroup(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884',
+ )
+ """
+
+ def testGroupRemoteInfoActiveDirectoryGroup(self):
+ """Test GroupRemoteInfoActiveDirectoryGroup"""
+ # 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_group_remote_info_azure_ad_microsoft365_group.py b/test/test_group_remote_info_azure_ad_microsoft365_group.py
new file mode 100644
index 0000000..56139c5
--- /dev/null
+++ b/test/test_group_remote_info_azure_ad_microsoft365_group.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.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group
+
+class TestGroupRemoteInfoAzureAdMicrosoft365Group(unittest.TestCase):
+ """GroupRemoteInfoAzureAdMicrosoft365Group unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoAzureAdMicrosoft365Group:
+ """Test GroupRemoteInfoAzureAdMicrosoft365Group
+ include_option 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 `GroupRemoteInfoAzureAdMicrosoft365Group`
+ """
+ model = GroupRemoteInfoAzureAdMicrosoft365Group()
+ if include_optional:
+ return GroupRemoteInfoAzureAdMicrosoft365Group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884'
+ )
+ else:
+ return GroupRemoteInfoAzureAdMicrosoft365Group(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884',
+ )
+ """
+
+ def testGroupRemoteInfoAzureAdMicrosoft365Group(self):
+ """Test GroupRemoteInfoAzureAdMicrosoft365Group"""
+ # 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_group_remote_info_azure_ad_security_group.py b/test/test_group_remote_info_azure_ad_security_group.py
new file mode 100644
index 0000000..ffc546f
--- /dev/null
+++ b/test/test_group_remote_info_azure_ad_security_group.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.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup
+
+class TestGroupRemoteInfoAzureAdSecurityGroup(unittest.TestCase):
+ """GroupRemoteInfoAzureAdSecurityGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoAzureAdSecurityGroup:
+ """Test GroupRemoteInfoAzureAdSecurityGroup
+ include_option 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 `GroupRemoteInfoAzureAdSecurityGroup`
+ """
+ model = GroupRemoteInfoAzureAdSecurityGroup()
+ if include_optional:
+ return GroupRemoteInfoAzureAdSecurityGroup(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884'
+ )
+ else:
+ return GroupRemoteInfoAzureAdSecurityGroup(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884',
+ )
+ """
+
+ def testGroupRemoteInfoAzureAdSecurityGroup(self):
+ """Test GroupRemoteInfoAzureAdSecurityGroup"""
+ # 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_group_remote_info_duo_group.py b/test/test_group_remote_info_duo_group.py
new file mode 100644
index 0000000..10802ca
--- /dev/null
+++ b/test/test_group_remote_info_duo_group.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.group_remote_info_duo_group import GroupRemoteInfoDuoGroup
+
+class TestGroupRemoteInfoDuoGroup(unittest.TestCase):
+ """GroupRemoteInfoDuoGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoDuoGroup:
+ """Test GroupRemoteInfoDuoGroup
+ include_option 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 `GroupRemoteInfoDuoGroup`
+ """
+ model = GroupRemoteInfoDuoGroup()
+ if include_optional:
+ return GroupRemoteInfoDuoGroup(
+ group_id = 'DSRD8W89B9DNDBY4RHAC'
+ )
+ else:
+ return GroupRemoteInfoDuoGroup(
+ group_id = 'DSRD8W89B9DNDBY4RHAC',
+ )
+ """
+
+ def testGroupRemoteInfoDuoGroup(self):
+ """Test GroupRemoteInfoDuoGroup"""
+ # 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_group_remote_info_github_team.py b/test/test_group_remote_info_github_team.py
new file mode 100644
index 0000000..21982b8
--- /dev/null
+++ b/test/test_group_remote_info_github_team.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.group_remote_info_github_team import GroupRemoteInfoGithubTeam
+
+class TestGroupRemoteInfoGithubTeam(unittest.TestCase):
+ """GroupRemoteInfoGithubTeam unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoGithubTeam:
+ """Test GroupRemoteInfoGithubTeam
+ include_option 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 `GroupRemoteInfoGithubTeam`
+ """
+ model = GroupRemoteInfoGithubTeam()
+ if include_optional:
+ return GroupRemoteInfoGithubTeam(
+ team_id = '898931321',
+ team_slug = 'opal-security'
+ )
+ else:
+ return GroupRemoteInfoGithubTeam(
+ team_slug = 'opal-security',
+ )
+ """
+
+ def testGroupRemoteInfoGithubTeam(self):
+ """Test GroupRemoteInfoGithubTeam"""
+ # 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_group_remote_info_gitlab_group.py b/test/test_group_remote_info_gitlab_group.py
new file mode 100644
index 0000000..a3848fe
--- /dev/null
+++ b/test/test_group_remote_info_gitlab_group.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.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup
+
+class TestGroupRemoteInfoGitlabGroup(unittest.TestCase):
+ """GroupRemoteInfoGitlabGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoGitlabGroup:
+ """Test GroupRemoteInfoGitlabGroup
+ include_option 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 `GroupRemoteInfoGitlabGroup`
+ """
+ model = GroupRemoteInfoGitlabGroup()
+ if include_optional:
+ return GroupRemoteInfoGitlabGroup(
+ group_id = '898931321'
+ )
+ else:
+ return GroupRemoteInfoGitlabGroup(
+ group_id = '898931321',
+ )
+ """
+
+ def testGroupRemoteInfoGitlabGroup(self):
+ """Test GroupRemoteInfoGitlabGroup"""
+ # 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_group_remote_info_google_group.py b/test/test_group_remote_info_google_group.py
new file mode 100644
index 0000000..c73ae85
--- /dev/null
+++ b/test/test_group_remote_info_google_group.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.group_remote_info_google_group import GroupRemoteInfoGoogleGroup
+
+class TestGroupRemoteInfoGoogleGroup(unittest.TestCase):
+ """GroupRemoteInfoGoogleGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoGoogleGroup:
+ """Test GroupRemoteInfoGoogleGroup
+ include_option 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 `GroupRemoteInfoGoogleGroup`
+ """
+ model = GroupRemoteInfoGoogleGroup()
+ if include_optional:
+ return GroupRemoteInfoGoogleGroup(
+ group_id = '1y6w882181n7sg'
+ )
+ else:
+ return GroupRemoteInfoGoogleGroup(
+ group_id = '1y6w882181n7sg',
+ )
+ """
+
+ def testGroupRemoteInfoGoogleGroup(self):
+ """Test GroupRemoteInfoGoogleGroup"""
+ # 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_group_remote_info_ldap_group.py b/test/test_group_remote_info_ldap_group.py
new file mode 100644
index 0000000..0009b77
--- /dev/null
+++ b/test/test_group_remote_info_ldap_group.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.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup
+
+class TestGroupRemoteInfoLdapGroup(unittest.TestCase):
+ """GroupRemoteInfoLdapGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoLdapGroup:
+ """Test GroupRemoteInfoLdapGroup
+ include_option 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 `GroupRemoteInfoLdapGroup`
+ """
+ model = GroupRemoteInfoLdapGroup()
+ if include_optional:
+ return GroupRemoteInfoLdapGroup(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884'
+ )
+ else:
+ return GroupRemoteInfoLdapGroup(
+ group_id = '01fa7402-01d8-103b-8deb-5f3a0ab7884',
+ )
+ """
+
+ def testGroupRemoteInfoLdapGroup(self):
+ """Test GroupRemoteInfoLdapGroup"""
+ # 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_group_remote_info_okta_group.py b/test/test_group_remote_info_okta_group.py
new file mode 100644
index 0000000..c8c57dc
--- /dev/null
+++ b/test/test_group_remote_info_okta_group.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.group_remote_info_okta_group import GroupRemoteInfoOktaGroup
+
+class TestGroupRemoteInfoOktaGroup(unittest.TestCase):
+ """GroupRemoteInfoOktaGroup unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupRemoteInfoOktaGroup:
+ """Test GroupRemoteInfoOktaGroup
+ include_option 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 `GroupRemoteInfoOktaGroup`
+ """
+ model = GroupRemoteInfoOktaGroup()
+ if include_optional:
+ return GroupRemoteInfoOktaGroup(
+ group_id = '00gjs33pe8rtmRrp3rd6'
+ )
+ else:
+ return GroupRemoteInfoOktaGroup(
+ group_id = '00gjs33pe8rtmRrp3rd6',
+ )
+ """
+
+ def testGroupRemoteInfoOktaGroup(self):
+ """Test GroupRemoteInfoOktaGroup"""
+ # 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_group_resource.py b/test/test_group_resource.py
new file mode 100644
index 0000000..4d0e729
--- /dev/null
+++ b/test/test_group_resource.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.group_resource import GroupResource
+
+class TestGroupResource(unittest.TestCase):
+ """GroupResource unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupResource:
+ """Test GroupResource
+ include_option 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 `GroupResource`
+ """
+ model = GroupResource()
+ if include_optional:
+ return GroupResource(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ resource_id = 'b5a5ca27-0ea3-4d86-9199-2126d57d1fbd',
+ access_level = {"access_level_name":"AdminRole","access_level_remote_id":"arn:aws:iam::590304332660:role/AdministratorAccess"}
+ )
+ else:
+ return GroupResource(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ resource_id = 'b5a5ca27-0ea3-4d86-9199-2126d57d1fbd',
+ access_level = {"access_level_name":"AdminRole","access_level_remote_id":"arn:aws:iam::590304332660:role/AdministratorAccess"},
+ )
+ """
+
+ def testGroupResource(self):
+ """Test GroupResource"""
+ # 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_group_resource_list.py b/test/test_group_resource_list.py
new file mode 100644
index 0000000..8074608
--- /dev/null
+++ b/test/test_group_resource_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.group_resource_list import GroupResourceList
+
+class TestGroupResourceList(unittest.TestCase):
+ """GroupResourceList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupResourceList:
+ """Test GroupResourceList
+ include_option 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 `GroupResourceList`
+ """
+ model = GroupResourceList()
+ if include_optional:
+ return GroupResourceList(
+ group_resources = [
+ {"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","resource_id":"b5a5ca27-0ea3-4d86-9199-2126d57d1fbd","access_level_remote_id":"write"}
+ ]
+ )
+ else:
+ return GroupResourceList(
+ group_resources = [
+ {"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","resource_id":"b5a5ca27-0ea3-4d86-9199-2126d57d1fbd","access_level_remote_id":"write"}
+ ],
+ )
+ """
+
+ def testGroupResourceList(self):
+ """Test GroupResourceList"""
+ # 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_group_user.py b/test/test_group_user.py
new file mode 100644
index 0000000..3a28fb1
--- /dev/null
+++ b/test/test_group_user.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.group_user import GroupUser
+
+class TestGroupUser(unittest.TestCase):
+ """GroupUser unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupUser:
+ """Test GroupUser
+ include_option 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 `GroupUser`
+ """
+ model = GroupUser()
+ if include_optional:
+ return GroupUser(
+ group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3',
+ user_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac',
+ access_level = {"access_level_name":"Developer","access_level_remote_id":20},
+ full_name = 'Jake Barnes',
+ email = 'jake@company.dev',
+ expiration_date = '2022-01-23T04:56:07Z'
+ )
+ else:
+ return GroupUser(
+ group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3',
+ user_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac',
+ full_name = 'Jake Barnes',
+ email = 'jake@company.dev',
+ expiration_date = '2022-01-23T04:56:07Z',
+ )
+ """
+
+ def testGroupUser(self):
+ """Test GroupUser"""
+ # 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_group_user_list.py b/test/test_group_user_list.py
new file mode 100644
index 0000000..b940ea0
--- /dev/null
+++ b/test/test_group_user_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.group_user_list import GroupUserList
+
+class TestGroupUserList(unittest.TestCase):
+ """GroupUserList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> GroupUserList:
+ """Test GroupUserList
+ include_option 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 `GroupUserList`
+ """
+ model = GroupUserList()
+ if include_optional:
+ return GroupUserList(
+ results = [
+ {"full_name":"Jake Barnes","user_id":"29827fb8-f2dd-4e80-9576-28e31e9934ac","group_id":"1b978423-db0a-4037-a4cf-f79c60cb67b3","expiration_date":"2022-01-23T04:56:07Z","email":"jake@company.dev"}
+ ]
+ )
+ else:
+ return GroupUserList(
+ )
+ """
+
+ def testGroupUserList(self):
+ """Test GroupUserList"""
+ # 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_message_channels_api.py b/test/test_message_channels_api.py
new file mode 100644
index 0000000..34c1d23
--- /dev/null
+++ b/test/test_message_channels_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.message_channels_api import MessageChannelsApi
+
+
+class TestMessageChannelsApi(unittest.TestCase):
+ """MessageChannelsApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = MessageChannelsApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_create_message_channel(self) -> None:
+ """Test case for create_message_channel
+
+ """
+ pass
+
+ def test_get_message_channel(self) -> None:
+ """Test case for get_message_channel
+
+ """
+ pass
+
+ def test_get_message_channels(self) -> None:
+ """Test case for get_message_channels
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_on_call_schedule.py b/test/test_on_call_schedule.py
new file mode 100644
index 0000000..c751b78
--- /dev/null
+++ b/test/test_on_call_schedule.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.on_call_schedule import OnCallSchedule
+
+class TestOnCallSchedule(unittest.TestCase):
+ """OnCallSchedule unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> OnCallSchedule:
+ """Test OnCallSchedule
+ include_option 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 `OnCallSchedule`
+ """
+ model = OnCallSchedule()
+ if include_optional:
+ return OnCallSchedule(
+ on_call_schedule_id = '50d5e9f6-f23f-4d5a-ae91-b2640cf3975e',
+ third_party_provider = 'PAGER_DUTY',
+ remote_id = 'P7OWH2R',
+ name = 'Customer Support On-Call'
+ )
+ else:
+ return OnCallSchedule(
+ )
+ """
+
+ def testOnCallSchedule(self):
+ """Test OnCallSchedule"""
+ # 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_on_call_schedule_id_list.py b/test/test_on_call_schedule_id_list.py
new file mode 100644
index 0000000..7956885
--- /dev/null
+++ b/test/test_on_call_schedule_id_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.on_call_schedule_id_list import OnCallScheduleIDList
+
+class TestOnCallScheduleIDList(unittest.TestCase):
+ """OnCallScheduleIDList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> OnCallScheduleIDList:
+ """Test OnCallScheduleIDList
+ include_option 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 `OnCallScheduleIDList`
+ """
+ model = OnCallScheduleIDList()
+ if include_optional:
+ return OnCallScheduleIDList(
+ on_call_schedule_ids = [
+ ''
+ ]
+ )
+ else:
+ return OnCallScheduleIDList(
+ on_call_schedule_ids = [
+ ''
+ ],
+ )
+ """
+
+ def testOnCallScheduleIDList(self):
+ """Test OnCallScheduleIDList"""
+ # 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_on_call_schedule_list.py b/test/test_on_call_schedule_list.py
new file mode 100644
index 0000000..8efb704
--- /dev/null
+++ b/test/test_on_call_schedule_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.on_call_schedule_list import OnCallScheduleList
+
+class TestOnCallScheduleList(unittest.TestCase):
+ """OnCallScheduleList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> OnCallScheduleList:
+ """Test OnCallScheduleList
+ include_option 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 `OnCallScheduleList`
+ """
+ model = OnCallScheduleList()
+ if include_optional:
+ return OnCallScheduleList(
+ on_call_schedules = [
+ {"on_call_schedule_id":"50d5e9f6-f23f-4d5a-ae91-b2640cf3975e","third_party_provider":"PAGER_DUTY","remote_id":"P7OWH2R","name":"Customer Support On-Call"}
+ ]
+ )
+ else:
+ return OnCallScheduleList(
+ on_call_schedules = [
+ {"on_call_schedule_id":"50d5e9f6-f23f-4d5a-ae91-b2640cf3975e","third_party_provider":"PAGER_DUTY","remote_id":"P7OWH2R","name":"Customer Support On-Call"}
+ ],
+ )
+ """
+
+ def testOnCallScheduleList(self):
+ """Test OnCallScheduleList"""
+ # 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_on_call_schedule_provider_enum.py b/test/test_on_call_schedule_provider_enum.py
new file mode 100644
index 0000000..d7e7be7
--- /dev/null
+++ b/test/test_on_call_schedule_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.on_call_schedule_provider_enum import OnCallScheduleProviderEnum
+
+class TestOnCallScheduleProviderEnum(unittest.TestCase):
+ """OnCallScheduleProviderEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testOnCallScheduleProviderEnum(self):
+ """Test OnCallScheduleProviderEnum"""
+ # inst = OnCallScheduleProviderEnum()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_on_call_schedules_api.py b/test/test_on_call_schedules_api.py
new file mode 100644
index 0000000..4c53729
--- /dev/null
+++ b/test/test_on_call_schedules_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.on_call_schedules_api import OnCallSchedulesApi
+
+
+class TestOnCallSchedulesApi(unittest.TestCase):
+ """OnCallSchedulesApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = OnCallSchedulesApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_create_on_call_schedule(self) -> None:
+ """Test case for create_on_call_schedule
+
+ """
+ pass
+
+ def test_get_on_call_schedule(self) -> None:
+ """Test case for get_on_call_schedule
+
+ """
+ pass
+
+ def test_get_on_call_schedules(self) -> None:
+ """Test case for get_on_call_schedules
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_owner.py b/test/test_owner.py
new file mode 100644
index 0000000..945153b
--- /dev/null
+++ b/test/test_owner.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.owner import Owner
+
+class TestOwner(unittest.TestCase):
+ """Owner unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> Owner:
+ """Test Owner
+ include_option 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 `Owner`
+ """
+ model = Owner()
+ if include_optional:
+ return Owner(
+ owner_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ name = 'API Owner',
+ description = 'This owner represents the API team owners.',
+ access_request_escalation_period = 120,
+ reviewer_message_channel_id = '37cb7e41-12ba-46da-92ff-030abe0450b1',
+ source_group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3'
+ )
+ else:
+ return Owner(
+ owner_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ )
+ """
+
+ def testOwner(self):
+ """Test Owner"""
+ # 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_owners_api.py b/test/test_owners_api.py
new file mode 100644
index 0000000..15091bc
--- /dev/null
+++ b/test/test_owners_api.py
@@ -0,0 +1,80 @@
+# 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.owners_api import OwnersApi
+
+
+class TestOwnersApi(unittest.TestCase):
+ """OwnersApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = OwnersApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_create_owner(self) -> None:
+ """Test case for create_owner
+
+ """
+ pass
+
+ def test_delete_owner(self) -> None:
+ """Test case for delete_owner
+
+ """
+ pass
+
+ def test_get_owner(self) -> None:
+ """Test case for get_owner
+
+ """
+ pass
+
+ def test_get_owner_from_name(self) -> None:
+ """Test case for get_owner_from_name
+
+ """
+ pass
+
+ def test_get_owner_users(self) -> None:
+ """Test case for get_owner_users
+
+ """
+ pass
+
+ def test_get_owners(self) -> None:
+ """Test case for get_owners
+
+ """
+ pass
+
+ def test_set_owner_users(self) -> None:
+ """Test case for set_owner_users
+
+ """
+ pass
+
+ def test_update_owners(self) -> None:
+ """Test case for update_owners
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_paginated_configuration_template_list.py b/test/test_paginated_configuration_template_list.py
new file mode 100644
index 0000000..66eb756
--- /dev/null
+++ b/test/test_paginated_configuration_template_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.paginated_configuration_template_list import PaginatedConfigurationTemplateList
+
+class TestPaginatedConfigurationTemplateList(unittest.TestCase):
+ """PaginatedConfigurationTemplateList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PaginatedConfigurationTemplateList:
+ """Test PaginatedConfigurationTemplateList
+ include_option 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 `PaginatedConfigurationTemplateList`
+ """
+ model = PaginatedConfigurationTemplateList()
+ if include_optional:
+ return PaginatedConfigurationTemplateList(
+ results = [
+ {"configuration_template_id":"7c86c85d-0651-43e2-a748-d69d658418e8","admin_owner_id":"7c86c85d-0651-43e2-a748-d69d658418e8","visibility":"private","linked_audit_message_channel_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e8","member_oncall_schedule_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"break_glass_user_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"require_mfa_to_approve":false,"require_mfa_to_connect":false,"name":"Prod AWS Template"}
+ ]
+ )
+ else:
+ return PaginatedConfigurationTemplateList(
+ )
+ """
+
+ def testPaginatedConfigurationTemplateList(self):
+ """Test PaginatedConfigurationTemplateList"""
+ # 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_paginated_group_bindings_list.py b/test/test_paginated_group_bindings_list.py
new file mode 100644
index 0000000..66ed70e
--- /dev/null
+++ b/test/test_paginated_group_bindings_list.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.paginated_group_bindings_list import PaginatedGroupBindingsList
+
+class TestPaginatedGroupBindingsList(unittest.TestCase):
+ """PaginatedGroupBindingsList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PaginatedGroupBindingsList:
+ """Test PaginatedGroupBindingsList
+ include_option 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 `PaginatedGroupBindingsList`
+ """
+ model = PaginatedGroupBindingsList()
+ if include_optional:
+ return PaginatedGroupBindingsList(
+ next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw',
+ previous = 'cj1sZXdwd2VycWtJ',
+ results = [
+ {"group_binding_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","created_by_id":"99d0b81d-14be-4cf6-bd27-348b4af1d11b","created_at":"2022-01-23T04:56:07Z","source_group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","groups":[{"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","group_type":"OKTA_GROUP"},{"group_id":"99d0b81d-14be-4cf6-bd27-348b4af1d11b","group_type":"AWS_SSO_GROUP"}]}
+ ]
+ )
+ else:
+ return PaginatedGroupBindingsList(
+ results = [
+ {"group_binding_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","created_by_id":"99d0b81d-14be-4cf6-bd27-348b4af1d11b","created_at":"2022-01-23T04:56:07Z","source_group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","groups":[{"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","group_type":"OKTA_GROUP"},{"group_id":"99d0b81d-14be-4cf6-bd27-348b4af1d11b","group_type":"AWS_SSO_GROUP"}]}
+ ],
+ )
+ """
+
+ def testPaginatedGroupBindingsList(self):
+ """Test PaginatedGroupBindingsList"""
+ # 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_paginated_owners_list.py b/test/test_paginated_owners_list.py
new file mode 100644
index 0000000..5dfed98
--- /dev/null
+++ b/test/test_paginated_owners_list.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.paginated_owners_list import PaginatedOwnersList
+
+class TestPaginatedOwnersList(unittest.TestCase):
+ """PaginatedOwnersList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PaginatedOwnersList:
+ """Test PaginatedOwnersList
+ include_option 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 `PaginatedOwnersList`
+ """
+ model = PaginatedOwnersList()
+ if include_optional:
+ return PaginatedOwnersList(
+ next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw',
+ previous = 'cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ',
+ results = [
+ {"owner_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"API Owner","description":"This owner represents the API team owners.","access_request_escalation_period":120}
+ ]
+ )
+ else:
+ return PaginatedOwnersList(
+ results = [
+ {"owner_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"API Owner","description":"This owner represents the API team owners.","access_request_escalation_period":120}
+ ],
+ )
+ """
+
+ def testPaginatedOwnersList(self):
+ """Test PaginatedOwnersList"""
+ # 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_paginated_tags_list.py b/test/test_paginated_tags_list.py
new file mode 100644
index 0000000..5a506ad
--- /dev/null
+++ b/test/test_paginated_tags_list.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.paginated_tags_list import PaginatedTagsList
+
+class TestPaginatedTagsList(unittest.TestCase):
+ """PaginatedTagsList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PaginatedTagsList:
+ """Test PaginatedTagsList
+ include_option 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 `PaginatedTagsList`
+ """
+ model = PaginatedTagsList()
+ if include_optional:
+ return PaginatedTagsList(
+ next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw',
+ previous = 'cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ',
+ results = [
+ {"tag_id":"f290a738-5f9f-43c2-ad67-fa31ff0eb946","created_at":"2022-01-23T04:56:07Z","updated_at":"2022-02-23T01:34:07Z","user_creator_id":"d4a7d928-783e-4599-8ec6-088d635a5bcc","key":"database-name","value":"redis_db"}
+ ]
+ )
+ else:
+ return PaginatedTagsList(
+ results = [
+ {"tag_id":"f290a738-5f9f-43c2-ad67-fa31ff0eb946","created_at":"2022-01-23T04:56:07Z","updated_at":"2022-02-23T01:34:07Z","user_creator_id":"d4a7d928-783e-4599-8ec6-088d635a5bcc","key":"database-name","value":"redis_db"}
+ ],
+ )
+ """
+
+ def testPaginatedTagsList(self):
+ """Test PaginatedTagsList"""
+ # 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_paginated_uars_list.py b/test/test_paginated_uars_list.py
new file mode 100644
index 0000000..065b8de
--- /dev/null
+++ b/test/test_paginated_uars_list.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.paginated_uars_list import PaginatedUARsList
+
+class TestPaginatedUARsList(unittest.TestCase):
+ """PaginatedUARsList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PaginatedUARsList:
+ """Test PaginatedUARsList
+ include_option 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 `PaginatedUARsList`
+ """
+ model = PaginatedUARsList()
+ if include_optional:
+ return PaginatedUARsList(
+ next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw',
+ previous = 'cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ',
+ results = [
+ {"uar_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"Monthly UAR (July)","send_reviewer_assignment_notification":false,"deadline":"2022-07-14 06:59:59","time_zone":"America/Los_Angeles","self_review_allowed":false,"uar_scope":{"tags":[{"key":"uar_scope","value":"high_priority"}],"names":["demo","api"],"admins":["f454d283-ca87-4a8a-bdbb-df212eca5353","8763d283-ca87-4a8a-bdbb-df212ecab139"]}}
+ ]
+ )
+ else:
+ return PaginatedUARsList(
+ results = [
+ {"uar_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"Monthly UAR (July)","send_reviewer_assignment_notification":false,"deadline":"2022-07-14 06:59:59","time_zone":"America/Los_Angeles","self_review_allowed":false,"uar_scope":{"tags":[{"key":"uar_scope","value":"high_priority"}],"names":["demo","api"],"admins":["f454d283-ca87-4a8a-bdbb-df212eca5353","8763d283-ca87-4a8a-bdbb-df212ecab139"]}}
+ ],
+ )
+ """
+
+ def testPaginatedUARsList(self):
+ """Test PaginatedUARsList"""
+ # 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_paginated_users_list.py b/test/test_paginated_users_list.py
new file mode 100644
index 0000000..4c2cf2b
--- /dev/null
+++ b/test/test_paginated_users_list.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.paginated_users_list import PaginatedUsersList
+
+class TestPaginatedUsersList(unittest.TestCase):
+ """PaginatedUsersList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PaginatedUsersList:
+ """Test PaginatedUsersList
+ include_option 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 `PaginatedUsersList`
+ """
+ model = PaginatedUsersList()
+ if include_optional:
+ return PaginatedUsersList(
+ next = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw',
+ previous = 'cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ',
+ results = [
+ {"user_id":"29827fb8-f2dd-4e80-9576-28e31e9934ac","email":"1b978423-db0a-4037-a4cf-f79c60cb67b3","full_name":"John Doe","first_name":"John","last_name":"Doe","position":"Engineer"}
+ ]
+ )
+ else:
+ return PaginatedUsersList(
+ results = [
+ {"user_id":"29827fb8-f2dd-4e80-9576-28e31e9934ac","email":"1b978423-db0a-4037-a4cf-f79c60cb67b3","full_name":"John Doe","first_name":"John","last_name":"Doe","position":"Engineer"}
+ ],
+ )
+ """
+
+ def testPaginatedUsersList(self):
+ """Test PaginatedUsersList"""
+ # 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_request.py b/test/test_request.py
new file mode 100644
index 0000000..80b5f0c
--- /dev/null
+++ b/test/test_request.py
@@ -0,0 +1,75 @@
+# 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.request import Request
+
+class TestRequest(unittest.TestCase):
+ """Request unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> Request:
+ """Test Request
+ include_option 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 `Request`
+ """
+ model = Request()
+ if include_optional:
+ return Request(
+ id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ created_at = '2021-01-06T20:00Z',
+ updated_at = '2021-01-06T20:00Z',
+ requester_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ target_user_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ status = 'pending',
+ reason = 'I need access to the AWS account.',
+ duration_minutes = 120,
+ requested_items_list = [
+ {"resource_id":null,"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","access_level_name":"admin","access_level_remote_id":"arn:aws:iam::490306337630:role/SupportUser","name":"Engineering Team"}
+ ],
+ custom_fields_responses = [
+ opal.models.request_custom_field_response.RequestCustomFieldResponse(
+ field_name = '',
+ field_type = 'SHORT_TEXT',
+ field_value = null, )
+ ]
+ )
+ else:
+ return Request(
+ id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ created_at = '2021-01-06T20:00Z',
+ updated_at = '2021-01-06T20:00Z',
+ requester_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ target_user_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ status = 'pending',
+ reason = 'I need access to the AWS account.',
+ )
+ """
+
+ def testRequest(self):
+ """Test Request"""
+ # 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_request_configuration.py b/test/test_request_configuration.py
new file mode 100644
index 0000000..b84f31d
--- /dev/null
+++ b/test/test_request_configuration.py
@@ -0,0 +1,71 @@
+# 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.request_configuration import RequestConfiguration
+
+class TestRequestConfiguration(unittest.TestCase):
+ """RequestConfiguration unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RequestConfiguration:
+ """Test RequestConfiguration
+ include_option 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 `RequestConfiguration`
+ """
+ model = RequestConfiguration()
+ if include_optional:
+ return RequestConfiguration(
+ condition = {"group_ids":["1b978423-db0a-4037-a4cf-f79c60cb67b3"]},
+ allow_requests = True,
+ auto_approval = False,
+ require_mfa_to_request = False,
+ max_duration_minutes = 120,
+ recommended_duration_minutes = 120,
+ require_support_ticket = False,
+ request_template_id = '06851574-e50d-40ca-8c78-f72ae6ab4304',
+ reviewer_stages = [
+ {"owner_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]}
+ ],
+ priority = 1
+ )
+ else:
+ return RequestConfiguration(
+ allow_requests = True,
+ auto_approval = False,
+ require_mfa_to_request = False,
+ require_support_ticket = False,
+ reviewer_stages = [
+ {"owner_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]}
+ ],
+ priority = 1,
+ )
+ """
+
+ def testRequestConfiguration(self):
+ """Test RequestConfiguration"""
+ # 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_request_custom_field_response.py b/test/test_request_custom_field_response.py
new file mode 100644
index 0000000..8fde4c8
--- /dev/null
+++ b/test/test_request_custom_field_response.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.request_custom_field_response import RequestCustomFieldResponse
+
+class TestRequestCustomFieldResponse(unittest.TestCase):
+ """RequestCustomFieldResponse unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RequestCustomFieldResponse:
+ """Test RequestCustomFieldResponse
+ include_option 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 `RequestCustomFieldResponse`
+ """
+ model = RequestCustomFieldResponse()
+ if include_optional:
+ return RequestCustomFieldResponse(
+ field_name = '',
+ field_type = 'SHORT_TEXT',
+ field_value = None
+ )
+ else:
+ return RequestCustomFieldResponse(
+ field_name = '',
+ field_type = 'SHORT_TEXT',
+ field_value = None,
+ )
+ """
+
+ def testRequestCustomFieldResponse(self):
+ """Test RequestCustomFieldResponse"""
+ # 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_request_custom_field_response_field_value.py b/test/test_request_custom_field_response_field_value.py
new file mode 100644
index 0000000..128d1c1
--- /dev/null
+++ b/test/test_request_custom_field_response_field_value.py
@@ -0,0 +1,51 @@
+# 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.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue
+
+class TestRequestCustomFieldResponseFieldValue(unittest.TestCase):
+ """RequestCustomFieldResponseFieldValue unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RequestCustomFieldResponseFieldValue:
+ """Test RequestCustomFieldResponseFieldValue
+ include_option 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 `RequestCustomFieldResponseFieldValue`
+ """
+ model = RequestCustomFieldResponseFieldValue()
+ if include_optional:
+ return RequestCustomFieldResponseFieldValue(
+ )
+ else:
+ return RequestCustomFieldResponseFieldValue(
+ )
+ """
+
+ def testRequestCustomFieldResponseFieldValue(self):
+ """Test RequestCustomFieldResponseFieldValue"""
+ # 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_request_list.py b/test/test_request_list.py
new file mode 100644
index 0000000..382695a
--- /dev/null
+++ b/test/test_request_list.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.request_list import RequestList
+
+class TestRequestList(unittest.TestCase):
+ """RequestList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RequestList:
+ """Test RequestList
+ include_option 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 `RequestList`
+ """
+ model = RequestList()
+ if include_optional:
+ return RequestList(
+ requests = [
+ {"id":"7c86c85d-0651-43e2-a748-d69d658418e8","created_at":"2021-01-06T20:00:00Z","updated_at":"2021-01-06T20:00:00Z","requester_id":"c86c85d-0651-43e2-a748-d69d658418e8","target_user_id":"r86c85d-0651-43e2-a748-d69d658418e8","status":"pending","reason":"I need this resource.","duration_minutes":1440,"request_comments":[{"id":"7c86c85d-0651-43e2-a748-d69d658418e8","created_at":"2021-01-06T20:00:00Z","updated_at":"2021-01-06T20:00:00Z","request_id":"4c86c85d-0651-43e2-a748-d69d658418e8","user_id":"c86c85d-0651-43e2-a748-d69d658418e8","comment":"This is a comment."}]}
+ ],
+ cursor = 'eyJjcmVhdGVkX2F0IjoiMjAyMS0wMS0wNlQyMDo0NzowMFoiLCJ2YWx1ZSI6ImFkbWluIn0='
+ )
+ else:
+ return RequestList(
+ )
+ """
+
+ def testRequestList(self):
+ """Test RequestList"""
+ # 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_request_status_enum.py b/test/test_request_status_enum.py
new file mode 100644
index 0000000..716ac99
--- /dev/null
+++ b/test/test_request_status_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.request_status_enum import RequestStatusEnum
+
+class TestRequestStatusEnum(unittest.TestCase):
+ """RequestStatusEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testRequestStatusEnum(self):
+ """Test RequestStatusEnum"""
+ # inst = RequestStatusEnum()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_request_template_custom_field_type_enum.py b/test/test_request_template_custom_field_type_enum.py
new file mode 100644
index 0000000..edc9902
--- /dev/null
+++ b/test/test_request_template_custom_field_type_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.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum
+
+class TestRequestTemplateCustomFieldTypeEnum(unittest.TestCase):
+ """RequestTemplateCustomFieldTypeEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testRequestTemplateCustomFieldTypeEnum(self):
+ """Test RequestTemplateCustomFieldTypeEnum"""
+ # inst = RequestTemplateCustomFieldTypeEnum()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_requested_item.py b/test/test_requested_item.py
new file mode 100644
index 0000000..9bfd3d8
--- /dev/null
+++ b/test/test_requested_item.py
@@ -0,0 +1,56 @@
+# 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.requested_item import RequestedItem
+
+class TestRequestedItem(unittest.TestCase):
+ """RequestedItem unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> RequestedItem:
+ """Test RequestedItem
+ include_option 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 `RequestedItem`
+ """
+ model = RequestedItem()
+ if include_optional:
+ return RequestedItem(
+ resource_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ access_level_name = 'admin',
+ access_level_remote_id = 'arn:aws:iam::490306337630:role/SupportUser',
+ name = 'Engineering Team'
+ )
+ else:
+ return RequestedItem(
+ )
+ """
+
+ def testRequestedItem(self):
+ """Test RequestedItem"""
+ # 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_requests_api.py b/test/test_requests_api.py
new file mode 100644
index 0000000..b079844
--- /dev/null
+++ b/test/test_requests_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.requests_api import RequestsApi
+
+
+class TestRequestsApi(unittest.TestCase):
+ """RequestsApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = RequestsApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_get_requests(self) -> None:
+ """Test case for get_requests
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_resource_access_user.py b/test/test_resource_access_user.py
new file mode 100644
index 0000000..753a453
--- /dev/null
+++ b/test/test_resource_access_user.py
@@ -0,0 +1,67 @@
+# 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_access_user import ResourceAccessUser
+
+class TestResourceAccessUser(unittest.TestCase):
+ """ResourceAccessUser unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceAccessUser:
+ """Test ResourceAccessUser
+ include_option 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 `ResourceAccessUser`
+ """
+ model = ResourceAccessUser()
+ if include_optional:
+ return ResourceAccessUser(
+ resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3',
+ user_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac',
+ access_level = {"access_level_name":"AdminRole","access_level_remote_id":"arn:aws:iam::590304332660:role/AdministratorAccess"},
+ full_name = 'Jake Barnes',
+ email = 'jake@company.dev',
+ expiration_date = '2022-01-23T04:56:07Z',
+ has_direct_access = True,
+ num_access_paths = 3
+ )
+ else:
+ return ResourceAccessUser(
+ resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3',
+ user_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac',
+ access_level = {"access_level_name":"AdminRole","access_level_remote_id":"arn:aws:iam::590304332660:role/AdministratorAccess"},
+ full_name = 'Jake Barnes',
+ email = 'jake@company.dev',
+ expiration_date = '2022-01-23T04:56:07Z',
+ has_direct_access = True,
+ num_access_paths = 3,
+ )
+ """
+
+ def testResourceAccessUser(self):
+ """Test ResourceAccessUser"""
+ # 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_access_user_list.py b/test/test_resource_access_user_list.py
new file mode 100644
index 0000000..f821ee0
--- /dev/null
+++ b/test/test_resource_access_user_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.resource_access_user_list import ResourceAccessUserList
+
+class TestResourceAccessUserList(unittest.TestCase):
+ """ResourceAccessUserList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceAccessUserList:
+ """Test ResourceAccessUserList
+ include_option 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 `ResourceAccessUserList`
+ """
+ model = ResourceAccessUserList()
+ if include_optional:
+ return ResourceAccessUserList(
+ results = [
+ {"full_name":"Jake Barnes","user_id":"29827fb8-f2dd-4e80-9576-28e31e9934ac","resource_id":"1b978423-db0a-4037-a4cf-f79c60cb67b3","expiration_date":"2022-01-23T04:56:07Z","email":"jake@company.dev"}
+ ]
+ )
+ else:
+ return ResourceAccessUserList(
+ )
+ """
+
+ def testResourceAccessUserList(self):
+ """Test ResourceAccessUserList"""
+ # 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.py b/test/test_resource_remote_info.py
new file mode 100644
index 0000000..d4d994e
--- /dev/null
+++ b/test/test_resource_remote_info.py
@@ -0,0 +1,117 @@
+# 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 import ResourceRemoteInfo
+
+class TestResourceRemoteInfo(unittest.TestCase):
+ """ResourceRemoteInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfo:
+ """Test ResourceRemoteInfo
+ include_option 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 `ResourceRemoteInfo`
+ """
+ model = ResourceRemoteInfo()
+ if include_optional:
+ return ResourceRemoteInfo(
+ aws_account = opal.models.resource_remote_info_aws_account.ResourceRemoteInfo_aws_account(
+ account_id = '234234234234', ),
+ aws_permission_set = opal.models.resource_remote_info_aws_permission_set.ResourceRemoteInfo_aws_permission_set(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234', ),
+ aws_iam_role = opal.models.resource_remote_info_aws_iam_role.ResourceRemoteInfo_aws_iam_role(
+ arn = 'arn:aws:iam::179308207300:role/MyRole',
+ account_id = '234234234234', ),
+ aws_ec2_instance = opal.models.resource_remote_info_aws_ec2_instance.ResourceRemoteInfo_aws_ec2_instance(
+ instance_id = 'i-13f1a1e2899f9e93a',
+ region = 'us-east-2',
+ account_id = '234234234234', ),
+ aws_rds_instance = opal.models.resource_remote_info_aws_rds_instance.ResourceRemoteInfo_aws_rds_instance(
+ instance_id = 'demo-mysql-db',
+ region = 'us-east-2',
+ resource_id = 'db-AOO8V0XUCNU13XLZXQDQRSN0NQ',
+ account_id = '234234234234', ),
+ aws_eks_cluster = opal.models.resource_remote_info_aws_eks_cluster.ResourceRemoteInfo_aws_eks_cluster(
+ arn = 'arn:aws:eks:us-east-2:234234234234:cluster/testcluster',
+ account_id = '234234234234', ),
+ gcp_organization = opal.models.resource_remote_info_gcp_organization.ResourceRemoteInfo_gcp_organization(
+ organization_id = 'organizations/898931321', ),
+ gcp_bucket = opal.models.resource_remote_info_gcp_bucket.ResourceRemoteInfo_gcp_bucket(
+ bucket_id = 'example-bucket-898931321', ),
+ gcp_compute_instance = opal.models.resource_remote_info_gcp_compute_instance.ResourceRemoteInfo_gcp_compute_instance(
+ instance_id = 'example-instance-898931321',
+ project_id = 'example-project-898931321',
+ zone = 'us-central1-a', ),
+ gcp_big_query_dataset = opal.models.resource_remote_info_gcp_big_query_dataset.ResourceRemoteInfo_gcp_big_query_dataset(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321', ),
+ gcp_big_query_table = opal.models.resource_remote_info_gcp_big_query_table.ResourceRemoteInfo_gcp_big_query_table(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321',
+ table_id = 'example-table-898931321', ),
+ gcp_folder = opal.models.resource_remote_info_gcp_folder.ResourceRemoteInfo_gcp_folder(
+ folder_id = 'folder/898931321', ),
+ gcp_gke_cluster = opal.models.resource_remote_info_gcp_gke_cluster.ResourceRemoteInfo_gcp_gke_cluster(
+ cluster_name = 'example-cluster-898931321', ),
+ gcp_project = opal.models.resource_remote_info_gcp_project.ResourceRemoteInfo_gcp_project(
+ project_id = 'example-project-898931321', ),
+ gcp_sql_instance = opal.models.resource_remote_info_gcp_sql_instance.ResourceRemoteInfo_gcp_sql_instance(
+ instance_id = 'example-sql-898931321',
+ project_id = 'example-project-898931321', ),
+ github_repo = opal.models.resource_remote_info_github_repo.ResourceRemoteInfo_github_repo(
+ repo_id = '898931321',
+ repo_name = 'Opal Security', ),
+ gitlab_project = opal.models.resource_remote_info_gitlab_project.ResourceRemoteInfo_gitlab_project(
+ project_id = '898931321', ),
+ okta_app = opal.models.resource_remote_info_okta_app.ResourceRemoteInfo_okta_app(
+ app_id = 'a9dfas0f678asdf67867', ),
+ okta_standard_role = opal.models.resource_remote_info_okta_standard_role.ResourceRemoteInfo_okta_standard_role(
+ role_type = 'ORG_ADMIN', ),
+ okta_custom_role = opal.models.resource_remote_info_okta_custom_role.ResourceRemoteInfo_okta_custom_role(
+ role_id = 'a9dfas0f678asdf67867', ),
+ pagerduty_role = opal.models.resource_remote_info_pagerduty_role.ResourceRemoteInfo_pagerduty_role(
+ role_name = 'owner', ),
+ salesforce_permission_set = opal.models.resource_remote_info_salesforce_permission_set.ResourceRemoteInfo_salesforce_permission_set(
+ permission_set_id = '0PS5Y090202wOV7WAM', ),
+ salesforce_profile = opal.models.resource_remote_info_salesforce_profile.ResourceRemoteInfo_salesforce_profile(
+ profile_id = '0PS5Y090202wOV7WAM',
+ user_license_id = '1005Y030081Qb5XJHS', ),
+ salesforce_role = opal.models.resource_remote_info_salesforce_role.ResourceRemoteInfo_salesforce_role(
+ role_id = '0PS5Y090202wOV7WAM', ),
+ teleport_role = opal.models.resource_remote_info_teleport_role.ResourceRemoteInfo_teleport_role(
+ role_name = 'admin_role', )
+ )
+ else:
+ return ResourceRemoteInfo(
+ )
+ """
+
+ def testResourceRemoteInfo(self):
+ """Test ResourceRemoteInfo"""
+ # 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_aws_account.py b/test/test_resource_remote_info_aws_account.py
new file mode 100644
index 0000000..141fb42
--- /dev/null
+++ b/test/test_resource_remote_info_aws_account.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.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount
+
+class TestResourceRemoteInfoAwsAccount(unittest.TestCase):
+ """ResourceRemoteInfoAwsAccount unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoAwsAccount:
+ """Test ResourceRemoteInfoAwsAccount
+ include_option 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 `ResourceRemoteInfoAwsAccount`
+ """
+ model = ResourceRemoteInfoAwsAccount()
+ if include_optional:
+ return ResourceRemoteInfoAwsAccount(
+ account_id = '234234234234'
+ )
+ else:
+ return ResourceRemoteInfoAwsAccount(
+ account_id = '234234234234',
+ )
+ """
+
+ def testResourceRemoteInfoAwsAccount(self):
+ """Test ResourceRemoteInfoAwsAccount"""
+ # 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_aws_ec2_instance.py b/test/test_resource_remote_info_aws_ec2_instance.py
new file mode 100644
index 0000000..2d32c9a
--- /dev/null
+++ b/test/test_resource_remote_info_aws_ec2_instance.py
@@ -0,0 +1,56 @@
+# 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_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance
+
+class TestResourceRemoteInfoAwsEc2Instance(unittest.TestCase):
+ """ResourceRemoteInfoAwsEc2Instance unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoAwsEc2Instance:
+ """Test ResourceRemoteInfoAwsEc2Instance
+ include_option 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 `ResourceRemoteInfoAwsEc2Instance`
+ """
+ model = ResourceRemoteInfoAwsEc2Instance()
+ if include_optional:
+ return ResourceRemoteInfoAwsEc2Instance(
+ instance_id = 'i-13f1a1e2899f9e93a',
+ region = 'us-east-2',
+ account_id = '234234234234'
+ )
+ else:
+ return ResourceRemoteInfoAwsEc2Instance(
+ instance_id = 'i-13f1a1e2899f9e93a',
+ region = 'us-east-2',
+ )
+ """
+
+ def testResourceRemoteInfoAwsEc2Instance(self):
+ """Test ResourceRemoteInfoAwsEc2Instance"""
+ # 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_aws_eks_cluster.py b/test/test_resource_remote_info_aws_eks_cluster.py
new file mode 100644
index 0000000..b97936b
--- /dev/null
+++ b/test/test_resource_remote_info_aws_eks_cluster.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.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster
+
+class TestResourceRemoteInfoAwsEksCluster(unittest.TestCase):
+ """ResourceRemoteInfoAwsEksCluster unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoAwsEksCluster:
+ """Test ResourceRemoteInfoAwsEksCluster
+ include_option 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 `ResourceRemoteInfoAwsEksCluster`
+ """
+ model = ResourceRemoteInfoAwsEksCluster()
+ if include_optional:
+ return ResourceRemoteInfoAwsEksCluster(
+ arn = 'arn:aws:eks:us-east-2:234234234234:cluster/testcluster',
+ account_id = '234234234234'
+ )
+ else:
+ return ResourceRemoteInfoAwsEksCluster(
+ arn = 'arn:aws:eks:us-east-2:234234234234:cluster/testcluster',
+ )
+ """
+
+ def testResourceRemoteInfoAwsEksCluster(self):
+ """Test ResourceRemoteInfoAwsEksCluster"""
+ # 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_aws_iam_role.py b/test/test_resource_remote_info_aws_iam_role.py
new file mode 100644
index 0000000..53bb46b
--- /dev/null
+++ b/test/test_resource_remote_info_aws_iam_role.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.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole
+
+class TestResourceRemoteInfoAwsIamRole(unittest.TestCase):
+ """ResourceRemoteInfoAwsIamRole unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoAwsIamRole:
+ """Test ResourceRemoteInfoAwsIamRole
+ include_option 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 `ResourceRemoteInfoAwsIamRole`
+ """
+ model = ResourceRemoteInfoAwsIamRole()
+ if include_optional:
+ return ResourceRemoteInfoAwsIamRole(
+ arn = 'arn:aws:iam::179308207300:role/MyRole',
+ account_id = '234234234234'
+ )
+ else:
+ return ResourceRemoteInfoAwsIamRole(
+ arn = 'arn:aws:iam::179308207300:role/MyRole',
+ )
+ """
+
+ def testResourceRemoteInfoAwsIamRole(self):
+ """Test ResourceRemoteInfoAwsIamRole"""
+ # 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_aws_permission_set.py b/test/test_resource_remote_info_aws_permission_set.py
new file mode 100644
index 0000000..4632eb2
--- /dev/null
+++ b/test/test_resource_remote_info_aws_permission_set.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.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet
+
+class TestResourceRemoteInfoAwsPermissionSet(unittest.TestCase):
+ """ResourceRemoteInfoAwsPermissionSet unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoAwsPermissionSet:
+ """Test ResourceRemoteInfoAwsPermissionSet
+ include_option 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 `ResourceRemoteInfoAwsPermissionSet`
+ """
+ model = ResourceRemoteInfoAwsPermissionSet()
+ if include_optional:
+ return ResourceRemoteInfoAwsPermissionSet(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234'
+ )
+ else:
+ return ResourceRemoteInfoAwsPermissionSet(
+ arn = 'arn:aws:sso:::permissionSet/asdf-32139302d201d32/ps-f03323201211e1b9',
+ account_id = '234234234234',
+ )
+ """
+
+ def testResourceRemoteInfoAwsPermissionSet(self):
+ """Test ResourceRemoteInfoAwsPermissionSet"""
+ # 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_aws_rds_instance.py b/test/test_resource_remote_info_aws_rds_instance.py
new file mode 100644
index 0000000..b590bac
--- /dev/null
+++ b/test/test_resource_remote_info_aws_rds_instance.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_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance
+
+class TestResourceRemoteInfoAwsRdsInstance(unittest.TestCase):
+ """ResourceRemoteInfoAwsRdsInstance unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoAwsRdsInstance:
+ """Test ResourceRemoteInfoAwsRdsInstance
+ include_option 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 `ResourceRemoteInfoAwsRdsInstance`
+ """
+ model = ResourceRemoteInfoAwsRdsInstance()
+ if include_optional:
+ return ResourceRemoteInfoAwsRdsInstance(
+ instance_id = 'demo-mysql-db',
+ region = 'us-east-2',
+ resource_id = 'db-AOO8V0XUCNU13XLZXQDQRSN0NQ',
+ account_id = '234234234234'
+ )
+ else:
+ return ResourceRemoteInfoAwsRdsInstance(
+ instance_id = 'demo-mysql-db',
+ region = 'us-east-2',
+ resource_id = 'db-AOO8V0XUCNU13XLZXQDQRSN0NQ',
+ )
+ """
+
+ def testResourceRemoteInfoAwsRdsInstance(self):
+ """Test ResourceRemoteInfoAwsRdsInstance"""
+ # 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_big_query_dataset.py b/test/test_resource_remote_info_gcp_big_query_dataset.py
new file mode 100644
index 0000000..43cb393
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_big_query_dataset.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.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset
+
+class TestResourceRemoteInfoGcpBigQueryDataset(unittest.TestCase):
+ """ResourceRemoteInfoGcpBigQueryDataset unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpBigQueryDataset:
+ """Test ResourceRemoteInfoGcpBigQueryDataset
+ include_option 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 `ResourceRemoteInfoGcpBigQueryDataset`
+ """
+ model = ResourceRemoteInfoGcpBigQueryDataset()
+ if include_optional:
+ return ResourceRemoteInfoGcpBigQueryDataset(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpBigQueryDataset(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpBigQueryDataset(self):
+ """Test ResourceRemoteInfoGcpBigQueryDataset"""
+ # 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_big_query_table.py b/test/test_resource_remote_info_gcp_big_query_table.py
new file mode 100644
index 0000000..2a2e712
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_big_query_table.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_big_query_table import ResourceRemoteInfoGcpBigQueryTable
+
+class TestResourceRemoteInfoGcpBigQueryTable(unittest.TestCase):
+ """ResourceRemoteInfoGcpBigQueryTable unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpBigQueryTable:
+ """Test ResourceRemoteInfoGcpBigQueryTable
+ include_option 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 `ResourceRemoteInfoGcpBigQueryTable`
+ """
+ model = ResourceRemoteInfoGcpBigQueryTable()
+ if include_optional:
+ return ResourceRemoteInfoGcpBigQueryTable(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321',
+ table_id = 'example-table-898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpBigQueryTable(
+ project_id = 'example-project-898931321',
+ dataset_id = 'example-dataset-898931321',
+ table_id = 'example-table-898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpBigQueryTable(self):
+ """Test ResourceRemoteInfoGcpBigQueryTable"""
+ # 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_bucket.py b/test/test_resource_remote_info_gcp_bucket.py
new file mode 100644
index 0000000..dda69fd
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_bucket.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.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket
+
+class TestResourceRemoteInfoGcpBucket(unittest.TestCase):
+ """ResourceRemoteInfoGcpBucket unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpBucket:
+ """Test ResourceRemoteInfoGcpBucket
+ include_option 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 `ResourceRemoteInfoGcpBucket`
+ """
+ model = ResourceRemoteInfoGcpBucket()
+ if include_optional:
+ return ResourceRemoteInfoGcpBucket(
+ bucket_id = 'example-bucket-898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpBucket(
+ bucket_id = 'example-bucket-898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpBucket(self):
+ """Test ResourceRemoteInfoGcpBucket"""
+ # 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_compute_instance.py b/test/test_resource_remote_info_gcp_compute_instance.py
new file mode 100644
index 0000000..34feee6
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_compute_instance.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_compute_instance import ResourceRemoteInfoGcpComputeInstance
+
+class TestResourceRemoteInfoGcpComputeInstance(unittest.TestCase):
+ """ResourceRemoteInfoGcpComputeInstance unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpComputeInstance:
+ """Test ResourceRemoteInfoGcpComputeInstance
+ include_option 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 `ResourceRemoteInfoGcpComputeInstance`
+ """
+ model = ResourceRemoteInfoGcpComputeInstance()
+ if include_optional:
+ return ResourceRemoteInfoGcpComputeInstance(
+ instance_id = 'example-instance-898931321',
+ project_id = 'example-project-898931321',
+ zone = 'us-central1-a'
+ )
+ else:
+ return ResourceRemoteInfoGcpComputeInstance(
+ instance_id = 'example-instance-898931321',
+ project_id = 'example-project-898931321',
+ zone = 'us-central1-a',
+ )
+ """
+
+ def testResourceRemoteInfoGcpComputeInstance(self):
+ """Test ResourceRemoteInfoGcpComputeInstance"""
+ # 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_folder.py b/test/test_resource_remote_info_gcp_folder.py
new file mode 100644
index 0000000..09ea08c
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_folder.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.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder
+
+class TestResourceRemoteInfoGcpFolder(unittest.TestCase):
+ """ResourceRemoteInfoGcpFolder unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpFolder:
+ """Test ResourceRemoteInfoGcpFolder
+ include_option 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 `ResourceRemoteInfoGcpFolder`
+ """
+ model = ResourceRemoteInfoGcpFolder()
+ if include_optional:
+ return ResourceRemoteInfoGcpFolder(
+ folder_id = 'folder/898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpFolder(
+ folder_id = 'folder/898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpFolder(self):
+ """Test ResourceRemoteInfoGcpFolder"""
+ # 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_gke_cluster.py b/test/test_resource_remote_info_gcp_gke_cluster.py
new file mode 100644
index 0000000..2398661
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_gke_cluster.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.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster
+
+class TestResourceRemoteInfoGcpGkeCluster(unittest.TestCase):
+ """ResourceRemoteInfoGcpGkeCluster unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpGkeCluster:
+ """Test ResourceRemoteInfoGcpGkeCluster
+ include_option 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 `ResourceRemoteInfoGcpGkeCluster`
+ """
+ model = ResourceRemoteInfoGcpGkeCluster()
+ if include_optional:
+ return ResourceRemoteInfoGcpGkeCluster(
+ cluster_name = 'example-cluster-898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpGkeCluster(
+ cluster_name = 'example-cluster-898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpGkeCluster(self):
+ """Test ResourceRemoteInfoGcpGkeCluster"""
+ # 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_organization.py b/test/test_resource_remote_info_gcp_organization.py
new file mode 100644
index 0000000..08858c5
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_organization.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.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization
+
+class TestResourceRemoteInfoGcpOrganization(unittest.TestCase):
+ """ResourceRemoteInfoGcpOrganization unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpOrganization:
+ """Test ResourceRemoteInfoGcpOrganization
+ include_option 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 `ResourceRemoteInfoGcpOrganization`
+ """
+ model = ResourceRemoteInfoGcpOrganization()
+ if include_optional:
+ return ResourceRemoteInfoGcpOrganization(
+ organization_id = 'organizations/898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpOrganization(
+ organization_id = 'organizations/898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpOrganization(self):
+ """Test ResourceRemoteInfoGcpOrganization"""
+ # 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_project.py b/test/test_resource_remote_info_gcp_project.py
new file mode 100644
index 0000000..575f78b
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_project.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.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject
+
+class TestResourceRemoteInfoGcpProject(unittest.TestCase):
+ """ResourceRemoteInfoGcpProject unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpProject:
+ """Test ResourceRemoteInfoGcpProject
+ include_option 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 `ResourceRemoteInfoGcpProject`
+ """
+ model = ResourceRemoteInfoGcpProject()
+ if include_optional:
+ return ResourceRemoteInfoGcpProject(
+ project_id = 'example-project-898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpProject(
+ project_id = 'example-project-898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpProject(self):
+ """Test ResourceRemoteInfoGcpProject"""
+ # 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_sql_instance.py b/test/test_resource_remote_info_gcp_sql_instance.py
new file mode 100644
index 0000000..7adead7
--- /dev/null
+++ b/test/test_resource_remote_info_gcp_sql_instance.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.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance
+
+class TestResourceRemoteInfoGcpSqlInstance(unittest.TestCase):
+ """ResourceRemoteInfoGcpSqlInstance unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGcpSqlInstance:
+ """Test ResourceRemoteInfoGcpSqlInstance
+ include_option 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 `ResourceRemoteInfoGcpSqlInstance`
+ """
+ model = ResourceRemoteInfoGcpSqlInstance()
+ if include_optional:
+ return ResourceRemoteInfoGcpSqlInstance(
+ instance_id = 'example-sql-898931321',
+ project_id = 'example-project-898931321'
+ )
+ else:
+ return ResourceRemoteInfoGcpSqlInstance(
+ instance_id = 'example-sql-898931321',
+ project_id = 'example-project-898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGcpSqlInstance(self):
+ """Test ResourceRemoteInfoGcpSqlInstance"""
+ # 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_github_repo.py b/test/test_resource_remote_info_github_repo.py
new file mode 100644
index 0000000..f8dc285
--- /dev/null
+++ b/test/test_resource_remote_info_github_repo.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.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo
+
+class TestResourceRemoteInfoGithubRepo(unittest.TestCase):
+ """ResourceRemoteInfoGithubRepo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGithubRepo:
+ """Test ResourceRemoteInfoGithubRepo
+ include_option 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 `ResourceRemoteInfoGithubRepo`
+ """
+ model = ResourceRemoteInfoGithubRepo()
+ if include_optional:
+ return ResourceRemoteInfoGithubRepo(
+ repo_id = '898931321',
+ repo_name = 'Opal Security'
+ )
+ else:
+ return ResourceRemoteInfoGithubRepo(
+ repo_name = 'Opal Security',
+ )
+ """
+
+ def testResourceRemoteInfoGithubRepo(self):
+ """Test ResourceRemoteInfoGithubRepo"""
+ # 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_gitlab_project.py b/test/test_resource_remote_info_gitlab_project.py
new file mode 100644
index 0000000..6b0045f
--- /dev/null
+++ b/test/test_resource_remote_info_gitlab_project.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.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject
+
+class TestResourceRemoteInfoGitlabProject(unittest.TestCase):
+ """ResourceRemoteInfoGitlabProject unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoGitlabProject:
+ """Test ResourceRemoteInfoGitlabProject
+ include_option 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 `ResourceRemoteInfoGitlabProject`
+ """
+ model = ResourceRemoteInfoGitlabProject()
+ if include_optional:
+ return ResourceRemoteInfoGitlabProject(
+ project_id = '898931321'
+ )
+ else:
+ return ResourceRemoteInfoGitlabProject(
+ project_id = '898931321',
+ )
+ """
+
+ def testResourceRemoteInfoGitlabProject(self):
+ """Test ResourceRemoteInfoGitlabProject"""
+ # 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_okta_app.py b/test/test_resource_remote_info_okta_app.py
new file mode 100644
index 0000000..5bb7f30
--- /dev/null
+++ b/test/test_resource_remote_info_okta_app.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.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp
+
+class TestResourceRemoteInfoOktaApp(unittest.TestCase):
+ """ResourceRemoteInfoOktaApp unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoOktaApp:
+ """Test ResourceRemoteInfoOktaApp
+ include_option 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 `ResourceRemoteInfoOktaApp`
+ """
+ model = ResourceRemoteInfoOktaApp()
+ if include_optional:
+ return ResourceRemoteInfoOktaApp(
+ app_id = 'a9dfas0f678asdf67867'
+ )
+ else:
+ return ResourceRemoteInfoOktaApp(
+ app_id = 'a9dfas0f678asdf67867',
+ )
+ """
+
+ def testResourceRemoteInfoOktaApp(self):
+ """Test ResourceRemoteInfoOktaApp"""
+ # 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_okta_custom_role.py b/test/test_resource_remote_info_okta_custom_role.py
new file mode 100644
index 0000000..95951ee
--- /dev/null
+++ b/test/test_resource_remote_info_okta_custom_role.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.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole
+
+class TestResourceRemoteInfoOktaCustomRole(unittest.TestCase):
+ """ResourceRemoteInfoOktaCustomRole unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoOktaCustomRole:
+ """Test ResourceRemoteInfoOktaCustomRole
+ include_option 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 `ResourceRemoteInfoOktaCustomRole`
+ """
+ model = ResourceRemoteInfoOktaCustomRole()
+ if include_optional:
+ return ResourceRemoteInfoOktaCustomRole(
+ role_id = 'a9dfas0f678asdf67867'
+ )
+ else:
+ return ResourceRemoteInfoOktaCustomRole(
+ role_id = 'a9dfas0f678asdf67867',
+ )
+ """
+
+ def testResourceRemoteInfoOktaCustomRole(self):
+ """Test ResourceRemoteInfoOktaCustomRole"""
+ # 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_okta_standard_role.py b/test/test_resource_remote_info_okta_standard_role.py
new file mode 100644
index 0000000..fa156a3
--- /dev/null
+++ b/test/test_resource_remote_info_okta_standard_role.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.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole
+
+class TestResourceRemoteInfoOktaStandardRole(unittest.TestCase):
+ """ResourceRemoteInfoOktaStandardRole unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoOktaStandardRole:
+ """Test ResourceRemoteInfoOktaStandardRole
+ include_option 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 `ResourceRemoteInfoOktaStandardRole`
+ """
+ model = ResourceRemoteInfoOktaStandardRole()
+ if include_optional:
+ return ResourceRemoteInfoOktaStandardRole(
+ role_type = 'ORG_ADMIN'
+ )
+ else:
+ return ResourceRemoteInfoOktaStandardRole(
+ role_type = 'ORG_ADMIN',
+ )
+ """
+
+ def testResourceRemoteInfoOktaStandardRole(self):
+ """Test ResourceRemoteInfoOktaStandardRole"""
+ # 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_pagerduty_role.py b/test/test_resource_remote_info_pagerduty_role.py
new file mode 100644
index 0000000..e3f9e44
--- /dev/null
+++ b/test/test_resource_remote_info_pagerduty_role.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.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole
+
+class TestResourceRemoteInfoPagerdutyRole(unittest.TestCase):
+ """ResourceRemoteInfoPagerdutyRole unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoPagerdutyRole:
+ """Test ResourceRemoteInfoPagerdutyRole
+ include_option 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 `ResourceRemoteInfoPagerdutyRole`
+ """
+ model = ResourceRemoteInfoPagerdutyRole()
+ if include_optional:
+ return ResourceRemoteInfoPagerdutyRole(
+ role_name = 'owner'
+ )
+ else:
+ return ResourceRemoteInfoPagerdutyRole(
+ role_name = 'owner',
+ )
+ """
+
+ def testResourceRemoteInfoPagerdutyRole(self):
+ """Test ResourceRemoteInfoPagerdutyRole"""
+ # 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_salesforce_permission_set.py b/test/test_resource_remote_info_salesforce_permission_set.py
new file mode 100644
index 0000000..4ff4882
--- /dev/null
+++ b/test/test_resource_remote_info_salesforce_permission_set.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.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet
+
+class TestResourceRemoteInfoSalesforcePermissionSet(unittest.TestCase):
+ """ResourceRemoteInfoSalesforcePermissionSet unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoSalesforcePermissionSet:
+ """Test ResourceRemoteInfoSalesforcePermissionSet
+ include_option 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 `ResourceRemoteInfoSalesforcePermissionSet`
+ """
+ model = ResourceRemoteInfoSalesforcePermissionSet()
+ if include_optional:
+ return ResourceRemoteInfoSalesforcePermissionSet(
+ permission_set_id = '0PS5Y090202wOV7WAM'
+ )
+ else:
+ return ResourceRemoteInfoSalesforcePermissionSet(
+ permission_set_id = '0PS5Y090202wOV7WAM',
+ )
+ """
+
+ def testResourceRemoteInfoSalesforcePermissionSet(self):
+ """Test ResourceRemoteInfoSalesforcePermissionSet"""
+ # 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_salesforce_profile.py b/test/test_resource_remote_info_salesforce_profile.py
new file mode 100644
index 0000000..01af6c9
--- /dev/null
+++ b/test/test_resource_remote_info_salesforce_profile.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.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile
+
+class TestResourceRemoteInfoSalesforceProfile(unittest.TestCase):
+ """ResourceRemoteInfoSalesforceProfile unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoSalesforceProfile:
+ """Test ResourceRemoteInfoSalesforceProfile
+ include_option 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 `ResourceRemoteInfoSalesforceProfile`
+ """
+ model = ResourceRemoteInfoSalesforceProfile()
+ if include_optional:
+ return ResourceRemoteInfoSalesforceProfile(
+ profile_id = '0PS5Y090202wOV7WAM',
+ user_license_id = '1005Y030081Qb5XJHS'
+ )
+ else:
+ return ResourceRemoteInfoSalesforceProfile(
+ profile_id = '0PS5Y090202wOV7WAM',
+ user_license_id = '1005Y030081Qb5XJHS',
+ )
+ """
+
+ def testResourceRemoteInfoSalesforceProfile(self):
+ """Test ResourceRemoteInfoSalesforceProfile"""
+ # 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_salesforce_role.py b/test/test_resource_remote_info_salesforce_role.py
new file mode 100644
index 0000000..772d614
--- /dev/null
+++ b/test/test_resource_remote_info_salesforce_role.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.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole
+
+class TestResourceRemoteInfoSalesforceRole(unittest.TestCase):
+ """ResourceRemoteInfoSalesforceRole unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoSalesforceRole:
+ """Test ResourceRemoteInfoSalesforceRole
+ include_option 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 `ResourceRemoteInfoSalesforceRole`
+ """
+ model = ResourceRemoteInfoSalesforceRole()
+ if include_optional:
+ return ResourceRemoteInfoSalesforceRole(
+ role_id = '0PS5Y090202wOV7WAM'
+ )
+ else:
+ return ResourceRemoteInfoSalesforceRole(
+ role_id = '0PS5Y090202wOV7WAM',
+ )
+ """
+
+ def testResourceRemoteInfoSalesforceRole(self):
+ """Test ResourceRemoteInfoSalesforceRole"""
+ # 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_teleport_role.py b/test/test_resource_remote_info_teleport_role.py
new file mode 100644
index 0000000..2be677f
--- /dev/null
+++ b/test/test_resource_remote_info_teleport_role.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.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole
+
+class TestResourceRemoteInfoTeleportRole(unittest.TestCase):
+ """ResourceRemoteInfoTeleportRole unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceRemoteInfoTeleportRole:
+ """Test ResourceRemoteInfoTeleportRole
+ include_option 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 `ResourceRemoteInfoTeleportRole`
+ """
+ model = ResourceRemoteInfoTeleportRole()
+ if include_optional:
+ return ResourceRemoteInfoTeleportRole(
+ role_name = 'admin_role'
+ )
+ else:
+ return ResourceRemoteInfoTeleportRole(
+ role_name = 'admin_role',
+ )
+ """
+
+ def testResourceRemoteInfoTeleportRole(self):
+ """Test ResourceRemoteInfoTeleportRole"""
+ # 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_with_access_level.py b/test/test_resource_with_access_level.py
new file mode 100644
index 0000000..c9ef179
--- /dev/null
+++ b/test/test_resource_with_access_level.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.resource_with_access_level import ResourceWithAccessLevel
+
+class TestResourceWithAccessLevel(unittest.TestCase):
+ """ResourceWithAccessLevel unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ResourceWithAccessLevel:
+ """Test ResourceWithAccessLevel
+ include_option 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 `ResourceWithAccessLevel`
+ """
+ model = ResourceWithAccessLevel()
+ if include_optional:
+ return ResourceWithAccessLevel(
+ resource_id = 'b5a5ca27-0ea3-4d86-9199-2126d57d1fbd',
+ access_level_remote_id = 'write'
+ )
+ else:
+ return ResourceWithAccessLevel(
+ resource_id = 'b5a5ca27-0ea3-4d86-9199-2126d57d1fbd',
+ )
+ """
+
+ def testResourceWithAccessLevel(self):
+ """Test ResourceWithAccessLevel"""
+ # 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_reviewer_stage.py b/test/test_reviewer_stage.py
new file mode 100644
index 0000000..0d10861
--- /dev/null
+++ b/test/test_reviewer_stage.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.reviewer_stage import ReviewerStage
+
+class TestReviewerStage(unittest.TestCase):
+ """ReviewerStage unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ReviewerStage:
+ """Test ReviewerStage
+ include_option 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 `ReviewerStage`
+ """
+ model = ReviewerStage()
+ if include_optional:
+ return ReviewerStage(
+ require_manager_approval = False,
+ operator = 'AND',
+ owner_ids = [
+ ''
+ ]
+ )
+ else:
+ return ReviewerStage(
+ require_manager_approval = False,
+ operator = 'AND',
+ owner_ids = [
+ ''
+ ],
+ )
+ """
+
+ def testReviewerStage(self):
+ """Test ReviewerStage"""
+ # 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_reviewer_stage_list.py b/test/test_reviewer_stage_list.py
new file mode 100644
index 0000000..2bbcbe6
--- /dev/null
+++ b/test/test_reviewer_stage_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.reviewer_stage_list import ReviewerStageList
+
+class TestReviewerStageList(unittest.TestCase):
+ """ReviewerStageList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> ReviewerStageList:
+ """Test ReviewerStageList
+ include_option 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 `ReviewerStageList`
+ """
+ model = ReviewerStageList()
+ if include_optional:
+ return ReviewerStageList(
+ stages = [
+ {"owner_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]}
+ ]
+ )
+ else:
+ return ReviewerStageList(
+ stages = [
+ {"owner_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]}
+ ],
+ )
+ """
+
+ def testReviewerStageList(self):
+ """Test ReviewerStageList"""
+ # 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_sub_event.py b/test/test_sub_event.py
new file mode 100644
index 0000000..19510f7
--- /dev/null
+++ b/test/test_sub_event.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.sub_event import SubEvent
+
+class TestSubEvent(unittest.TestCase):
+ """SubEvent unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> SubEvent:
+ """Test SubEvent
+ include_option 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 `SubEvent`
+ """
+ model = SubEvent()
+ if include_optional:
+ return SubEvent(
+ sub_event_type = 'USERS_CREATED'
+ )
+ else:
+ return SubEvent(
+ sub_event_type = 'USERS_CREATED',
+ )
+ """
+
+ def testSubEvent(self):
+ """Test SubEvent"""
+ # 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_tag_filter.py b/test/test_tag_filter.py
new file mode 100644
index 0000000..1df1227
--- /dev/null
+++ b/test/test_tag_filter.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.tag_filter import TagFilter
+
+class TestTagFilter(unittest.TestCase):
+ """TagFilter unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> TagFilter:
+ """Test TagFilter
+ include_option 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 `TagFilter`
+ """
+ model = TagFilter()
+ if include_optional:
+ return TagFilter(
+ key = 'uar_scope',
+ value = 'high_priority'
+ )
+ else:
+ return TagFilter(
+ key = 'uar_scope',
+ )
+ """
+
+ def testTagFilter(self):
+ """Test TagFilter"""
+ # 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_uar.py b/test/test_uar.py
new file mode 100644
index 0000000..6852e4b
--- /dev/null
+++ b/test/test_uar.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.uar import UAR
+
+class TestUAR(unittest.TestCase):
+ """UAR unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UAR:
+ """Test UAR
+ include_option 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 `UAR`
+ """
+ model = UAR()
+ if include_optional:
+ return UAR(
+ uar_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ name = 'Monthly UAR (July)',
+ reviewer_assignment_policy = 'MANUALLY',
+ send_reviewer_assignment_notification = False,
+ deadline = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ time_zone = 'America/Los_Angeles',
+ self_review_allowed = False,
+ uar_scope = {"tags":[{"key":"uar_scope","value":"high_priority"}],"names":["demo","api"],"admins":["f454d283-ca87-4a8a-bdbb-df212eca5353","8763d283-ca87-4a8a-bdbb-df212ecab139"]}
+ )
+ else:
+ return UAR(
+ uar_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ name = 'Monthly UAR (July)',
+ reviewer_assignment_policy = 'MANUALLY',
+ send_reviewer_assignment_notification = False,
+ deadline = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ time_zone = 'America/Los_Angeles',
+ self_review_allowed = False,
+ )
+ """
+
+ def testUAR(self):
+ """Test UAR"""
+ # 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_uar_reviewer_assignment_policy_enum.py b/test/test_uar_reviewer_assignment_policy_enum.py
new file mode 100644
index 0000000..a5e25d7
--- /dev/null
+++ b/test/test_uar_reviewer_assignment_policy_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.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum
+
+class TestUARReviewerAssignmentPolicyEnum(unittest.TestCase):
+ """UARReviewerAssignmentPolicyEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testUARReviewerAssignmentPolicyEnum(self):
+ """Test UARReviewerAssignmentPolicyEnum"""
+ # inst = UARReviewerAssignmentPolicyEnum()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_uar_scope.py b/test/test_uar_scope.py
new file mode 100644
index 0000000..cb61b57
--- /dev/null
+++ b/test/test_uar_scope.py
@@ -0,0 +1,60 @@
+# 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.uar_scope import UARScope
+
+class TestUARScope(unittest.TestCase):
+ """UARScope unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UARScope:
+ """Test UARScope
+ include_option 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 `UARScope`
+ """
+ model = UARScope()
+ if include_optional:
+ return UARScope(
+ tags = [
+ {"key":"uar_scope","value":"high_priority"}
+ ],
+ names = [
+ 'demo'
+ ],
+ admins = [
+ 'f454d283-ca87-4a8a-bdbb-df212eca5353'
+ ]
+ )
+ else:
+ return UARScope(
+ )
+ """
+
+ def testUARScope(self):
+ """Test UARScope"""
+ # 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_uars_api.py b/test/test_uars_api.py
new file mode 100644
index 0000000..45f75fe
--- /dev/null
+++ b/test/test_uars_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.uars_api import UarsApi
+
+
+class TestUarsApi(unittest.TestCase):
+ """UarsApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = UarsApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_create_uar(self) -> None:
+ """Test case for create_uar
+
+ """
+ pass
+
+ def test_get_uar(self) -> None:
+ """Test case for get_uar
+
+ """
+ pass
+
+ def test_get_uars(self) -> None:
+ """Test case for get_uars
+
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_update_configuration_template_info.py b/test/test_update_configuration_template_info.py
new file mode 100644
index 0000000..919d4e0
--- /dev/null
+++ b/test/test_update_configuration_template_info.py
@@ -0,0 +1,65 @@
+# 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_configuration_template_info import UpdateConfigurationTemplateInfo
+
+class TestUpdateConfigurationTemplateInfo(unittest.TestCase):
+ """UpdateConfigurationTemplateInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateConfigurationTemplateInfo:
+ """Test UpdateConfigurationTemplateInfo
+ include_option 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 `UpdateConfigurationTemplateInfo`
+ """
+ model = UpdateConfigurationTemplateInfo()
+ if include_optional:
+ return UpdateConfigurationTemplateInfo(
+ configuration_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ name = 'Prod AWS Template',
+ admin_owner_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ visibility = {"visibility":"LIMITED","visibility_group_ids":["7870617d-e72a-47f5-a84c-693817ab4567","1520617d-e72a-47f5-a84c-693817ab48ad2"]},
+ linked_audit_message_channel_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ request_configurations = [
+ {"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e8","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","created_at":"2021-01-06T20:00:00Z","updated_at":"2021-01-06T20:00:00Z","condition":{"group_id":"1b978423-db0a-4037-a4cf-f79c60cb67b3"},"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":1}
+ ],
+ request_configuration_list = {"request_configurations":[{"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e8","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","condition":null,"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":0},{"request_configuration_id":"7c86c85d-0651-43e2-a748-d69d658418e9","organization_id":"w86c85d-0651-43e2-a748-d69d658418e8","condition":{"group_id":"1b978423-db0a-4037-a4cf-f79c60cb67b4"},"allow_requests":true,"auto_approval":false,"require_mfa_to_request":false,"max_duration_minutes":120,"recommended_duration_minutes":120,"require_support_ticket":false,"reviewer_stages":[{"reviewer_stage_id":"7c86c85d-0651-43e2-a748-d69d658418e8","owner_ids":["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],"stage":1}],"priority":1}]},
+ member_oncall_schedule_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","7c86c85d-0651-43e2-a748-d69d658418e8"],
+ break_glass_user_ids = ["37cb7e41-12ba-46da-92ff-030abe0450b1","37cb7e41-12ba-46da-92ff-030abe0450b2"],
+ require_mfa_to_approve = False,
+ require_mfa_to_connect = False
+ )
+ else:
+ return UpdateConfigurationTemplateInfo(
+ configuration_template_id = '7c86c85d-0651-43e2-a748-d69d658418e8',
+ )
+ """
+
+ def testUpdateConfigurationTemplateInfo(self):
+ """Test UpdateConfigurationTemplateInfo"""
+ # 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_group_binding_info.py b/test/test_update_group_binding_info.py
new file mode 100644
index 0000000..8cb9f36
--- /dev/null
+++ b/test/test_update_group_binding_info.py
@@ -0,0 +1,63 @@
+# 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_group_binding_info import UpdateGroupBindingInfo
+
+class TestUpdateGroupBindingInfo(unittest.TestCase):
+ """UpdateGroupBindingInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateGroupBindingInfo:
+ """Test UpdateGroupBindingInfo
+ include_option 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 `UpdateGroupBindingInfo`
+ """
+ model = UpdateGroupBindingInfo()
+ if include_optional:
+ return UpdateGroupBindingInfo(
+ group_binding_id = '0ae19dbf-324d-4216-999c-574d46182c7e',
+ source_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ groups = [
+ opal.models.create_group_binding_info_groups_inner.CreateGroupBindingInfo_groups_inner(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', )
+ ]
+ )
+ else:
+ return UpdateGroupBindingInfo(
+ group_binding_id = '0ae19dbf-324d-4216-999c-574d46182c7e',
+ source_group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ groups = [
+ opal.models.create_group_binding_info_groups_inner.CreateGroupBindingInfo_groups_inner(
+ group_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353', )
+ ],
+ )
+ """
+
+ def testUpdateGroupBindingInfo(self):
+ """Test UpdateGroupBindingInfo"""
+ # 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_group_binding_info_list.py b/test/test_update_group_binding_info_list.py
new file mode 100644
index 0000000..66b5588
--- /dev/null
+++ b/test/test_update_group_binding_info_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.update_group_binding_info_list import UpdateGroupBindingInfoList
+
+class TestUpdateGroupBindingInfoList(unittest.TestCase):
+ """UpdateGroupBindingInfoList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateGroupBindingInfoList:
+ """Test UpdateGroupBindingInfoList
+ include_option 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 `UpdateGroupBindingInfoList`
+ """
+ model = UpdateGroupBindingInfoList()
+ if include_optional:
+ return UpdateGroupBindingInfoList(
+ group_bindings = [
+ {"group_binding_id":"0ae19dbf-324d-4216-999c-574d46182c7e","source_group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","groups":[{"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353"},{"group_id":"99d0b81d-14be-4cf6-bd27-348b4af1d11b"}]}
+ ]
+ )
+ else:
+ return UpdateGroupBindingInfoList(
+ group_bindings = [
+ {"group_binding_id":"0ae19dbf-324d-4216-999c-574d46182c7e","source_group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","groups":[{"group_id":"f454d283-ca87-4a8a-bdbb-df212eca5353"},{"group_id":"99d0b81d-14be-4cf6-bd27-348b4af1d11b"}]}
+ ],
+ )
+ """
+
+ def testUpdateGroupBindingInfoList(self):
+ """Test UpdateGroupBindingInfoList"""
+ # 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_group_resources_info.py b/test/test_update_group_resources_info.py
new file mode 100644
index 0000000..8007301
--- /dev/null
+++ b/test/test_update_group_resources_info.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.update_group_resources_info import UpdateGroupResourcesInfo
+
+class TestUpdateGroupResourcesInfo(unittest.TestCase):
+ """UpdateGroupResourcesInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateGroupResourcesInfo:
+ """Test UpdateGroupResourcesInfo
+ include_option 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 `UpdateGroupResourcesInfo`
+ """
+ model = UpdateGroupResourcesInfo()
+ if include_optional:
+ return UpdateGroupResourcesInfo(
+ resources = [
+ {"resource_id":"b5a5ca27-0ea3-4d86-9199-2126d57d1fbd","access_level_remote_id":"write"}
+ ]
+ )
+ else:
+ return UpdateGroupResourcesInfo(
+ resources = [
+ {"resource_id":"b5a5ca27-0ea3-4d86-9199-2126d57d1fbd","access_level_remote_id":"write"}
+ ],
+ )
+ """
+
+ def testUpdateGroupResourcesInfo(self):
+ """Test UpdateGroupResourcesInfo"""
+ # 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_owner_info.py b/test/test_update_owner_info.py
new file mode 100644
index 0000000..622f6ab
--- /dev/null
+++ b/test/test_update_owner_info.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.update_owner_info import UpdateOwnerInfo
+
+class TestUpdateOwnerInfo(unittest.TestCase):
+ """UpdateOwnerInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateOwnerInfo:
+ """Test UpdateOwnerInfo
+ include_option 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 `UpdateOwnerInfo`
+ """
+ model = UpdateOwnerInfo()
+ if include_optional:
+ return UpdateOwnerInfo(
+ owner_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ name = 'API Owner',
+ description = 'This owner represents the API team owners.',
+ access_request_escalation_period = 120,
+ reviewer_message_channel_id = '37cb7e41-12ba-46da-92ff-030abe0450b1',
+ source_group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3'
+ )
+ else:
+ return UpdateOwnerInfo(
+ owner_id = 'f454d283-ca87-4a8a-bdbb-df212eca5353',
+ )
+ """
+
+ def testUpdateOwnerInfo(self):
+ """Test UpdateOwnerInfo"""
+ # 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_owner_info_list.py b/test/test_update_owner_info_list.py
new file mode 100644
index 0000000..b81aeb6
--- /dev/null
+++ b/test/test_update_owner_info_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.update_owner_info_list import UpdateOwnerInfoList
+
+class TestUpdateOwnerInfoList(unittest.TestCase):
+ """UpdateOwnerInfoList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UpdateOwnerInfoList:
+ """Test UpdateOwnerInfoList
+ include_option 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 `UpdateOwnerInfoList`
+ """
+ model = UpdateOwnerInfoList()
+ if include_optional:
+ return UpdateOwnerInfoList(
+ owners = [
+ {"owner_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"API Owner","description":"This owner represents the API team owners.","access_request_escalation_period":120}
+ ]
+ )
+ else:
+ return UpdateOwnerInfoList(
+ owners = [
+ {"owner_id":"f454d283-ca87-4a8a-bdbb-df212eca5353","name":"API Owner","description":"This owner represents the API team owners.","access_request_escalation_period":120}
+ ],
+ )
+ """
+
+ def testUpdateOwnerInfoList(self):
+ """Test UpdateOwnerInfoList"""
+ # 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_user_hr_idp_status_enum.py b/test/test_user_hr_idp_status_enum.py
new file mode 100644
index 0000000..2783f1e
--- /dev/null
+++ b/test/test_user_hr_idp_status_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.user_hr_idp_status_enum import UserHrIdpStatusEnum
+
+class TestUserHrIdpStatusEnum(unittest.TestCase):
+ """UserHrIdpStatusEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testUserHrIdpStatusEnum(self):
+ """Test UserHrIdpStatusEnum"""
+ # inst = UserHrIdpStatusEnum()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_user_id_list.py b/test/test_user_id_list.py
new file mode 100644
index 0000000..f15688a
--- /dev/null
+++ b/test/test_user_id_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.user_id_list import UserIDList
+
+class TestUserIDList(unittest.TestCase):
+ """UserIDList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UserIDList:
+ """Test UserIDList
+ include_option 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 `UserIDList`
+ """
+ model = UserIDList()
+ if include_optional:
+ return UserIDList(
+ user_ids = [
+ ''
+ ]
+ )
+ else:
+ return UserIDList(
+ user_ids = [
+ ''
+ ],
+ )
+ """
+
+ def testUserIDList(self):
+ """Test UserIDList"""
+ # 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_user_list.py b/test/test_user_list.py
new file mode 100644
index 0000000..fd0eeeb
--- /dev/null
+++ b/test/test_user_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.user_list import UserList
+
+class TestUserList(unittest.TestCase):
+ """UserList unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> UserList:
+ """Test UserList
+ include_option 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 `UserList`
+ """
+ model = UserList()
+ if include_optional:
+ return UserList(
+ users = [
+ {"user_id":"29827fb8-f2dd-4e80-9576-28e31e9934ac","email":"1b978423-db0a-4037-a4cf-f79c60cb67b3","full_name":"John Doe","first_name":"John","last_name":"Doe","position":"Engineer"}
+ ]
+ )
+ else:
+ return UserList(
+ users = [
+ {"user_id":"29827fb8-f2dd-4e80-9576-28e31e9934ac","email":"1b978423-db0a-4037-a4cf-f79c60cb67b3","full_name":"John Doe","first_name":"John","last_name":"Doe","position":"Engineer"}
+ ],
+ )
+ """
+
+ def testUserList(self):
+ """Test UserList"""
+ # 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_visibility_info.py b/test/test_visibility_info.py
new file mode 100644
index 0000000..4ed4282
--- /dev/null
+++ b/test/test_visibility_info.py
@@ -0,0 +1,56 @@
+# 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.visibility_info import VisibilityInfo
+
+class TestVisibilityInfo(unittest.TestCase):
+ """VisibilityInfo unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> VisibilityInfo:
+ """Test VisibilityInfo
+ include_option 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 `VisibilityInfo`
+ """
+ model = VisibilityInfo()
+ if include_optional:
+ return VisibilityInfo(
+ visibility = 'GLOBAL',
+ visibility_group_ids = [
+ ''
+ ]
+ )
+ else:
+ return VisibilityInfo(
+ visibility = 'GLOBAL',
+ )
+ """
+
+ def testVisibilityInfo(self):
+ """Test VisibilityInfo"""
+ # 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_visibility_type_enum.py b/test/test_visibility_type_enum.py
new file mode 100644
index 0000000..8fc3e66
--- /dev/null
+++ b/test/test_visibility_type_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.visibility_type_enum import VisibilityTypeEnum
+
+class TestVisibilityTypeEnum(unittest.TestCase):
+ """VisibilityTypeEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testVisibilityTypeEnum(self):
+ """Test VisibilityTypeEnum"""
+ # inst = VisibilityTypeEnum()
+
+if __name__ == '__main__':
+ unittest.main()