diff --git a/.github/workflows/build-and-publish-to-pypi.yml b/.github/workflows/build-and-publish-to-pypi.yml new file mode 100644 index 0000000..2280541 --- /dev/null +++ b/.github/workflows/build-and-publish-to-pypi.yml @@ -0,0 +1,28 @@ +name: Publish to PyPI +on: + push: + tags: + - 'v*' +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build twine setuptools_scm + - name: Build the package + run: | + python -m build + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_ACCESS_TOKEN }} + run: | + python -m twine upload dist/* --skip-existing diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 31c2a22..aa2878d 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -3,7 +3,7 @@ # # ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: opal Python package +name: opal_security Python package on: [push, pull_request] diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9f1424..8d6b781 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ stages: script: - pip install -r requirements.txt - pip install -r test-requirements.txt - - pytest --cov=opal + - pytest --cov=opal_security pytest-3.8: extends: .pytest diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1d883f0..8b24904 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -169,180 +169,180 @@ docs/UsersApi.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/idp_group_mappings_api.py -opal/api/message_channels_api.py -opal/api/non_human_identities_api.py -opal/api/on_call_schedules_api.py -opal/api/owners_api.py -opal/api/requests_api.py -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/api_response.py -opal/configuration.py -opal/exceptions.py -opal/models/__init__.py -opal/models/access.py -opal/models/access_list.py -opal/models/add_group_resource_request.py -opal/models/add_group_user_request.py -opal/models/add_resource_nhi_request.py -opal/models/add_resource_user_request.py -opal/models/app.py -opal/models/app_type_enum.py -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_request200_response.py -opal/models/create_request_configuration_info_list.py -opal/models/create_request_info.py -opal/models/create_request_info_custom_metadata_inner.py -opal/models/create_request_info_groups_inner.py -opal/models/create_request_info_resources_inner.py -opal/models/create_request_info_support_ticket.py -opal/models/create_resource_info.py -opal/models/create_tag_info.py -opal/models/create_uar_info.py -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/idp_group_mapping.py -opal/models/idp_group_mapping_list.py -opal/models/message_channel.py -opal/models/message_channel_id_list.py -opal/models/message_channel_list.py -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_nhi.py -opal/models/resource_remote_info.py -opal/models/resource_remote_info_aws_account.py -opal/models/resource_remote_info_aws_ec2_instance.py -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_service_account.py -opal/models/resource_remote_info_gcp_sql_instance.py -opal/models/resource_remote_info_github_repo.py -opal/models/resource_remote_info_gitlab_project.py -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/risk_sensitivity_enum.py -opal/models/session.py -opal/models/sessions_list.py -opal/models/sub_event.py -opal/models/tag.py -opal/models/tag_filter.py -opal/models/tags_list.py -opal/models/ticket_propagation_configuration.py -opal/models/ticketing_provider_enum.py -opal/models/uar.py -opal/models/uar_reviewer_assignment_policy_enum.py -opal/models/uar_scope.py -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_idp_group_mappings_request.py -opal/models/update_idp_group_mappings_request_mappings_inner.py -opal/models/update_owner_info.py -opal/models/update_owner_info_list.py -opal/models/update_resource_info.py -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 +opal_security/__init__.py +opal_security/api/__init__.py +opal_security/api/apps_api.py +opal_security/api/configuration_templates_api.py +opal_security/api/events_api.py +opal_security/api/group_bindings_api.py +opal_security/api/groups_api.py +opal_security/api/idp_group_mappings_api.py +opal_security/api/message_channels_api.py +opal_security/api/non_human_identities_api.py +opal_security/api/on_call_schedules_api.py +opal_security/api/owners_api.py +opal_security/api/requests_api.py +opal_security/api/resources_api.py +opal_security/api/sessions_api.py +opal_security/api/tags_api.py +opal_security/api/uars_api.py +opal_security/api/users_api.py +opal_security/api_client.py +opal_security/api_response.py +opal_security/configuration.py +opal_security/exceptions.py +opal_security/models/__init__.py +opal_security/models/access.py +opal_security/models/access_list.py +opal_security/models/add_group_resource_request.py +opal_security/models/add_group_user_request.py +opal_security/models/add_resource_nhi_request.py +opal_security/models/add_resource_user_request.py +opal_security/models/app.py +opal_security/models/app_type_enum.py +opal_security/models/apps_list.py +opal_security/models/aws_permission_set_metadata.py +opal_security/models/aws_permission_set_metadata_aws_permission_set.py +opal_security/models/condition.py +opal_security/models/configuration_template.py +opal_security/models/create_configuration_template_info.py +opal_security/models/create_group_binding_info.py +opal_security/models/create_group_binding_info_groups_inner.py +opal_security/models/create_group_info.py +opal_security/models/create_message_channel_info.py +opal_security/models/create_on_call_schedule_info.py +opal_security/models/create_owner_info.py +opal_security/models/create_request200_response.py +opal_security/models/create_request_configuration_info_list.py +opal_security/models/create_request_info.py +opal_security/models/create_request_info_custom_metadata_inner.py +opal_security/models/create_request_info_groups_inner.py +opal_security/models/create_request_info_resources_inner.py +opal_security/models/create_request_info_support_ticket.py +opal_security/models/create_resource_info.py +opal_security/models/create_tag_info.py +opal_security/models/create_uar_info.py +opal_security/models/entity_type_enum.py +opal_security/models/event.py +opal_security/models/group.py +opal_security/models/group_access_level.py +opal_security/models/group_binding.py +opal_security/models/group_binding_group.py +opal_security/models/group_remote_info.py +opal_security/models/group_remote_info_active_directory_group.py +opal_security/models/group_remote_info_azure_ad_microsoft365_group.py +opal_security/models/group_remote_info_azure_ad_security_group.py +opal_security/models/group_remote_info_duo_group.py +opal_security/models/group_remote_info_github_team.py +opal_security/models/group_remote_info_gitlab_group.py +opal_security/models/group_remote_info_google_group.py +opal_security/models/group_remote_info_ldap_group.py +opal_security/models/group_remote_info_okta_group.py +opal_security/models/group_resource.py +opal_security/models/group_resource_list.py +opal_security/models/group_type_enum.py +opal_security/models/group_user.py +opal_security/models/group_user_list.py +opal_security/models/idp_group_mapping.py +opal_security/models/idp_group_mapping_list.py +opal_security/models/message_channel.py +opal_security/models/message_channel_id_list.py +opal_security/models/message_channel_list.py +opal_security/models/message_channel_provider_enum.py +opal_security/models/on_call_schedule.py +opal_security/models/on_call_schedule_id_list.py +opal_security/models/on_call_schedule_list.py +opal_security/models/on_call_schedule_provider_enum.py +opal_security/models/owner.py +opal_security/models/paginated_configuration_template_list.py +opal_security/models/paginated_event_list.py +opal_security/models/paginated_group_bindings_list.py +opal_security/models/paginated_groups_list.py +opal_security/models/paginated_owners_list.py +opal_security/models/paginated_resources_list.py +opal_security/models/paginated_tags_list.py +opal_security/models/paginated_uars_list.py +opal_security/models/paginated_users_list.py +opal_security/models/request.py +opal_security/models/request_configuration.py +opal_security/models/request_custom_field_response.py +opal_security/models/request_custom_field_response_field_value.py +opal_security/models/request_list.py +opal_security/models/request_status_enum.py +opal_security/models/request_template_custom_field_type_enum.py +opal_security/models/requested_item.py +opal_security/models/resource.py +opal_security/models/resource_access_level.py +opal_security/models/resource_access_user.py +opal_security/models/resource_access_user_list.py +opal_security/models/resource_nhi.py +opal_security/models/resource_remote_info.py +opal_security/models/resource_remote_info_aws_account.py +opal_security/models/resource_remote_info_aws_ec2_instance.py +opal_security/models/resource_remote_info_aws_eks_cluster.py +opal_security/models/resource_remote_info_aws_iam_role.py +opal_security/models/resource_remote_info_aws_permission_set.py +opal_security/models/resource_remote_info_aws_rds_instance.py +opal_security/models/resource_remote_info_gcp_big_query_dataset.py +opal_security/models/resource_remote_info_gcp_big_query_table.py +opal_security/models/resource_remote_info_gcp_bucket.py +opal_security/models/resource_remote_info_gcp_compute_instance.py +opal_security/models/resource_remote_info_gcp_folder.py +opal_security/models/resource_remote_info_gcp_gke_cluster.py +opal_security/models/resource_remote_info_gcp_organization.py +opal_security/models/resource_remote_info_gcp_project.py +opal_security/models/resource_remote_info_gcp_service_account.py +opal_security/models/resource_remote_info_gcp_sql_instance.py +opal_security/models/resource_remote_info_github_repo.py +opal_security/models/resource_remote_info_gitlab_project.py +opal_security/models/resource_remote_info_okta_app.py +opal_security/models/resource_remote_info_okta_custom_role.py +opal_security/models/resource_remote_info_okta_standard_role.py +opal_security/models/resource_remote_info_pagerduty_role.py +opal_security/models/resource_remote_info_salesforce_permission_set.py +opal_security/models/resource_remote_info_salesforce_profile.py +opal_security/models/resource_remote_info_salesforce_role.py +opal_security/models/resource_remote_info_teleport_role.py +opal_security/models/resource_type_enum.py +opal_security/models/resource_user.py +opal_security/models/resource_user_access_status.py +opal_security/models/resource_user_access_status_enum.py +opal_security/models/resource_with_access_level.py +opal_security/models/reviewer_id_list.py +opal_security/models/reviewer_stage.py +opal_security/models/reviewer_stage_list.py +opal_security/models/risk_sensitivity_enum.py +opal_security/models/session.py +opal_security/models/sessions_list.py +opal_security/models/sub_event.py +opal_security/models/tag.py +opal_security/models/tag_filter.py +opal_security/models/tags_list.py +opal_security/models/ticket_propagation_configuration.py +opal_security/models/ticketing_provider_enum.py +opal_security/models/uar.py +opal_security/models/uar_reviewer_assignment_policy_enum.py +opal_security/models/uar_scope.py +opal_security/models/update_configuration_template_info.py +opal_security/models/update_group_binding_info.py +opal_security/models/update_group_binding_info_list.py +opal_security/models/update_group_info.py +opal_security/models/update_group_info_list.py +opal_security/models/update_group_resources_info.py +opal_security/models/update_idp_group_mappings_request.py +opal_security/models/update_idp_group_mappings_request_mappings_inner.py +opal_security/models/update_owner_info.py +opal_security/models/update_owner_info_list.py +opal_security/models/update_resource_info.py +opal_security/models/update_resource_info_list.py +opal_security/models/user.py +opal_security/models/user_hr_idp_status_enum.py +opal_security/models/user_id_list.py +opal_security/models/user_list.py +opal_security/models/visibility_info.py +opal_security/models/visibility_type_enum.py +opal_security/py.typed +opal_security/rest.py pyproject.toml requirements.txt setup.cfg diff --git a/.openapi-generator/templates/README.mustache b/.openapi-generator/templates/README.mustache new file mode 100644 index 0000000..816f0fe --- /dev/null +++ b/.openapi-generator/templates/README.mustache @@ -0,0 +1,63 @@ +# {{{projectName}}} +{{#appDescriptionWithNewLines}} +{{{.}}} +{{/appDescriptionWithNewLines}} + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +## Requirements. + +Python {{{generatorLanguageVersion}}} + +## Installation & Usage +### pip install +We recommend installing from [PyPI](https://pypi.org) using `pip`: +```sh +pip install {{{packageName}}} +``` + +You can also install via git: +```sh +pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git`) + +Then import the package: +```python +import {{{packageName}}} as {{{packageShorthand}}} +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import {{{packageName}}} as {{{packageShorthand}}} +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +{{> common_README }} diff --git a/.openapi-generator/templates/common_README.mustache b/.openapi-generator/templates/common_README.mustache index e78d5ee..e3f178b 100644 --- a/.openapi-generator/templates/common_README.mustache +++ b/.openapi-generator/templates/common_README.mustache @@ -1,15 +1,14 @@ ```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: +{{#asyncio}}async {{/asyncio}}with {{{packageShorthand}}}.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = {{{packageName}}}.{{{classname}}}(api_client) + api_instance = {{{packageShorthand}}}.{{{classname}}}(api_client) {{#allParams}} {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/allParams}} @@ -32,11 +31,11 @@ Example with Events API: ```python import time -import opal +import {{{packageName}}} as {{{packageShorthand}}} 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( +configuration = {{{packageShorthand}}}.Configuration( host = "https://api.opal.dev/v1" ) @@ -46,15 +45,15 @@ configuration = opal.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = opal.Configuration( +configuration = {{{packageShorthand}}}.Configuration( access_token = 'YOUR_BEARER_TOKEN' ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with {{{packageShorthand}}}.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.EventsApi(api_client) + api_instance = {{{packageShorthand}}}.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) @@ -66,7 +65,7 @@ with opal.ApiClient(configuration) as api_client: 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: + except {{{packageShorthand}}}.ApiException as e: print("Exception when calling EventsApi->events: %s\n" % e) ``` diff --git a/.openapi-generator/templates/python_doc_auth_partial.mustache b/.openapi-generator/templates/python_doc_auth_partial.mustache new file mode 100644 index 0000000..3daff54 --- /dev/null +++ b/.openapi-generator/templates/python_doc_auth_partial.mustache @@ -0,0 +1,111 @@ +# Defining the host is optional and defaults to {{{basePath}}} +# See configuration.py for a list of all supported configuration parameters. +import {{{packageName}}} as {{{packageShorthand}}} + +configuration = {{{packageShorthand}}}.Configuration( + host = "{{{basePath}}}" +) + +{{#hasAuthMethods}} +# 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. +{{#authMethods}} +{{#isBasic}} +{{#isBasicBasic}} + +# Configure HTTP basic authorization: {{{name}}} +configuration = {{{packageShorthand}}}.Configuration( + username = os.environ["USERNAME"], + password = os.environ["PASSWORD"] +) +{{/isBasicBasic}} +{{#isBasicBearer}} + +# Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}} +configuration = {{{packageShorthand}}}.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) +{{/isBasicBearer}} +{{#isHttpSignature}} + +# Configure HTTP message signature: {{{name}}} +# The HTTP Signature Header mechanism that can be used by a client to +# authenticate the sender of a message and ensure that particular headers +# have not been modified in transit. +# +# You can specify the signing key-id, private key path, signing scheme, +# signing algorithm, list of signed headers and signature max validity. +# The 'key_id' parameter is an opaque string that the API server can use +# to lookup the client and validate the signature. +# The 'private_key_path' parameter should be the path to a file that +# contains a DER or base-64 encoded private key. +# The 'private_key_passphrase' parameter is optional. Set the passphrase +# if the private key is encrypted. +# The 'signed_headers' parameter is used to specify the list of +# HTTP headers included when generating the signature for the message. +# You can specify HTTP headers that you want to protect with a cryptographic +# signature. Note that proxies may add, modify or remove HTTP headers +# for legitimate reasons, so you should only add headers that you know +# will not be modified. For example, if you want to protect the HTTP request +# body, you can specify the Digest header. In that case, the client calculates +# the digest of the HTTP request body and includes the digest in the message +# signature. +# The 'signature_max_validity' parameter is optional. It is configured as a +# duration to express when the signature ceases to be valid. The client calculates +# the expiration date every time it generates the cryptographic signature +# of an HTTP request. The API server may have its own security policy +# that controls the maximum validity of the signature. The client max validity +# must be lower than the server max validity. +# The time on the client and server must be synchronized, otherwise the +# server may reject the client signature. +# +# The client must use a combination of private key, signing scheme, +# signing algorithm and hash algorithm that matches the security policy of +# the API server. +# +# See {{{packageName}}}.signing for a list of all supported parameters. +from {{{packageName}}} import signing +import {{{packageName}}} as {{{packageShorthand}}} +import datetime + +configuration = {{{packageShorthand}}}.Configuration( + host = "{{{basePath}}}", + signing_info = {{{packageShorthand}}}.HttpSigningConfiguration( + key_id = 'my-key-id', + private_key_path = 'private_key.pem', + private_key_passphrase = 'YOUR_PASSPHRASE', + signing_scheme = {{{packageShorthand}}}.signing.SCHEME_HS2019, + signing_algorithm = {{{packageShorthand}}}.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, + hash_algorithm = {{{packageShorthand}}}.signing.SCHEME_RSA_SHA256, + signed_headers = [ + {{{packageShorthand}}}.signing.HEADER_REQUEST_TARGET, + {{{packageShorthand}}}.signing.HEADER_CREATED, + {{{packageShorthand}}}.signing.HEADER_EXPIRES, + {{{packageShorthand}}}.signing.HEADER_HOST, + {{{packageShorthand}}}.signing.HEADER_DATE, + {{{packageShorthand}}}.signing.HEADER_DIGEST, + 'Content-Type', + 'Content-Length', + 'User-Agent' + ], + signature_max_validity = datetime.timedelta(minutes=5) + ) +) +{{/isHttpSignature}} +{{/isBasic}} +{{#isApiKey}} + +# Configure API key authorization: {{{name}}} +configuration.api_key['{{{name}}}'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['{{name}}'] = 'Bearer' +{{/isApiKey}} +{{#isOAuth}} + +configuration.access_token = os.environ["ACCESS_TOKEN"] +{{/isOAuth}} +{{/authMethods}} +{{/hasAuthMethods}} diff --git a/.openapi-generator/templates/setup.mustache b/.openapi-generator/templates/setup.mustache new file mode 100644 index 0000000..63008dc --- /dev/null +++ b/.openapi-generator/templates/setup.mustache @@ -0,0 +1,57 @@ +# coding: utf-8 + +{{>partial_header}} + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "{{{projectName}}}" +PYTHON_REQUIRES = ">= 3.8" +{{#apiInfo}} +{{#apis}} +{{#-last}} +REQUIRES = [ + "urllib3 >= 1.25.3, < 3.0.0", + "python-dateutil >= 2.8.2", +{{#asyncio}} + "aiohttp >= 3.8.4", + "aiohttp-retry >= 2.8.3", +{{/asyncio}} +{{#tornado}} + "tornado>=4.2, < 5", +{{/tornado}} +{{#hasHttpSignatureMethods}} + "pem >= 19.3.0", + "pycryptodome >= 3.9.0", +{{/hasHttpSignatureMethods}} + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + description="{{appName}}", + author="{{infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", + author_email="{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", + url="{{packageUrl}}", + keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + use_scm_version=True, + setup_requires=['setuptools_scm'], + {{#licenseInfo}}license="{{.}}", + {{/licenseInfo}}long_description_content_type='text/markdown', + long_description="""\ + {{appDescription}} + """, # noqa: E501 + package_data={"{{{packageName}}}": ["py.typed"]}, +) +{{/-last}} +{{/apis}} +{{/apiInfo}} diff --git a/.travis.yml b/.travis.yml index a9f1fed..6c5030e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,4 +14,4 @@ install: - "pip install -r requirements.txt" - "pip install -r test-requirements.txt" # command to run tests -script: pytest --cov=opal +script: pytest --cov=opal_security diff --git a/README.md b/README.md index 2ba3c11..80143f6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# opal +# opal-security Your Home For Developer Resources. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -15,9 +15,12 @@ Python 3.8+ ## Installation & Usage ### pip install +We recommend installing from [PyPI](https://pypi.org) using `pip`: +```sh +pip install opal_security +``` -If the python package is hosted on a repository, you can install directly using: - +You can also install via git: ```sh pip install git+https://github.com/opalsecurity/opal-python.git ``` @@ -25,7 +28,7 @@ pip install git+https://github.com/opalsecurity/opal-python.git Then import the package: ```python -import opal +import opal_security as opal ``` ### Setuptools @@ -39,7 +42,7 @@ python setup.py install --user Then import the package: ```python -import opal +import opal_security as opal ``` ### Tests @@ -52,12 +55,13 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python -import opal -from opal.rest import ApiException +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -92,7 +96,7 @@ Example with Events API: ```python import time -import opal +import opal_security as 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. diff --git a/config.json b/config.json index 617349e..6ae02c0 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,8 @@ { "enumClassPrefix": true, - "packageName": "opal", + "packageName": "opal_security", + "packageShorthand": "opal", + "projectName": "opal-security", "gitHost": "github.com", "gitUserId": "opalsecurity", "gitRepoId": "opal-python", diff --git a/docs/Access.md b/docs/Access.md index d2a34e3..b4f9af5 100644 --- a/docs/Access.md +++ b/docs/Access.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.access import Access +from opal_security.models.access import Access # TODO update the JSON string below json = "{}" diff --git a/docs/AccessList.md b/docs/AccessList.md index 7fdf5fc..e6d0a66 100644 --- a/docs/AccessList.md +++ b/docs/AccessList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.access_list import AccessList +from opal_security.models.access_list import AccessList # TODO update the JSON string below json = "{}" diff --git a/docs/AddGroupResourceRequest.md b/docs/AddGroupResourceRequest.md index 7e7483d..bb9be27 100644 --- a/docs/AddGroupResourceRequest.md +++ b/docs/AddGroupResourceRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.add_group_resource_request import AddGroupResourceRequest +from opal_security.models.add_group_resource_request import AddGroupResourceRequest # TODO update the JSON string below json = "{}" diff --git a/docs/AddGroupUserRequest.md b/docs/AddGroupUserRequest.md index 97c8365..16076a0 100644 --- a/docs/AddGroupUserRequest.md +++ b/docs/AddGroupUserRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.add_group_user_request import AddGroupUserRequest +from opal_security.models.add_group_user_request import AddGroupUserRequest # TODO update the JSON string below json = "{}" diff --git a/docs/AddResourceNhiRequest.md b/docs/AddResourceNhiRequest.md index 5f45552..0f928b7 100644 --- a/docs/AddResourceNhiRequest.md +++ b/docs/AddResourceNhiRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.add_resource_nhi_request import AddResourceNhiRequest +from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest # TODO update the JSON string below json = "{}" diff --git a/docs/AddResourceUserRequest.md b/docs/AddResourceUserRequest.md index 824def4..6a39597 100644 --- a/docs/AddResourceUserRequest.md +++ b/docs/AddResourceUserRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.add_resource_user_request import AddResourceUserRequest # TODO update the JSON string below json = "{}" diff --git a/docs/App.md b/docs/App.md index a284039..46ca2eb 100644 --- a/docs/App.md +++ b/docs/App.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.app import App +from opal_security.models.app import App # TODO update the JSON string below json = "{}" diff --git a/docs/AppsApi.md b/docs/AppsApi.md index a87626f..544a6bb 100644 --- a/docs/AppsApi.md +++ b/docs/AppsApi.md @@ -1,4 +1,4 @@ -# opal.AppsApi +# opal_security.AppsApi All URIs are relative to *https://api.opal.dev/v1* @@ -20,13 +20,15 @@ Returns an `App` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.app import App -from opal.rest import ApiException +import opal_security +from opal_security.models.app import App +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -42,9 +44,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.AppsApi(api_client) + api_instance = opal_security.AppsApi(api_client) app_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the app. try: @@ -97,14 +99,16 @@ Returns a list of `App` objects. * 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 +import opal_security +from opal_security.models.app_type_enum import AppTypeEnum +from opal_security.models.apps_list import AppsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -120,10 +124,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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) + api_instance = opal_security.AppsApi(api_client) + app_type_filter = [opal_security.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: diff --git a/docs/AppsList.md b/docs/AppsList.md index 2b37bad..638d3b6 100644 --- a/docs/AppsList.md +++ b/docs/AppsList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.apps_list import AppsList +from opal_security.models.apps_list import AppsList # TODO update the JSON string below json = "{}" diff --git a/docs/AwsPermissionSetMetadata.md b/docs/AwsPermissionSetMetadata.md index c9e5d6a..6f0d4a4 100644 --- a/docs/AwsPermissionSetMetadata.md +++ b/docs/AwsPermissionSetMetadata.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.aws_permission_set_metadata import AwsPermissionSetMetadata +from opal_security.models.aws_permission_set_metadata import AwsPermissionSetMetadata # TODO update the JSON string below json = "{}" diff --git a/docs/AwsPermissionSetMetadataAwsPermissionSet.md b/docs/AwsPermissionSetMetadataAwsPermissionSet.md index 8732133..83dfdb5 100644 --- a/docs/AwsPermissionSetMetadataAwsPermissionSet.md +++ b/docs/AwsPermissionSetMetadataAwsPermissionSet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet +from opal_security.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet # TODO update the JSON string below json = "{}" diff --git a/docs/Condition.md b/docs/Condition.md index 05ab82b..bf1d6ca 100644 --- a/docs/Condition.md +++ b/docs/Condition.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.condition import Condition +from opal_security.models.condition import Condition # TODO update the JSON string below json = "{}" diff --git a/docs/ConfigurationTemplate.md b/docs/ConfigurationTemplate.md index 0ecd24f..fd67c7f 100644 --- a/docs/ConfigurationTemplate.md +++ b/docs/ConfigurationTemplate.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.configuration_template import ConfigurationTemplate +from opal_security.models.configuration_template import ConfigurationTemplate # TODO update the JSON string below json = "{}" diff --git a/docs/ConfigurationTemplatesApi.md b/docs/ConfigurationTemplatesApi.md index fb93185..c10b46f 100644 --- a/docs/ConfigurationTemplatesApi.md +++ b/docs/ConfigurationTemplatesApi.md @@ -1,4 +1,4 @@ -# opal.ConfigurationTemplatesApi +# opal_security.ConfigurationTemplatesApi All URIs are relative to *https://api.opal.dev/v1* @@ -22,14 +22,16 @@ Creates a configuration template. * 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 +import opal_security +from opal_security.models.configuration_template import ConfigurationTemplate +from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -45,10 +47,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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 | + api_instance = opal_security.ConfigurationTemplatesApi(api_client) + create_configuration_template_info = opal_security.CreateConfigurationTemplateInfo() # CreateConfigurationTemplateInfo | try: api_response = api_instance.create_configuration_template(create_configuration_template_info) @@ -100,12 +102,14 @@ Deletes a configuration template. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -121,9 +125,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ConfigurationTemplatesApi(api_client) + api_instance = opal_security.ConfigurationTemplatesApi(api_client) configuration_template_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the configuration template. try: @@ -174,13 +178,15 @@ Returns a list of `ConfigurationTemplate` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -196,9 +202,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ConfigurationTemplatesApi(api_client) + api_instance = opal_security.ConfigurationTemplatesApi(api_client) try: api_response = api_instance.get_configuration_templates() @@ -247,14 +253,16 @@ Update a configuration template. * 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 +import opal_security +from opal_security.models.configuration_template import ConfigurationTemplate +from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -270,10 +278,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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 + api_instance = opal_security.ConfigurationTemplatesApi(api_client) + update_configuration_template_info = opal_security.UpdateConfigurationTemplateInfo() # UpdateConfigurationTemplateInfo | Configuration template to be updated try: api_response = api_instance.update_configuration_template(update_configuration_template_info) diff --git a/docs/CreateConfigurationTemplateInfo.md b/docs/CreateConfigurationTemplateInfo.md index d48c031..f4ecc26 100644 --- a/docs/CreateConfigurationTemplateInfo.md +++ b/docs/CreateConfigurationTemplateInfo.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo +from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateGroupBindingInfo.md b/docs/CreateGroupBindingInfo.md index d82d8d6..638b6ef 100644 --- a/docs/CreateGroupBindingInfo.md +++ b/docs/CreateGroupBindingInfo.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_group_binding_info import CreateGroupBindingInfo +from opal_security.models.create_group_binding_info import CreateGroupBindingInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateGroupBindingInfoGroupsInner.md b/docs/CreateGroupBindingInfoGroupsInner.md index 8d98146..7b42c06 100644 --- a/docs/CreateGroupBindingInfoGroupsInner.md +++ b/docs/CreateGroupBindingInfoGroupsInner.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner +from opal_security.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner # TODO update the JSON string below json = "{}" diff --git a/docs/CreateGroupInfo.md b/docs/CreateGroupInfo.md index 5cea922..178f8e8 100644 --- a/docs/CreateGroupInfo.md +++ b/docs/CreateGroupInfo.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_group_info import CreateGroupInfo +from opal_security.models.create_group_info import CreateGroupInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateMessageChannelInfo.md b/docs/CreateMessageChannelInfo.md index 7e116d2..234d06e 100644 --- a/docs/CreateMessageChannelInfo.md +++ b/docs/CreateMessageChannelInfo.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_message_channel_info import CreateMessageChannelInfo +from opal_security.models.create_message_channel_info import CreateMessageChannelInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateOnCallScheduleInfo.md b/docs/CreateOnCallScheduleInfo.md index 1c7579c..6a71870 100644 --- a/docs/CreateOnCallScheduleInfo.md +++ b/docs/CreateOnCallScheduleInfo.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_on_call_schedule_info import CreateOnCallScheduleInfo +from opal_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateOwnerInfo.md b/docs/CreateOwnerInfo.md index 17df6bf..f93de7b 100644 --- a/docs/CreateOwnerInfo.md +++ b/docs/CreateOwnerInfo.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_owner_info import CreateOwnerInfo +from opal_security.models.create_owner_info import CreateOwnerInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateRequest200Response.md b/docs/CreateRequest200Response.md index 2253f17..d6b8473 100644 --- a/docs/CreateRequest200Response.md +++ b/docs/CreateRequest200Response.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_request200_response import CreateRequest200Response +from opal_security.models.create_request200_response import CreateRequest200Response # TODO update the JSON string below json = "{}" diff --git a/docs/CreateRequestConfigurationInfoList.md b/docs/CreateRequestConfigurationInfoList.md index 5127e62..ff11996 100644 --- a/docs/CreateRequestConfigurationInfoList.md +++ b/docs/CreateRequestConfigurationInfoList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList # TODO update the JSON string below json = "{}" diff --git a/docs/CreateRequestInfo.md b/docs/CreateRequestInfo.md index e582cbe..94cccb3 100644 --- a/docs/CreateRequestInfo.md +++ b/docs/CreateRequestInfo.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_request_info import CreateRequestInfo +from opal_security.models.create_request_info import CreateRequestInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateRequestInfoCustomMetadataInner.md b/docs/CreateRequestInfoCustomMetadataInner.md index bec5c10..5a76bfa 100644 --- a/docs/CreateRequestInfoCustomMetadataInner.md +++ b/docs/CreateRequestInfoCustomMetadataInner.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal_security.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner # TODO update the JSON string below json = "{}" diff --git a/docs/CreateRequestInfoGroupsInner.md b/docs/CreateRequestInfoGroupsInner.md index 452d4eb..45f80bb 100644 --- a/docs/CreateRequestInfoGroupsInner.md +++ b/docs/CreateRequestInfoGroupsInner.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal_security.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner # TODO update the JSON string below json = "{}" diff --git a/docs/CreateRequestInfoResourcesInner.md b/docs/CreateRequestInfoResourcesInner.md index dde41b2..045184d 100644 --- a/docs/CreateRequestInfoResourcesInner.md +++ b/docs/CreateRequestInfoResourcesInner.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal_security.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner # TODO update the JSON string below json = "{}" diff --git a/docs/CreateRequestInfoSupportTicket.md b/docs/CreateRequestInfoSupportTicket.md index cea68d8..ebda1d4 100644 --- a/docs/CreateRequestInfoSupportTicket.md +++ b/docs/CreateRequestInfoSupportTicket.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket +from opal_security.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket # TODO update the JSON string below json = "{}" diff --git a/docs/CreateResourceInfo.md b/docs/CreateResourceInfo.md index fad1f7c..546ca08 100644 --- a/docs/CreateResourceInfo.md +++ b/docs/CreateResourceInfo.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_resource_info import CreateResourceInfo +from opal_security.models.create_resource_info import CreateResourceInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateTagInfo.md b/docs/CreateTagInfo.md index 39d87b7..e094b32 100644 --- a/docs/CreateTagInfo.md +++ b/docs/CreateTagInfo.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_tag_info import CreateTagInfo +from opal_security.models.create_tag_info import CreateTagInfo # TODO update the JSON string below json = "{}" diff --git a/docs/CreateUARInfo.md b/docs/CreateUARInfo.md index ed2abef..30f1fff 100644 --- a/docs/CreateUARInfo.md +++ b/docs/CreateUARInfo.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.create_uar_info import CreateUARInfo +from opal_security.models.create_uar_info import CreateUARInfo # TODO update the JSON string below json = "{}" diff --git a/docs/Event.md b/docs/Event.md index 0202e42..d1b9b9c 100644 --- a/docs/Event.md +++ b/docs/Event.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.event import Event +from opal_security.models.event import Event # TODO update the JSON string below json = "{}" diff --git a/docs/EventsApi.md b/docs/EventsApi.md index 5cc3adc..583435e 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -1,4 +1,4 @@ -# opal.EventsApi +# opal_security.EventsApi All URIs are relative to *https://api.opal.dev/v1* @@ -19,13 +19,15 @@ Returns a list of `Event` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_event_list import PaginatedEventList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_event_list import PaginatedEventList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -41,9 +43,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.EventsApi(api_client) + api_instance = opal_security.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) diff --git a/docs/Group.md b/docs/Group.md index 2100e72..4e85bd4 100644 --- a/docs/Group.md +++ b/docs/Group.md @@ -37,7 +37,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group import Group +from opal_security.models.group import Group # TODO update the JSON string below json = "{}" diff --git a/docs/GroupAccessLevel.md b/docs/GroupAccessLevel.md index 39cea63..ff1b9f1 100644 --- a/docs/GroupAccessLevel.md +++ b/docs/GroupAccessLevel.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_access_level import GroupAccessLevel +from opal_security.models.group_access_level import GroupAccessLevel # TODO update the JSON string below json = "{}" diff --git a/docs/GroupBinding.md b/docs/GroupBinding.md index e055eb4..3268905 100644 --- a/docs/GroupBinding.md +++ b/docs/GroupBinding.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_binding import GroupBinding +from opal_security.models.group_binding import GroupBinding # TODO update the JSON string below json = "{}" diff --git a/docs/GroupBindingGroup.md b/docs/GroupBindingGroup.md index 36d0516..28817a8 100644 --- a/docs/GroupBindingGroup.md +++ b/docs/GroupBindingGroup.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_binding_group import GroupBindingGroup +from opal_security.models.group_binding_group import GroupBindingGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupBindingsApi.md b/docs/GroupBindingsApi.md index d5d9103..0fded3b 100644 --- a/docs/GroupBindingsApi.md +++ b/docs/GroupBindingsApi.md @@ -1,4 +1,4 @@ -# opal.GroupBindingsApi +# opal_security.GroupBindingsApi All URIs are relative to *https://api.opal.dev/v1* @@ -23,14 +23,16 @@ Creates a group binding. * 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 +import opal_security +from opal_security.models.create_group_binding_info import CreateGroupBindingInfo +from opal_security.models.group_binding import GroupBinding +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -46,10 +48,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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 | + api_instance = opal_security.GroupBindingsApi(api_client) + create_group_binding_info = opal_security.CreateGroupBindingInfo() # CreateGroupBindingInfo | try: api_response = api_instance.create_group_binding(create_group_binding_info) @@ -101,12 +103,14 @@ Deletes a group binding. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -122,9 +126,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupBindingsApi(api_client) + api_instance = opal_security.GroupBindingsApi(api_client) group_binding_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group binding. try: @@ -175,13 +179,15 @@ Returns a `GroupBinding` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.group_binding import GroupBinding -from opal.rest import ApiException +import opal_security +from opal_security.models.group_binding import GroupBinding +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -197,9 +203,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupBindingsApi(api_client) + api_instance = opal_security.GroupBindingsApi(api_client) group_binding_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the group binding. try: @@ -252,13 +258,15 @@ Returns a list of `GroupBinding` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_group_bindings_list import PaginatedGroupBindingsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -274,9 +282,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupBindingsApi(api_client) + api_instance = opal_security.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) @@ -331,13 +339,15 @@ Bulk updates a list of group bindings. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList -from opal.rest import ApiException +import opal_security +from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -353,10 +363,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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 + api_instance = opal_security.GroupBindingsApi(api_client) + update_group_binding_info_list = opal_security.UpdateGroupBindingInfoList() # UpdateGroupBindingInfoList | Group bindings to be updated try: api_instance.update_group_bindings(update_group_binding_info_list) diff --git a/docs/GroupRemoteInfo.md b/docs/GroupRemoteInfo.md index 96aa564..4344194 100644 --- a/docs/GroupRemoteInfo.md +++ b/docs/GroupRemoteInfo.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info import GroupRemoteInfo +from opal_security.models.group_remote_info import GroupRemoteInfo # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoActiveDirectoryGroup.md b/docs/GroupRemoteInfoActiveDirectoryGroup.md index 99afbb6..43b822b 100644 --- a/docs/GroupRemoteInfoActiveDirectoryGroup.md +++ b/docs/GroupRemoteInfoActiveDirectoryGroup.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md b/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md index 0668c1d..6a51e2e 100644 --- a/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md +++ b/docs/GroupRemoteInfoAzureAdMicrosoft365Group.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group +from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoAzureAdSecurityGroup.md b/docs/GroupRemoteInfoAzureAdSecurityGroup.md index c71ca22..73cb14f 100644 --- a/docs/GroupRemoteInfoAzureAdSecurityGroup.md +++ b/docs/GroupRemoteInfoAzureAdSecurityGroup.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoDuoGroup.md b/docs/GroupRemoteInfoDuoGroup.md index f5a6e72..f3d302b 100644 --- a/docs/GroupRemoteInfoDuoGroup.md +++ b/docs/GroupRemoteInfoDuoGroup.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup +from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoGithubTeam.md b/docs/GroupRemoteInfoGithubTeam.md index 7bc2441..dc5af6a 100644 --- a/docs/GroupRemoteInfoGithubTeam.md +++ b/docs/GroupRemoteInfoGithubTeam.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam +from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoGitlabGroup.md b/docs/GroupRemoteInfoGitlabGroup.md index b0ba352..2d6ab36 100644 --- a/docs/GroupRemoteInfoGitlabGroup.md +++ b/docs/GroupRemoteInfoGitlabGroup.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup +from opal_security.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoGoogleGroup.md b/docs/GroupRemoteInfoGoogleGroup.md index a60b69b..28037db 100644 --- a/docs/GroupRemoteInfoGoogleGroup.md +++ b/docs/GroupRemoteInfoGoogleGroup.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup +from opal_security.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoLdapGroup.md b/docs/GroupRemoteInfoLdapGroup.md index fa14612..c82c843 100644 --- a/docs/GroupRemoteInfoLdapGroup.md +++ b/docs/GroupRemoteInfoLdapGroup.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupRemoteInfoOktaGroup.md b/docs/GroupRemoteInfoOktaGroup.md index df55e1d..0164f3a 100644 --- a/docs/GroupRemoteInfoOktaGroup.md +++ b/docs/GroupRemoteInfoOktaGroup.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup +from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup # TODO update the JSON string below json = "{}" diff --git a/docs/GroupResource.md b/docs/GroupResource.md index a449099..003febd 100644 --- a/docs/GroupResource.md +++ b/docs/GroupResource.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_resource import GroupResource +from opal_security.models.group_resource import GroupResource # TODO update the JSON string below json = "{}" diff --git a/docs/GroupResourceList.md b/docs/GroupResourceList.md index facaa32..e8142db 100644 --- a/docs/GroupResourceList.md +++ b/docs/GroupResourceList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_resource_list import GroupResourceList +from opal_security.models.group_resource_list import GroupResourceList # TODO update the JSON string below json = "{}" diff --git a/docs/GroupUser.md b/docs/GroupUser.md index 1f105f9..28b1fa1 100644 --- a/docs/GroupUser.md +++ b/docs/GroupUser.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_user import GroupUser +from opal_security.models.group_user import GroupUser # TODO update the JSON string below json = "{}" diff --git a/docs/GroupUserList.md b/docs/GroupUserList.md index b43696f..a9e762a 100644 --- a/docs/GroupUserList.md +++ b/docs/GroupUserList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.group_user_list import GroupUserList +from opal_security.models.group_user_list import GroupUserList # TODO update the JSON string below json = "{}" diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index 30d4670..6d0101f 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -1,4 +1,4 @@ -# opal.GroupsApi +# opal_security.GroupsApi All URIs are relative to *https://api.opal.dev/v1* @@ -40,14 +40,16 @@ Adds a resource to a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.add_group_resource_request import AddGroupResourceRequest -from opal.models.group_resource import GroupResource -from opal.rest import ApiException +import opal_security +from opal_security.models.add_group_resource_request import AddGroupResourceRequest +from opal_security.models.group_resource import GroupResource +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -63,13 +65,13 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.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) + add_group_resource_request = opal_security.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) @@ -124,14 +126,16 @@ Adds a user to this group. * 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 +import opal_security +from opal_security.models.add_group_user_request import AddGroupUserRequest +from opal_security.models.group_user import GroupUser +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -147,14 +151,14 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.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) + add_group_user_request = opal_security.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) @@ -210,14 +214,16 @@ Creates a group. See [here](https://docs.opal.dev/reference/end-system-objects) * 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 +import opal_security +from opal_security.models.create_group_info import CreateGroupInfo +from opal_security.models.group import Group +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -233,10 +239,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) - create_group_info = opal.CreateGroupInfo() # CreateGroupInfo | + api_instance = opal_security.GroupsApi(api_client) + create_group_info = opal_security.CreateGroupInfo() # CreateGroupInfo | try: api_response = api_instance.create_group(create_group_info) @@ -288,12 +294,14 @@ Deletes a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -309,9 +317,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -362,12 +370,14 @@ Removes a user's access from this group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -383,9 +393,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.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. @@ -438,13 +448,15 @@ Returns a `Group` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.group import Group -from opal.rest import ApiException +import opal_security +from opal_security.models.group import Group +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -460,9 +472,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the group. try: @@ -515,13 +527,15 @@ Gets the list of audit and reviewer message channels attached to a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.message_channel_list import MessageChannelList -from opal.rest import ApiException +import opal_security +from opal_security.models.message_channel_list import MessageChannelList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -537,9 +551,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -592,13 +606,15 @@ Gets the list of on call schedules attached to a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.on_call_schedule_list import OnCallScheduleList -from opal.rest import ApiException +import opal_security +from opal_security.models.on_call_schedule_list import OnCallScheduleList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -614,9 +630,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -669,13 +685,15 @@ Gets the list of resources that the group gives access to. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.group_resource_list import GroupResourceList -from opal.rest import ApiException +import opal_security +from opal_security.models.group_resource_list import GroupResourceList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -691,9 +709,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -746,13 +764,15 @@ Gets the list of reviewer stages for a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.reviewer_stage import ReviewerStage -from opal.rest import ApiException +import opal_security +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -768,9 +788,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -823,12 +843,14 @@ Gets the list of owner IDs of the reviewers for a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -844,9 +866,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -899,13 +921,15 @@ Returns all tags applied to the group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.tags_list import TagsList -from opal.rest import ApiException +import opal_security +from opal_security.models.tags_list import TagsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -921,9 +945,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the group whose tags to return. try: @@ -976,13 +1000,15 @@ Gets the list of users for this group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.group_user_list import GroupUserList -from opal.rest import ApiException +import opal_security +from opal_security.models.group_user_list import GroupUserList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -998,9 +1024,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -1053,13 +1079,15 @@ Gets the visibility of this group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.visibility_info import VisibilityInfo -from opal.rest import ApiException +import opal_security +from opal_security.models.visibility_info import VisibilityInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1075,9 +1103,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. try: @@ -1130,14 +1158,16 @@ Returns a list of groups for your organization. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.group_type_enum import GroupTypeEnum -from opal.models.paginated_groups_list import PaginatedGroupsList -from opal.rest import ApiException +import opal_security +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.paginated_groups_list import PaginatedGroupsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1153,12 +1183,12 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.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_type_filter = opal_security.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) @@ -1216,13 +1246,15 @@ Sets the list of audit message channels attached to a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.message_channel_id_list import MessageChannelIDList -from opal.rest import ApiException +import opal_security +from opal_security.models.message_channel_id_list import MessageChannelIDList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1238,11 +1270,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. - message_channel_id_list = opal.MessageChannelIDList() # MessageChannelIDList | + message_channel_id_list = opal_security.MessageChannelIDList() # MessageChannelIDList | try: api_response = api_instance.set_group_message_channels(group_id, message_channel_id_list) @@ -1295,13 +1327,15 @@ Sets the list of on call schedules attached to a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.on_call_schedule_id_list import OnCallScheduleIDList -from opal.rest import ApiException +import opal_security +from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1317,11 +1351,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. - on_call_schedule_id_list = opal.OnCallScheduleIDList() # OnCallScheduleIDList | + on_call_schedule_id_list = opal_security.OnCallScheduleIDList() # OnCallScheduleIDList | try: api_response = api_instance.set_group_on_call_schedules(group_id, on_call_schedule_id_list) @@ -1374,13 +1408,15 @@ Sets the list of resources that the group gives access to. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.update_group_resources_info import UpdateGroupResourcesInfo -from opal.rest import ApiException +import opal_security +from opal_security.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1396,11 +1432,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. - update_group_resources_info = opal.UpdateGroupResourcesInfo() # UpdateGroupResourcesInfo | + update_group_resources_info = opal_security.UpdateGroupResourcesInfo() # UpdateGroupResourcesInfo | try: api_instance.set_group_resources(group_id, update_group_resources_info) @@ -1451,14 +1487,16 @@ Sets the list of reviewer stages for a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.reviewer_stage import ReviewerStage -from opal.models.reviewer_stage_list import ReviewerStageList -from opal.rest import ApiException +import opal_security +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage_list import ReviewerStageList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1474,11 +1512,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. - reviewer_stage_list = opal.ReviewerStageList() # ReviewerStageList | + reviewer_stage_list = opal_security.ReviewerStageList() # ReviewerStageList | try: api_response = api_instance.set_group_reviewer_stages(group_id, reviewer_stage_list) @@ -1531,13 +1569,15 @@ Sets the list of reviewers for a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.reviewer_id_list import ReviewerIDList -from opal.rest import ApiException +import opal_security +from opal_security.models.reviewer_id_list import ReviewerIDList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1553,11 +1593,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. - reviewer_id_list = opal.ReviewerIDList() # ReviewerIDList | + reviewer_id_list = opal_security.ReviewerIDList() # ReviewerIDList | try: api_response = api_instance.set_group_reviewers(group_id, reviewer_id_list) @@ -1610,13 +1650,15 @@ Sets the visibility of this group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.visibility_info import VisibilityInfo -from opal.rest import ApiException +import opal_security +from opal_security.models.visibility_info import VisibilityInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1632,11 +1674,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) + api_instance = opal_security.GroupsApi(api_client) group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. - visibility_info = opal.VisibilityInfo() # VisibilityInfo | + visibility_info = opal_security.VisibilityInfo() # VisibilityInfo | try: api_response = api_instance.set_group_visibility(group_id, visibility_info) @@ -1689,13 +1731,15 @@ Bulk updates a list of groups. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.update_group_info_list import UpdateGroupInfoList -from opal.rest import ApiException +import opal_security +from opal_security.models.update_group_info_list import UpdateGroupInfoList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1711,10 +1755,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.GroupsApi(api_client) - update_group_info_list = opal.UpdateGroupInfoList() # UpdateGroupInfoList | Groups to be updated + api_instance = opal_security.GroupsApi(api_client) + update_group_info_list = opal_security.UpdateGroupInfoList() # UpdateGroupInfoList | Groups to be updated try: api_response = api_instance.update_groups(update_group_info_list) diff --git a/docs/IdpGroupMapping.md b/docs/IdpGroupMapping.md index 672237d..8d3c500 100644 --- a/docs/IdpGroupMapping.md +++ b/docs/IdpGroupMapping.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.idp_group_mapping import IdpGroupMapping +from opal_security.models.idp_group_mapping import IdpGroupMapping # TODO update the JSON string below json = "{}" diff --git a/docs/IdpGroupMappingList.md b/docs/IdpGroupMappingList.md index 91c6213..c02c0d7 100644 --- a/docs/IdpGroupMappingList.md +++ b/docs/IdpGroupMappingList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.idp_group_mapping_list import IdpGroupMappingList +from opal_security.models.idp_group_mapping_list import IdpGroupMappingList # TODO update the JSON string below json = "{}" diff --git a/docs/IdpGroupMappingsApi.md b/docs/IdpGroupMappingsApi.md index 7837932..d0d3fd5 100644 --- a/docs/IdpGroupMappingsApi.md +++ b/docs/IdpGroupMappingsApi.md @@ -1,4 +1,4 @@ -# opal.IdpGroupMappingsApi +# opal_security.IdpGroupMappingsApi All URIs are relative to *https://api.opal.dev/v1* @@ -21,12 +21,14 @@ Deletes an `IdpGroupMapping` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -42,9 +44,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.IdpGroupMappingsApi(api_client) + api_instance = opal_security.IdpGroupMappingsApi(api_client) app_resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the Okta app. group_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the group. @@ -97,13 +99,15 @@ Returns the configured set of available `IdpGroupMapping` objects for an Okta ap * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.idp_group_mapping_list import IdpGroupMappingList -from opal.rest import ApiException +import opal_security +from opal_security.models.idp_group_mapping_list import IdpGroupMappingList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -119,9 +123,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.IdpGroupMappingsApi(api_client) + api_instance = opal_security.IdpGroupMappingsApi(api_client) app_resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the Okta app. try: @@ -174,13 +178,15 @@ Updates the list of available `IdpGroupMapping` objects for an Okta app. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest -from opal.rest import ApiException +import opal_security +from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -196,11 +202,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.IdpGroupMappingsApi(api_client) + api_instance = opal_security.IdpGroupMappingsApi(api_client) app_resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the Okta app. - update_idp_group_mappings_request = opal.UpdateIdpGroupMappingsRequest() # UpdateIdpGroupMappingsRequest | + update_idp_group_mappings_request = opal_security.UpdateIdpGroupMappingsRequest() # UpdateIdpGroupMappingsRequest | try: api_instance.update_idp_group_mappings(app_resource_id, update_idp_group_mappings_request) diff --git a/docs/MessageChannel.md b/docs/MessageChannel.md index 112db60..ef09577 100644 --- a/docs/MessageChannel.md +++ b/docs/MessageChannel.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.message_channel import MessageChannel +from opal_security.models.message_channel import MessageChannel # TODO update the JSON string below json = "{}" diff --git a/docs/MessageChannelIDList.md b/docs/MessageChannelIDList.md index 4c88b02..ba6b97d 100644 --- a/docs/MessageChannelIDList.md +++ b/docs/MessageChannelIDList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.message_channel_id_list import MessageChannelIDList +from opal_security.models.message_channel_id_list import MessageChannelIDList # TODO update the JSON string below json = "{}" diff --git a/docs/MessageChannelList.md b/docs/MessageChannelList.md index 83ee735..bea6830 100644 --- a/docs/MessageChannelList.md +++ b/docs/MessageChannelList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.message_channel_list import MessageChannelList +from opal_security.models.message_channel_list import MessageChannelList # TODO update the JSON string below json = "{}" diff --git a/docs/MessageChannelTypeEnum.md b/docs/MessageChannelTypeEnum.md deleted file mode 100644 index 0f7d0d8..0000000 --- a/docs/MessageChannelTypeEnum.md +++ /dev/null @@ -1,12 +0,0 @@ -# MessageChannelTypeEnum - -The type of the message channel. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | The type of the message channel. | must be one of ["AUDIT", "REVIEWER", "MONITOR", ] - -[[Back to Model list]](../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 index b533a3f..be867a3 100644 --- a/docs/MessageChannelsApi.md +++ b/docs/MessageChannelsApi.md @@ -1,4 +1,4 @@ -# opal.MessageChannelsApi +# opal_security.MessageChannelsApi All URIs are relative to *https://api.opal.dev/v1* @@ -21,14 +21,16 @@ Creates a `MessageChannel` objects. * 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 +import opal_security +from opal_security.models.create_message_channel_info import CreateMessageChannelInfo +from opal_security.models.message_channel import MessageChannel +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -44,10 +46,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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. + api_instance = opal_security.MessageChannelsApi(api_client) + create_message_channel_info = opal_security.CreateMessageChannelInfo() # CreateMessageChannelInfo | The `MessageChannel` object to be created. try: api_response = api_instance.create_message_channel(create_message_channel_info) @@ -99,13 +101,15 @@ Gets a `MessageChannel` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.message_channel import MessageChannel -from opal.rest import ApiException +import opal_security +from opal_security.models.message_channel import MessageChannel +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -121,9 +125,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.MessageChannelsApi(api_client) + api_instance = opal_security.MessageChannelsApi(api_client) message_channel_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the message_channel. try: @@ -176,13 +180,15 @@ Returns a list of `MessageChannel` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.message_channel_list import MessageChannelList -from opal.rest import ApiException +import opal_security +from opal_security.models.message_channel_list import MessageChannelList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -198,9 +204,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.MessageChannelsApi(api_client) + api_instance = opal_security.MessageChannelsApi(api_client) try: api_response = api_instance.get_message_channels() diff --git a/docs/NonHumanIdentitiesApi.md b/docs/NonHumanIdentitiesApi.md index b5b246d..511955d 100644 --- a/docs/NonHumanIdentitiesApi.md +++ b/docs/NonHumanIdentitiesApi.md @@ -1,4 +1,4 @@ -# opal.NonHumanIdentitiesApi +# opal_security.NonHumanIdentitiesApi All URIs are relative to *https://api.opal.dev/v1* @@ -19,13 +19,15 @@ Returns a list of non-human identities for your organization. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_resources_list import PaginatedResourcesList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_resources_list import PaginatedResourcesList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -41,9 +43,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.NonHumanIdentitiesApi(api_client) + api_instance = opal_security.NonHumanIdentitiesApi(api_client) cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional) page_size = 200 # int | Number of results to return per page. Default is 200. (optional) diff --git a/docs/OnCallSchedule.md b/docs/OnCallSchedule.md index 5767c7f..9ee6b89 100644 --- a/docs/OnCallSchedule.md +++ b/docs/OnCallSchedule.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.on_call_schedule import OnCallSchedule +from opal_security.models.on_call_schedule import OnCallSchedule # TODO update the JSON string below json = "{}" diff --git a/docs/OnCallScheduleIDList.md b/docs/OnCallScheduleIDList.md index 9e1740f..92d1e0c 100644 --- a/docs/OnCallScheduleIDList.md +++ b/docs/OnCallScheduleIDList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.on_call_schedule_id_list import OnCallScheduleIDList +from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList # TODO update the JSON string below json = "{}" diff --git a/docs/OnCallScheduleList.md b/docs/OnCallScheduleList.md index 65df297..a17d591 100644 --- a/docs/OnCallScheduleList.md +++ b/docs/OnCallScheduleList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.on_call_schedule_list import OnCallScheduleList +from opal_security.models.on_call_schedule_list import OnCallScheduleList # TODO update the JSON string below json = "{}" diff --git a/docs/OnCallSchedulesApi.md b/docs/OnCallSchedulesApi.md index 5d26946..885e65a 100644 --- a/docs/OnCallSchedulesApi.md +++ b/docs/OnCallSchedulesApi.md @@ -1,4 +1,4 @@ -# opal.OnCallSchedulesApi +# opal_security.OnCallSchedulesApi All URIs are relative to *https://api.opal.dev/v1* @@ -21,14 +21,16 @@ Creates a `OnCallSchedule` objects. * 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 +import opal_security +from opal_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo +from opal_security.models.on_call_schedule import OnCallSchedule +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -44,10 +46,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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. + api_instance = opal_security.OnCallSchedulesApi(api_client) + create_on_call_schedule_info = opal_security.CreateOnCallScheduleInfo() # CreateOnCallScheduleInfo | The `OnCallSchedule` object to be created. try: api_response = api_instance.create_on_call_schedule(create_on_call_schedule_info) @@ -99,13 +101,15 @@ Gets a `OnCallSchedule` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.on_call_schedule import OnCallSchedule -from opal.rest import ApiException +import opal_security +from opal_security.models.on_call_schedule import OnCallSchedule +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -121,9 +125,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OnCallSchedulesApi(api_client) + api_instance = opal_security.OnCallSchedulesApi(api_client) on_call_schedule_id = '9546209c-42c2-4801-96d7-9ec42df0f59c' # str | The ID of the on_call_schedule. try: @@ -176,13 +180,15 @@ Returns a list of `OnCallSchedule` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.on_call_schedule_list import OnCallScheduleList -from opal.rest import ApiException +import opal_security +from opal_security.models.on_call_schedule_list import OnCallScheduleList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -198,9 +204,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OnCallSchedulesApi(api_client) + api_instance = opal_security.OnCallSchedulesApi(api_client) try: api_response = api_instance.get_on_call_schedules() diff --git a/docs/Owner.md b/docs/Owner.md index 0547754..3336f21 100644 --- a/docs/Owner.md +++ b/docs/Owner.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.owner import Owner +from opal_security.models.owner import Owner # TODO update the JSON string below json = "{}" diff --git a/docs/OwnersApi.md b/docs/OwnersApi.md index 0cdc852..8986cb3 100644 --- a/docs/OwnersApi.md +++ b/docs/OwnersApi.md @@ -1,4 +1,4 @@ -# opal.OwnersApi +# opal_security.OwnersApi All URIs are relative to *https://api.opal.dev/v1* @@ -26,14 +26,16 @@ Creates an owner. * 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 +import opal_security +from opal_security.models.create_owner_info import CreateOwnerInfo +from opal_security.models.owner import Owner +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -49,10 +51,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OwnersApi(api_client) - create_owner_info = opal.CreateOwnerInfo() # CreateOwnerInfo | + api_instance = opal_security.OwnersApi(api_client) + create_owner_info = opal_security.CreateOwnerInfo() # CreateOwnerInfo | try: api_response = api_instance.create_owner(create_owner_info) @@ -104,12 +106,14 @@ Deletes an owner. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -125,9 +129,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OwnersApi(api_client) + api_instance = opal_security.OwnersApi(api_client) owner_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the owner. try: @@ -178,13 +182,15 @@ Returns an `Owner` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.owner import Owner -from opal.rest import ApiException +import opal_security +from opal_security.models.owner import Owner +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -200,9 +206,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OwnersApi(api_client) + api_instance = opal_security.OwnersApi(api_client) owner_id = '32acc112-21ff-4669-91c2-21e27683eaa1' # str | The ID of the owner. try: @@ -255,13 +261,15 @@ Returns an `Owner` object. Does not support owners with `/` in their name, use / * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.owner import Owner -from opal.rest import ApiException +import opal_security +from opal_security.models.owner import Owner +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -277,9 +285,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OwnersApi(api_client) + api_instance = opal_security.OwnersApi(api_client) owner_name = 'MyOwner' # str | The name of the owner. try: @@ -332,13 +340,15 @@ Gets the list of users for this owner, in escalation priority order if applicabl * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.user_list import UserList -from opal.rest import ApiException +import opal_security +from opal_security.models.user_list import UserList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -354,9 +364,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OwnersApi(api_client) + api_instance = opal_security.OwnersApi(api_client) owner_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the owner. try: @@ -409,13 +419,15 @@ Returns a list of `Owner` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_owners_list import PaginatedOwnersList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_owners_list import PaginatedOwnersList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -431,9 +443,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OwnersApi(api_client) + api_instance = opal_security.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) @@ -490,14 +502,16 @@ Sets the list of users for this owner. If escalation is enabled, the order of th * 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 +import opal_security +from opal_security.models.user_id_list import UserIDList +from opal_security.models.user_list import UserList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -513,11 +527,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.OwnersApi(api_client) + api_instance = opal_security.OwnersApi(api_client) owner_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the owner. - user_id_list = opal.UserIDList() # UserIDList | + user_id_list = opal_security.UserIDList() # UserIDList | try: api_response = api_instance.set_owner_users(owner_id, user_id_list) @@ -570,13 +584,15 @@ Bulk updates a list of owners. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.update_owner_info_list import UpdateOwnerInfoList -from opal.rest import ApiException +import opal_security +from opal_security.models.update_owner_info_list import UpdateOwnerInfoList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -592,10 +608,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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 + api_instance = opal_security.OwnersApi(api_client) + update_owner_info_list = opal_security.UpdateOwnerInfoList() # UpdateOwnerInfoList | Owners to be updated try: api_response = api_instance.update_owners(update_owner_info_list) diff --git a/docs/PaginatedConfigurationTemplateList.md b/docs/PaginatedConfigurationTemplateList.md index 64852db..e15aa33 100644 --- a/docs/PaginatedConfigurationTemplateList.md +++ b/docs/PaginatedConfigurationTemplateList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList +from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedEventList.md b/docs/PaginatedEventList.md index eaf4e32..53efbb7 100644 --- a/docs/PaginatedEventList.md +++ b/docs/PaginatedEventList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_event_list import PaginatedEventList +from opal_security.models.paginated_event_list import PaginatedEventList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedGroupBindingsList.md b/docs/PaginatedGroupBindingsList.md index 6814c58..f2d41af 100644 --- a/docs/PaginatedGroupBindingsList.md +++ b/docs/PaginatedGroupBindingsList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList +from opal_security.models.paginated_group_bindings_list import PaginatedGroupBindingsList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedGroupsList.md b/docs/PaginatedGroupsList.md index fc300f8..cdb05cf 100644 --- a/docs/PaginatedGroupsList.md +++ b/docs/PaginatedGroupsList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_groups_list import PaginatedGroupsList +from opal_security.models.paginated_groups_list import PaginatedGroupsList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedOwnersList.md b/docs/PaginatedOwnersList.md index 877553e..815d68e 100644 --- a/docs/PaginatedOwnersList.md +++ b/docs/PaginatedOwnersList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_owners_list import PaginatedOwnersList +from opal_security.models.paginated_owners_list import PaginatedOwnersList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedResourcesList.md b/docs/PaginatedResourcesList.md index 5dadfa7..cd6d0ac 100644 --- a/docs/PaginatedResourcesList.md +++ b/docs/PaginatedResourcesList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_resources_list import PaginatedResourcesList +from opal_security.models.paginated_resources_list import PaginatedResourcesList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedTagsList.md b/docs/PaginatedTagsList.md index 8829185..634e77e 100644 --- a/docs/PaginatedTagsList.md +++ b/docs/PaginatedTagsList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_tags_list import PaginatedTagsList +from opal_security.models.paginated_tags_list import PaginatedTagsList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedUARsList.md b/docs/PaginatedUARsList.md index 0699faf..619601e 100644 --- a/docs/PaginatedUARsList.md +++ b/docs/PaginatedUARsList.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_uars_list import PaginatedUARsList +from opal_security.models.paginated_uars_list import PaginatedUARsList # TODO update the JSON string below json = "{}" diff --git a/docs/PaginatedUsersList.md b/docs/PaginatedUsersList.md index cd14391..f370064 100644 --- a/docs/PaginatedUsersList.md +++ b/docs/PaginatedUsersList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.paginated_users_list import PaginatedUsersList +from opal_security.models.paginated_users_list import PaginatedUsersList # TODO update the JSON string below json = "{}" diff --git a/docs/Request.md b/docs/Request.md index 0da5953..8ca9c37 100644 --- a/docs/Request.md +++ b/docs/Request.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.request import Request +from opal_security.models.request import Request # TODO update the JSON string below json = "{}" diff --git a/docs/RequestConfiguration.md b/docs/RequestConfiguration.md index 5ec5a04..f3eb554 100644 --- a/docs/RequestConfiguration.md +++ b/docs/RequestConfiguration.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.request_configuration import RequestConfiguration +from opal_security.models.request_configuration import RequestConfiguration # TODO update the JSON string below json = "{}" diff --git a/docs/RequestCustomFieldResponse.md b/docs/RequestCustomFieldResponse.md index dbc343d..fb33f78 100644 --- a/docs/RequestCustomFieldResponse.md +++ b/docs/RequestCustomFieldResponse.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.request_custom_field_response import RequestCustomFieldResponse +from opal_security.models.request_custom_field_response import RequestCustomFieldResponse # TODO update the JSON string below json = "{}" diff --git a/docs/RequestCustomFieldResponseFieldValue.md b/docs/RequestCustomFieldResponseFieldValue.md index 2ed9ec9..4288c68 100644 --- a/docs/RequestCustomFieldResponseFieldValue.md +++ b/docs/RequestCustomFieldResponseFieldValue.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue +from opal_security.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue # TODO update the JSON string below json = "{}" diff --git a/docs/RequestList.md b/docs/RequestList.md index 060a37f..84191ad 100644 --- a/docs/RequestList.md +++ b/docs/RequestList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.request_list import RequestList +from opal_security.models.request_list import RequestList # TODO update the JSON string below json = "{}" diff --git a/docs/RequestedItem.md b/docs/RequestedItem.md index ccd1b2f..0a20cc1 100644 --- a/docs/RequestedItem.md +++ b/docs/RequestedItem.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.requested_item import RequestedItem +from opal_security.models.requested_item import RequestedItem # TODO update the JSON string below json = "{}" diff --git a/docs/RequestsApi.md b/docs/RequestsApi.md index b5467ff..620b557 100644 --- a/docs/RequestsApi.md +++ b/docs/RequestsApi.md @@ -1,4 +1,4 @@ -# opal.RequestsApi +# opal_security.RequestsApi All URIs are relative to *https://api.opal.dev/v1* @@ -20,14 +20,16 @@ Create an access request * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.create_request200_response import CreateRequest200Response -from opal.models.create_request_info import CreateRequestInfo -from opal.rest import ApiException +import opal_security +from opal_security.models.create_request200_response import CreateRequest200Response +from opal_security.models.create_request_info import CreateRequestInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -43,10 +45,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.RequestsApi(api_client) - create_request_info = opal.CreateRequestInfo() # CreateRequestInfo | Resources to be updated + api_instance = opal_security.RequestsApi(api_client) + create_request_info = opal_security.CreateRequestInfo() # CreateRequestInfo | Resources to be updated try: api_response = api_instance.create_request(create_request_info) @@ -98,13 +100,15 @@ Returns a list of requests for your organization that is visible by the admin. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.request_list import RequestList -from opal.rest import ApiException +import opal_security +from opal_security.models.request_list import RequestList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -120,9 +124,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.RequestsApi(api_client) + api_instance = opal_security.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) diff --git a/docs/Resource.md b/docs/Resource.md index ad9b232..50c2621 100644 --- a/docs/Resource.md +++ b/docs/Resource.md @@ -38,7 +38,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource import Resource +from opal_security.models.resource import Resource # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceAccessLevel.md b/docs/ResourceAccessLevel.md index b022637..5dc6ef3 100644 --- a/docs/ResourceAccessLevel.md +++ b/docs/ResourceAccessLevel.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_access_level import ResourceAccessLevel +from opal_security.models.resource_access_level import ResourceAccessLevel # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceAccessUser.md b/docs/ResourceAccessUser.md index fc200ba..601971a 100644 --- a/docs/ResourceAccessUser.md +++ b/docs/ResourceAccessUser.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_access_user import ResourceAccessUser +from opal_security.models.resource_access_user import ResourceAccessUser # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceAccessUserList.md b/docs/ResourceAccessUserList.md index 64bbcc8..ee14812 100644 --- a/docs/ResourceAccessUserList.md +++ b/docs/ResourceAccessUserList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_access_user_list import ResourceAccessUserList +from opal_security.models.resource_access_user_list import ResourceAccessUserList # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceNHI.md b/docs/ResourceNHI.md index 62c2c92..f9b5ad9 100644 --- a/docs/ResourceNHI.md +++ b/docs/ResourceNHI.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_nhi import ResourceNHI +from opal_security.models.resource_nhi import ResourceNHI # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfo.md b/docs/ResourceRemoteInfo.md index d537e2b..f70b940 100644 --- a/docs/ResourceRemoteInfo.md +++ b/docs/ResourceRemoteInfo.md @@ -36,7 +36,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info import ResourceRemoteInfo +from opal_security.models.resource_remote_info import ResourceRemoteInfo # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoAwsAccount.md b/docs/ResourceRemoteInfoAwsAccount.md index a9f8c25..334222a 100644 --- a/docs/ResourceRemoteInfoAwsAccount.md +++ b/docs/ResourceRemoteInfoAwsAccount.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount +from opal_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoAwsEc2Instance.md b/docs/ResourceRemoteInfoAwsEc2Instance.md index a860b81..7864efc 100644 --- a/docs/ResourceRemoteInfoAwsEc2Instance.md +++ b/docs/ResourceRemoteInfoAwsEc2Instance.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance +from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoAwsEksCluster.md b/docs/ResourceRemoteInfoAwsEksCluster.md index 93044d0..4c6b91a 100644 --- a/docs/ResourceRemoteInfoAwsEksCluster.md +++ b/docs/ResourceRemoteInfoAwsEksCluster.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster +from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoAwsIamRole.md b/docs/ResourceRemoteInfoAwsIamRole.md index 716f523..8dc3d49 100644 --- a/docs/ResourceRemoteInfoAwsIamRole.md +++ b/docs/ResourceRemoteInfoAwsIamRole.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole +from opal_security.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoAwsPermissionSet.md b/docs/ResourceRemoteInfoAwsPermissionSet.md index 4b270a2..07d277c 100644 --- a/docs/ResourceRemoteInfoAwsPermissionSet.md +++ b/docs/ResourceRemoteInfoAwsPermissionSet.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet +from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoAwsRdsInstance.md b/docs/ResourceRemoteInfoAwsRdsInstance.md index 7793648..7159909 100644 --- a/docs/ResourceRemoteInfoAwsRdsInstance.md +++ b/docs/ResourceRemoteInfoAwsRdsInstance.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpBigQueryDataset.md b/docs/ResourceRemoteInfoGcpBigQueryDataset.md index 72a8e10..7ec3fc6 100644 --- a/docs/ResourceRemoteInfoGcpBigQueryDataset.md +++ b/docs/ResourceRemoteInfoGcpBigQueryDataset.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset +from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpBigQueryTable.md b/docs/ResourceRemoteInfoGcpBigQueryTable.md index b231308..3604115 100644 --- a/docs/ResourceRemoteInfoGcpBigQueryTable.md +++ b/docs/ResourceRemoteInfoGcpBigQueryTable.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpBucket.md b/docs/ResourceRemoteInfoGcpBucket.md index ee1eb0c..bebd7f5 100644 --- a/docs/ResourceRemoteInfoGcpBucket.md +++ b/docs/ResourceRemoteInfoGcpBucket.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket +from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpComputeInstance.md b/docs/ResourceRemoteInfoGcpComputeInstance.md index adbf46a..afc3854 100644 --- a/docs/ResourceRemoteInfoGcpComputeInstance.md +++ b/docs/ResourceRemoteInfoGcpComputeInstance.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance +from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpFolder.md b/docs/ResourceRemoteInfoGcpFolder.md index a6221ae..a63ee3f 100644 --- a/docs/ResourceRemoteInfoGcpFolder.md +++ b/docs/ResourceRemoteInfoGcpFolder.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder +from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpGkeCluster.md b/docs/ResourceRemoteInfoGcpGkeCluster.md index 86c1797..e420f39 100644 --- a/docs/ResourceRemoteInfoGcpGkeCluster.md +++ b/docs/ResourceRemoteInfoGcpGkeCluster.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster +from opal_security.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpOrganization.md b/docs/ResourceRemoteInfoGcpOrganization.md index 0de381c..6e06140 100644 --- a/docs/ResourceRemoteInfoGcpOrganization.md +++ b/docs/ResourceRemoteInfoGcpOrganization.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization +from opal_security.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpProject.md b/docs/ResourceRemoteInfoGcpProject.md index d7a2f59..3aae9f8 100644 --- a/docs/ResourceRemoteInfoGcpProject.md +++ b/docs/ResourceRemoteInfoGcpProject.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal_security.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpServiceAccount.md b/docs/ResourceRemoteInfoGcpServiceAccount.md index c0aaf38..26e7b01 100644 --- a/docs/ResourceRemoteInfoGcpServiceAccount.md +++ b/docs/ResourceRemoteInfoGcpServiceAccount.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount +from opal_security.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGcpSqlInstance.md b/docs/ResourceRemoteInfoGcpSqlInstance.md index f88fa12..e31a9ae 100644 --- a/docs/ResourceRemoteInfoGcpSqlInstance.md +++ b/docs/ResourceRemoteInfoGcpSqlInstance.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance +from opal_security.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGithubRepo.md b/docs/ResourceRemoteInfoGithubRepo.md index 42f5546..6c2fd3e 100644 --- a/docs/ResourceRemoteInfoGithubRepo.md +++ b/docs/ResourceRemoteInfoGithubRepo.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo +from opal_security.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoGitlabProject.md b/docs/ResourceRemoteInfoGitlabProject.md index 794376a..24c705b 100644 --- a/docs/ResourceRemoteInfoGitlabProject.md +++ b/docs/ResourceRemoteInfoGitlabProject.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject +from opal_security.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoOktaApp.md b/docs/ResourceRemoteInfoOktaApp.md index e2c17ee..2df4aba 100644 --- a/docs/ResourceRemoteInfoOktaApp.md +++ b/docs/ResourceRemoteInfoOktaApp.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp +from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoOktaCustomRole.md b/docs/ResourceRemoteInfoOktaCustomRole.md index 2308f00..4a449f0 100644 --- a/docs/ResourceRemoteInfoOktaCustomRole.md +++ b/docs/ResourceRemoteInfoOktaCustomRole.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole +from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoOktaStandardRole.md b/docs/ResourceRemoteInfoOktaStandardRole.md index 67b3d85..dc5f843 100644 --- a/docs/ResourceRemoteInfoOktaStandardRole.md +++ b/docs/ResourceRemoteInfoOktaStandardRole.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoPagerdutyRole.md b/docs/ResourceRemoteInfoPagerdutyRole.md index 2dcc037..0fa703c 100644 --- a/docs/ResourceRemoteInfoPagerdutyRole.md +++ b/docs/ResourceRemoteInfoPagerdutyRole.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoSalesforcePermissionSet.md b/docs/ResourceRemoteInfoSalesforcePermissionSet.md index 0da0c89..3bd8585 100644 --- a/docs/ResourceRemoteInfoSalesforcePermissionSet.md +++ b/docs/ResourceRemoteInfoSalesforcePermissionSet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet +from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoSalesforceProfile.md b/docs/ResourceRemoteInfoSalesforceProfile.md index 3924976..db645d9 100644 --- a/docs/ResourceRemoteInfoSalesforceProfile.md +++ b/docs/ResourceRemoteInfoSalesforceProfile.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile +from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoSalesforceRole.md b/docs/ResourceRemoteInfoSalesforceRole.md index 3bdfdd9..a9cb83c 100644 --- a/docs/ResourceRemoteInfoSalesforceRole.md +++ b/docs/ResourceRemoteInfoSalesforceRole.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceRemoteInfoTeleportRole.md b/docs/ResourceRemoteInfoTeleportRole.md index 4c27cc3..ca9cbb1 100644 --- a/docs/ResourceRemoteInfoTeleportRole.md +++ b/docs/ResourceRemoteInfoTeleportRole.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole +from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceUser.md b/docs/ResourceUser.md index 7596dec..48bc388 100644 --- a/docs/ResourceUser.md +++ b/docs/ResourceUser.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_user import ResourceUser +from opal_security.models.resource_user import ResourceUser # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceUserAccessStatus.md b/docs/ResourceUserAccessStatus.md index f4fd55f..f1ef965 100644 --- a/docs/ResourceUserAccessStatus.md +++ b/docs/ResourceUserAccessStatus.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_user_access_status import ResourceUserAccessStatus +from opal_security.models.resource_user_access_status import ResourceUserAccessStatus # TODO update the JSON string below json = "{}" diff --git a/docs/ResourceWithAccessLevel.md b/docs/ResourceWithAccessLevel.md index 528e254..756ed39 100644 --- a/docs/ResourceWithAccessLevel.md +++ b/docs/ResourceWithAccessLevel.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.resource_with_access_level import ResourceWithAccessLevel +from opal_security.models.resource_with_access_level import ResourceWithAccessLevel # TODO update the JSON string below json = "{}" diff --git a/docs/ResourcesApi.md b/docs/ResourcesApi.md index 6562a49..3b9030b 100644 --- a/docs/ResourcesApi.md +++ b/docs/ResourcesApi.md @@ -1,4 +1,4 @@ -# opal.ResourcesApi +# opal_security.ResourcesApi All URIs are relative to *https://api.opal.dev/v1* @@ -39,14 +39,16 @@ Gives a non-human identity access to this resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.add_resource_nhi_request import AddResourceNhiRequest -from opal.models.resource_nhi import ResourceNHI -from opal.rest import ApiException +import opal_security +from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest +from opal_security.models.resource_nhi import ResourceNHI +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -62,12 +64,12 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. non_human_identity_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The resource ID of the non-human identity to add. - add_resource_nhi_request = opal.AddResourceNhiRequest() # AddResourceNhiRequest | (optional) + add_resource_nhi_request = opal_security.AddResourceNhiRequest() # AddResourceNhiRequest | (optional) try: api_response = api_instance.add_resource_nhi(resource_id, non_human_identity_id, add_resource_nhi_request=add_resource_nhi_request) @@ -121,14 +123,16 @@ Adds a user to this resource. * 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 +import opal_security +from opal_security.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.resource_user import ResourceUser +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -144,14 +148,14 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.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) + add_resource_user_request = opal_security.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) @@ -207,14 +211,16 @@ Creates a resource. See [here](https://docs.opal.dev/reference/end-system-object * 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 +import opal_security +from opal_security.models.create_resource_info import CreateResourceInfo +from opal_security.models.resource import Resource +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -230,10 +236,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) - create_resource_info = opal.CreateResourceInfo() # CreateResourceInfo | + api_instance = opal_security.ResourcesApi(api_client) + create_resource_info = opal_security.CreateResourceInfo() # CreateResourceInfo | try: api_response = api_instance.create_resource(create_resource_info) @@ -285,12 +291,14 @@ Deletes a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -306,9 +314,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. try: @@ -359,12 +367,14 @@ Removes a non-human identity's direct access from this resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -380,9 +390,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. non_human_identity_id = 'f92aa855-cea9-4814-b9d8-f2a60d3e4a06' # str | The resource ID of the non-human identity to remove from this resource. access_level_remote_id = 'roles/cloudsql.instanceUser' # str | The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. (optional) @@ -437,12 +447,14 @@ Removes a user's direct access from this resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -458,9 +470,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.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) @@ -515,13 +527,15 @@ Retrieves a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.resource import Resource -from opal.rest import ApiException +import opal_security +from opal_security.models.resource import Resource +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -537,9 +551,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. try: @@ -592,13 +606,15 @@ Gets the list of audit message channels attached to a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.message_channel_list import MessageChannelList -from opal.rest import ApiException +import opal_security +from opal_security.models.message_channel_list import MessageChannelList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -614,9 +630,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. try: @@ -669,13 +685,15 @@ Gets the list of non-human identities with access to this resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.access_list import AccessList -from opal.rest import ApiException +import opal_security +from opal_security.models.access_list import AccessList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -691,9 +709,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.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) @@ -748,13 +766,15 @@ Gets the list reviewer stages for a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.reviewer_stage import ReviewerStage -from opal.rest import ApiException +import opal_security +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -770,9 +790,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. try: @@ -825,12 +845,14 @@ Gets the list of owner IDs of the reviewers for a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -846,9 +868,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. try: @@ -901,13 +923,15 @@ Returns all tags applied to the resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.tags_list import TagsList -from opal.rest import ApiException +import opal_security +from opal_security.models.tags_list import TagsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -923,9 +947,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the resource whose tags to return. try: @@ -978,13 +1002,15 @@ Gets the list of users for this resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.resource_access_user_list import ResourceAccessUserList -from opal.rest import ApiException +import opal_security +from opal_security.models.resource_access_user_list import ResourceAccessUserList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1000,9 +1026,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.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) @@ -1057,13 +1083,15 @@ Gets the visibility of this resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.visibility_info import VisibilityInfo -from opal.rest import ApiException +import opal_security +from opal_security.models.visibility_info import VisibilityInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1079,9 +1107,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. try: @@ -1134,14 +1162,16 @@ Returns a list of resources for your organization. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_resources_list import PaginatedResourcesList -from opal.models.resource_type_enum import ResourceTypeEnum -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_resources_list import PaginatedResourcesList +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1157,12 +1187,12 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.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 = opal.ResourceTypeEnum() # ResourceTypeEnum | The resource type to filter by. (optional) + resource_type_filter = opal_security.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) @@ -1222,13 +1252,15 @@ Get user's access status to a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.resource_user_access_status import ResourceUserAccessStatus -from opal.rest import ApiException +import opal_security +from opal_security.models.resource_user_access_status import ResourceUserAccessStatus +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1244,9 +1276,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.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) @@ -1307,13 +1339,15 @@ Sets the list of audit message channels attached to a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.message_channel_id_list import MessageChannelIDList -from opal.rest import ApiException +import opal_security +from opal_security.models.message_channel_id_list import MessageChannelIDList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1329,11 +1363,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. - message_channel_id_list = opal.MessageChannelIDList() # MessageChannelIDList | + message_channel_id_list = opal_security.MessageChannelIDList() # MessageChannelIDList | try: api_response = api_instance.set_resource_message_channels(resource_id, message_channel_id_list) @@ -1386,14 +1420,16 @@ Sets the list of reviewer stages for a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.reviewer_stage import ReviewerStage -from opal.models.reviewer_stage_list import ReviewerStageList -from opal.rest import ApiException +import opal_security +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage_list import ReviewerStageList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1409,11 +1445,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. - reviewer_stage_list = opal.ReviewerStageList() # ReviewerStageList | + reviewer_stage_list = opal_security.ReviewerStageList() # ReviewerStageList | try: api_response = api_instance.set_resource_reviewer_stages(resource_id, reviewer_stage_list) @@ -1466,13 +1502,15 @@ Sets the list of reviewers for a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.reviewer_id_list import ReviewerIDList -from opal.rest import ApiException +import opal_security +from opal_security.models.reviewer_id_list import ReviewerIDList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1488,11 +1526,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. - reviewer_id_list = opal.ReviewerIDList() # ReviewerIDList | + reviewer_id_list = opal_security.ReviewerIDList() # ReviewerIDList | try: api_response = api_instance.set_resource_reviewers(resource_id, reviewer_id_list) @@ -1545,13 +1583,15 @@ Sets the visibility of this resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.visibility_info import VisibilityInfo -from opal.rest import ApiException +import opal_security +from opal_security.models.visibility_info import VisibilityInfo +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1567,11 +1607,11 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) + api_instance = opal_security.ResourcesApi(api_client) resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource. - visibility_info = opal.VisibilityInfo() # VisibilityInfo | + visibility_info = opal_security.VisibilityInfo() # VisibilityInfo | try: api_response = api_instance.set_resource_visibility(resource_id, visibility_info) @@ -1624,13 +1664,15 @@ Bulk updates a list of resources. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.update_resource_info_list import UpdateResourceInfoList -from opal.rest import ApiException +import opal_security +from opal_security.models.update_resource_info_list import UpdateResourceInfoList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -1646,10 +1688,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.ResourcesApi(api_client) - update_resource_info_list = opal.UpdateResourceInfoList() # UpdateResourceInfoList | Resources to be updated + api_instance = opal_security.ResourcesApi(api_client) + update_resource_info_list = opal_security.UpdateResourceInfoList() # UpdateResourceInfoList | Resources to be updated try: api_response = api_instance.update_resources(update_resource_info_list) diff --git a/docs/ReviewerIDList.md b/docs/ReviewerIDList.md index d2a1320..58715bd 100644 --- a/docs/ReviewerIDList.md +++ b/docs/ReviewerIDList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.reviewer_id_list import ReviewerIDList +from opal_security.models.reviewer_id_list import ReviewerIDList # TODO update the JSON string below json = "{}" diff --git a/docs/ReviewerStage.md b/docs/ReviewerStage.md index ea4f479..9bde0b7 100644 --- a/docs/ReviewerStage.md +++ b/docs/ReviewerStage.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage import ReviewerStage # TODO update the JSON string below json = "{}" diff --git a/docs/ReviewerStageList.md b/docs/ReviewerStageList.md index b8a9a9e..183b95a 100644 --- a/docs/ReviewerStageList.md +++ b/docs/ReviewerStageList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.reviewer_stage_list import ReviewerStageList +from opal_security.models.reviewer_stage_list import ReviewerStageList # TODO update the JSON string below json = "{}" diff --git a/docs/Session.md b/docs/Session.md index 9b5c6ac..f1bc4cb 100644 --- a/docs/Session.md +++ b/docs/Session.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.session import Session +from opal_security.models.session import Session # TODO update the JSON string below json = "{}" diff --git a/docs/SessionsApi.md b/docs/SessionsApi.md index d9c8539..22311f7 100644 --- a/docs/SessionsApi.md +++ b/docs/SessionsApi.md @@ -1,4 +1,4 @@ -# opal.SessionsApi +# opal_security.SessionsApi All URIs are relative to *https://api.opal.dev/v1* @@ -19,13 +19,15 @@ Returns a list of `Session` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.sessions_list import SessionsList -from opal.rest import ApiException +import opal_security +from opal_security.models.sessions_list import SessionsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -41,9 +43,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.SessionsApi(api_client) + api_instance = opal_security.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) diff --git a/docs/SessionsList.md b/docs/SessionsList.md index 7306d09..be1ea76 100644 --- a/docs/SessionsList.md +++ b/docs/SessionsList.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.sessions_list import SessionsList +from opal_security.models.sessions_list import SessionsList # TODO update the JSON string below json = "{}" diff --git a/docs/SubEvent.md b/docs/SubEvent.md index d20cce2..5c87575 100644 --- a/docs/SubEvent.md +++ b/docs/SubEvent.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.sub_event import SubEvent +from opal_security.models.sub_event import SubEvent # TODO update the JSON string below json = "{}" diff --git a/docs/Tag.md b/docs/Tag.md index 742d9e6..17470b0 100644 --- a/docs/Tag.md +++ b/docs/Tag.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.tag import Tag +from opal_security.models.tag import Tag # TODO update the JSON string below json = "{}" diff --git a/docs/TagFilter.md b/docs/TagFilter.md index 29205d1..baf599b 100644 --- a/docs/TagFilter.md +++ b/docs/TagFilter.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.tag_filter import TagFilter +from opal_security.models.tag_filter import TagFilter # TODO update the JSON string below json = "{}" diff --git a/docs/TagsApi.md b/docs/TagsApi.md index 23aa893..52d49e0 100644 --- a/docs/TagsApi.md +++ b/docs/TagsApi.md @@ -1,4 +1,4 @@ -# opal.TagsApi +# opal_security.TagsApi All URIs are relative to *https://api.opal.dev/v1* @@ -29,12 +29,14 @@ Applies a tag to a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -50,9 +52,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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. @@ -105,12 +107,14 @@ Applies a tag to a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -126,9 +130,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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. @@ -181,12 +185,14 @@ Applies a tag to a user. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -202,9 +208,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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. @@ -257,14 +263,16 @@ Creates a tag with the given key and value. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.create_tag_info import CreateTagInfo -from opal.models.tag import Tag -from opal.rest import ApiException +import opal_security +from opal_security.models.create_tag_info import CreateTagInfo +from opal_security.models.tag import Tag +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -280,13 +288,13 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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) + create_tag_info = opal_security.CreateTagInfo() # CreateTagInfo | (optional) try: 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) @@ -341,12 +349,14 @@ UNSTABLE. May be removed at any time. Deletes a tag with the given id. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -362,9 +372,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.TagsApi(api_client) tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The tag ID try: @@ -415,13 +425,15 @@ Gets a tag with the given key and value. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.tag import Tag -from opal.rest import ApiException +import opal_security +from opal_security.models.tag import Tag +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -437,9 +449,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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) @@ -494,13 +506,15 @@ UNSTABLE. May be removed at any time. Gets a tag with the given id. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.tag import Tag -from opal.rest import ApiException +import opal_security +from opal_security.models.tag import Tag +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -516,9 +530,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.TagsApi(api_client) tag_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The tag ID try: @@ -571,13 +585,15 @@ Returns a list of tags created by your organization. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_tags_list import PaginatedTagsList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_tags_list import PaginatedTagsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -593,9 +609,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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) @@ -650,12 +666,14 @@ Removes a tag from a group. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -671,9 +689,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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. @@ -726,12 +744,14 @@ Removes a tag from a resource. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -747,9 +767,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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. @@ -802,12 +822,14 @@ Removes a tag from a user. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.rest import ApiException +import opal_security +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -823,9 +845,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.TagsApi(api_client) + api_instance = opal_security.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. diff --git a/docs/TagsList.md b/docs/TagsList.md index 34a7bf7..8d8df5d 100644 --- a/docs/TagsList.md +++ b/docs/TagsList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.tags_list import TagsList +from opal_security.models.tags_list import TagsList # TODO update the JSON string below json = "{}" diff --git a/docs/TicketPropagationConfiguration.md b/docs/TicketPropagationConfiguration.md index 0ccf03c..16f2a3f 100644 --- a/docs/TicketPropagationConfiguration.md +++ b/docs/TicketPropagationConfiguration.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration # TODO update the JSON string below json = "{}" diff --git a/docs/UAR.md b/docs/UAR.md index d2811be..7165f6f 100644 --- a/docs/UAR.md +++ b/docs/UAR.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.uar import UAR +from opal_security.models.uar import UAR # TODO update the JSON string below json = "{}" diff --git a/docs/UARScope.md b/docs/UARScope.md index ad1b384..745e8ad 100644 --- a/docs/UARScope.md +++ b/docs/UARScope.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.uar_scope import UARScope +from opal_security.models.uar_scope import UARScope # TODO update the JSON string below json = "{}" diff --git a/docs/UarsApi.md b/docs/UarsApi.md index 1207d88..0de803a 100644 --- a/docs/UarsApi.md +++ b/docs/UarsApi.md @@ -1,4 +1,4 @@ -# opal.UarsApi +# opal_security.UarsApi All URIs are relative to *https://api.opal.dev/v1* @@ -21,14 +21,16 @@ Starts a User Access Review. * 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 +import opal_security +from opal_security.models.create_uar_info import CreateUARInfo +from opal_security.models.uar import UAR +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -44,10 +46,10 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.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. + api_instance = opal_security.UarsApi(api_client) + create_uar_info = opal_security.CreateUARInfo() # CreateUARInfo | The settings of the UAR. try: api_response = api_instance.create_uar(create_uar_info) @@ -99,13 +101,15 @@ Retrieves a specific UAR. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.uar import UAR -from opal.rest import ApiException +import opal_security +from opal_security.models.uar import UAR +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -121,9 +125,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.UarsApi(api_client) + api_instance = opal_security.UarsApi(api_client) uar_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the UAR. try: @@ -176,13 +180,15 @@ Returns a list of `UAR` objects. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_uars_list import PaginatedUARsList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_uars_list import PaginatedUARsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -198,9 +204,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.UarsApi(api_client) + api_instance = opal_security.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) diff --git a/docs/UpdateConfigurationTemplateInfo.md b/docs/UpdateConfigurationTemplateInfo.md index b6dc811..8535506 100644 --- a/docs/UpdateConfigurationTemplateInfo.md +++ b/docs/UpdateConfigurationTemplateInfo.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_configuration_template_info import UpdateConfigurationTemplateInfo +from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateGroupBindingInfo.md b/docs/UpdateGroupBindingInfo.md index e856db6..f20a925 100644 --- a/docs/UpdateGroupBindingInfo.md +++ b/docs/UpdateGroupBindingInfo.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_group_binding_info import UpdateGroupBindingInfo +from opal_security.models.update_group_binding_info import UpdateGroupBindingInfo # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateGroupBindingInfoList.md b/docs/UpdateGroupBindingInfoList.md index 92b357e..5bf101a 100644 --- a/docs/UpdateGroupBindingInfoList.md +++ b/docs/UpdateGroupBindingInfoList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList +from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateGroupInfo.md b/docs/UpdateGroupInfo.md index e194ac8..08dc4f5 100644 --- a/docs/UpdateGroupInfo.md +++ b/docs/UpdateGroupInfo.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_group_info import UpdateGroupInfo +from opal_security.models.update_group_info import UpdateGroupInfo # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateGroupInfoList.md b/docs/UpdateGroupInfoList.md index 7fc7660..d0141cd 100644 --- a/docs/UpdateGroupInfoList.md +++ b/docs/UpdateGroupInfoList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_group_info_list import UpdateGroupInfoList +from opal_security.models.update_group_info_list import UpdateGroupInfoList # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateGroupResourcesInfo.md b/docs/UpdateGroupResourcesInfo.md index ebb2e28..b4b1833 100644 --- a/docs/UpdateGroupResourcesInfo.md +++ b/docs/UpdateGroupResourcesInfo.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal_security.models.update_group_resources_info import UpdateGroupResourcesInfo # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateIdpGroupMappingsRequest.md b/docs/UpdateIdpGroupMappingsRequest.md index a8f59e1..76b9eb5 100644 --- a/docs/UpdateIdpGroupMappingsRequest.md +++ b/docs/UpdateIdpGroupMappingsRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateIdpGroupMappingsRequestMappingsInner.md b/docs/UpdateIdpGroupMappingsRequestMappingsInner.md index f66fd00..55c4cfd 100644 --- a/docs/UpdateIdpGroupMappingsRequestMappingsInner.md +++ b/docs/UpdateIdpGroupMappingsRequestMappingsInner.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner +from opal_security.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateOwnerInfo.md b/docs/UpdateOwnerInfo.md index a6df014..27e4a15 100644 --- a/docs/UpdateOwnerInfo.md +++ b/docs/UpdateOwnerInfo.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_owner_info import UpdateOwnerInfo +from opal_security.models.update_owner_info import UpdateOwnerInfo # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateOwnerInfoList.md b/docs/UpdateOwnerInfoList.md index 6a9a3da..4889ec1 100644 --- a/docs/UpdateOwnerInfoList.md +++ b/docs/UpdateOwnerInfoList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_owner_info_list import UpdateOwnerInfoList +from opal_security.models.update_owner_info_list import UpdateOwnerInfoList # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateResourceInfo.md b/docs/UpdateResourceInfo.md index 0c8b5f4..f4ee275 100644 --- a/docs/UpdateResourceInfo.md +++ b/docs/UpdateResourceInfo.md @@ -31,7 +31,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_resource_info import UpdateResourceInfo +from opal_security.models.update_resource_info import UpdateResourceInfo # TODO update the JSON string below json = "{}" diff --git a/docs/UpdateResourceInfoList.md b/docs/UpdateResourceInfoList.md index 20e82ea..0e55b65 100644 --- a/docs/UpdateResourceInfoList.md +++ b/docs/UpdateResourceInfoList.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.update_resource_info_list import UpdateResourceInfoList +from opal_security.models.update_resource_info_list import UpdateResourceInfoList # TODO update the JSON string below json = "{}" diff --git a/docs/User.md b/docs/User.md index 3892eb9..a7d636c 100644 --- a/docs/User.md +++ b/docs/User.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.user import User +from opal_security.models.user import User # TODO update the JSON string below json = "{}" diff --git a/docs/UserIDList.md b/docs/UserIDList.md index 54baaf4..1ed9554 100644 --- a/docs/UserIDList.md +++ b/docs/UserIDList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.user_id_list import UserIDList +from opal_security.models.user_id_list import UserIDList # TODO update the JSON string below json = "{}" diff --git a/docs/UserList.md b/docs/UserList.md index cbe310e..8f341e0 100644 --- a/docs/UserList.md +++ b/docs/UserList.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.user_list import UserList +from opal_security.models.user_list import UserList # TODO update the JSON string below json = "{}" diff --git a/docs/UsersApi.md b/docs/UsersApi.md index a90907c..6f25054 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -1,4 +1,4 @@ -# opal.UsersApi +# opal_security.UsersApi All URIs are relative to *https://api.opal.dev/v1* @@ -21,13 +21,15 @@ Returns all tags applied to the user. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.tags_list import TagsList -from opal.rest import ApiException +import opal_security +from opal_security.models.tags_list import TagsList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -43,9 +45,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.UsersApi(api_client) + api_instance = opal_security.UsersApi(api_client) user_id = '1b978423-db0a-4037-a4cf-f79c60cb67b3' # str | The ID of the user whose tags to return. try: @@ -98,13 +100,15 @@ Returns a list of users for your organization. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.paginated_users_list import PaginatedUsersList -from opal.rest import ApiException +import opal_security +from opal_security.models.paginated_users_list import PaginatedUsersList +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -120,9 +124,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.UsersApi(api_client) + api_instance = opal_security.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) @@ -177,13 +181,15 @@ Returns a `User` object. * Bearer Authentication (BearerAuth): ```python -import opal -from opal.models.user import User -from opal.rest import ApiException +import opal_security +from opal_security.models.user import User +from opal_security.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. +import opal_security as opal + configuration = opal.Configuration( host = "https://api.opal.dev/v1" ) @@ -199,9 +205,9 @@ configuration = opal.Configuration( ) # Enter a context with an instance of the API client -with opal.ApiClient(configuration) as api_client: +with opal_security.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = opal.UsersApi(api_client) + api_instance = opal_security.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) diff --git a/docs/VisibilityEnum.md b/docs/VisibilityEnum.md deleted file mode 100644 index 9cf14f7..0000000 --- a/docs/VisibilityEnum.md +++ /dev/null @@ -1,12 +0,0 @@ -# VisibilityEnum - -The visibility level of the entity. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | The visibility level of the entity. | must be one of ["GLOBAL", "TEAM", ] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/VisibilityInfo.md b/docs/VisibilityInfo.md index aee3281..9431dcb 100644 --- a/docs/VisibilityInfo.md +++ b/docs/VisibilityInfo.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes ## Example ```python -from opal.models.visibility_info import VisibilityInfo +from opal_security.models.visibility_info import VisibilityInfo # TODO update the JSON string below json = "{}" diff --git a/opal/__init__.py b/opal/__init__.py deleted file mode 100644 index 72669e3..0000000 --- a/opal/__init__.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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 - - -__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.idp_group_mappings_api import IdpGroupMappingsApi -from opal.api.message_channels_api import MessageChannelsApi -from opal.api.non_human_identities_api import NonHumanIdentitiesApi -from opal.api.on_call_schedules_api import OnCallSchedulesApi -from opal.api.owners_api import OwnersApi -from opal.api.requests_api import RequestsApi -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 -from opal.configuration import Configuration -from opal.exceptions import OpenApiException -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.access import Access -from opal.models.access_list import AccessList -from opal.models.add_group_resource_request import AddGroupResourceRequest -from opal.models.add_group_user_request import AddGroupUserRequest -from opal.models.add_resource_nhi_request import AddResourceNhiRequest -from opal.models.add_resource_user_request import AddResourceUserRequest -from opal.models.app import App -from opal.models.app_type_enum import AppTypeEnum -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_request200_response import CreateRequest200Response -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList -from opal.models.create_request_info import CreateRequestInfo -from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner -from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner -from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner -from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket -from opal.models.create_resource_info import CreateResourceInfo -from opal.models.create_tag_info import CreateTagInfo -from opal.models.create_uar_info import CreateUARInfo -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.idp_group_mapping import IdpGroupMapping -from opal.models.idp_group_mapping_list import IdpGroupMappingList -from opal.models.message_channel import MessageChannel -from opal.models.message_channel_id_list import MessageChannelIDList -from opal.models.message_channel_list import MessageChannelList -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_nhi import ResourceNHI -from opal.models.resource_remote_info import ResourceRemoteInfo -from opal.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount -from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance -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_service_account import ResourceRemoteInfoGcpServiceAccount -from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance -from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo -from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject -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.risk_sensitivity_enum import RiskSensitivityEnum -from opal.models.session import Session -from opal.models.sessions_list import SessionsList -from opal.models.sub_event import SubEvent -from opal.models.tag import Tag -from opal.models.tag_filter import TagFilter -from opal.models.tags_list import TagsList -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration -from opal.models.ticketing_provider_enum import TicketingProviderEnum -from opal.models.uar import UAR -from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum -from opal.models.uar_scope import UARScope -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_idp_group_mappings_request import UpdateIdpGroupMappingsRequest -from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner -from opal.models.update_owner_info import UpdateOwnerInfo -from opal.models.update_owner_info_list import UpdateOwnerInfoList -from opal.models.update_resource_info import UpdateResourceInfo -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 deleted file mode 100644 index a808043..0000000 --- a/opal/api/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# 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.idp_group_mappings_api import IdpGroupMappingsApi -from opal.api.message_channels_api import MessageChannelsApi -from opal.api.non_human_identities_api import NonHumanIdentitiesApi -from opal.api.on_call_schedules_api import OnCallSchedulesApi -from opal.api.owners_api import OwnersApi -from opal.api.requests_api import RequestsApi -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/apis/__init__.py b/opal/apis/__init__.py deleted file mode 100644 index 34d3569..0000000 --- a/opal/apis/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ - -# flake8: noqa - -# Import all APIs into this package. -# If you have many APIs here with many many models used in each API this may -# raise a `RecursionError`. -# In order to avoid this, import only the API that you directly need like: -# -# from .api.events_api import EventsApi -# -# or import this package, but before doing it, use: -# -# import sys -# sys.setrecursionlimit(n) - -# Import APIs into API package: -from opal.api.events_api import EventsApi -from opal.api.groups_api import GroupsApi -from opal.api.resources_api import ResourcesApi -from opal.api.sessions_api import SessionsApi -from opal.api.tags_api import TagsApi -from opal.api.users_api import UsersApi diff --git a/opal/model/__init__.py b/opal/model/__init__.py deleted file mode 100644 index cfe32b7..0000000 --- a/opal/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from {{packageName}.models import ModelA, ModelB diff --git a/opal/model/entity_type_enum.py b/opal/model/entity_type_enum.py deleted file mode 100644 index 4fdeedb..0000000 --- a/opal/model/entity_type_enum.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class EntityTypeEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'GROUP': "GROUP", - 'RESOURCE': "RESOURCE", - 'USER': "USER", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """EntityTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of an entity.., must be one of ["GROUP", "RESOURCE", "USER", ] # noqa: E501 - - Keyword Args: - value (str): The type of an entity.., must be one of ["GROUP", "RESOURCE", "USER", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """EntityTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of an entity.., must be one of ["GROUP", "RESOURCE", "USER", ] # noqa: E501 - - Keyword Args: - value (str): The type of an entity.., must be one of ["GROUP", "RESOURCE", "USER", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model/event.py b/opal/model/event.py deleted file mode 100644 index 5ec8f0d..0000000 --- a/opal/model/event.py +++ /dev/null @@ -1,280 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class Event(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'event_id': (str,), # noqa: E501 - 'actor_user_id': (str,), # noqa: E501 - 'event_type': (str,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'event_id': 'event_id', # noqa: E501 - 'actor_user_id': 'actor_user_id', # noqa: E501 - 'event_type': 'event_type', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, event_id, actor_user_id, event_type, created_at, *args, **kwargs): # noqa: E501 - """Event - a model defined in OpenAPI - - Args: - event_id (str): The ID of the event. - actor_user_id (str): The ID of the actor user. - event_type (str): The event type. - created_at (datetime): The day and time the event was created. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.event_id = event_id - self.actor_user_id = actor_user_id - self.event_type = event_type - self.created_at = created_at - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, event_id, actor_user_id, event_type, created_at, *args, **kwargs): # noqa: E501 - """Event - a model defined in OpenAPI - - Args: - event_id (str): The ID of the event. - actor_user_id (str): The ID of the actor user. - event_type (str): The event type. - created_at (datetime): The day and time the event was created. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.event_id = event_id - self.actor_user_id = actor_user_id - self.event_type = event_type - self.created_at = created_at - 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: - # 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.") diff --git a/opal/model/group.py b/opal/model/group.py deleted file mode 100644 index cfb8a61..0000000 --- a/opal/model/group.py +++ /dev/null @@ -1,328 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel, -) -from opal.exceptions import ApiAttributeError - - -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 - - -class Group(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = {} - - validations = {} - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - 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 - } - - @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 - } - - read_only_vars = {} - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, group_id, *args, **kwargs): # noqa: E501 - """Group - a model defined in OpenAPI - - Args: - group_id (str): The ID of the group. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the group.. [optional] # noqa: E501 - description (str): A description of the group.. [optional] # noqa: E501 - owner_team_id (str): The ID of the owning team of the group.. [optional] # noqa: E501 - group_function (GroupFunctionEnum): [optional] # noqa: E501 - group_type (GroupTypeEnum): [optional] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the group can be requested for (in minutes).. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the group require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the group require a support ticket.. [optional] # 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", ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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 - ): - # 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", - ] - ) - - @convert_js_args_to_python_args - def __init__(self, group_id, *args, **kwargs): # noqa: E501 - """Group - a model defined in OpenAPI - - Args: - group_id (str): The ID of the group. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the group.. [optional] # noqa: E501 - description (str): A description of the group.. [optional] # noqa: E501 - owner_team_id (str): The ID of the owning team of the group.. [optional] # noqa: E501 - group_function (GroupFunctionEnum): [optional] # noqa: E501 - group_type (GroupTypeEnum): [optional] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the group can be requested for (in minutes).. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the group require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the group require a support ticket.. [optional] # 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", ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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 - ): - # 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." - ) diff --git a/opal/model/group_function_enum.py b/opal/model/group_function_enum.py deleted file mode 100644 index b3d820d..0000000 --- a/opal/model/group_function_enum.py +++ /dev/null @@ -1,285 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class GroupFunctionEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'REGULAR': "REGULAR", - 'ON_CALL': "ON_CALL", - 'TEAM': "TEAM", - 'UNKNOWN': "UNKNOWN", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """GroupFunctionEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The function type of the group.., must be one of ["REGULAR", "ON_CALL", "TEAM", "UNKNOWN", ] # noqa: E501 - - Keyword Args: - value (str): The function type of the group.., must be one of ["REGULAR", "ON_CALL", "TEAM", "UNKNOWN", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """GroupFunctionEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The function type of the group.., must be one of ["REGULAR", "ON_CALL", "TEAM", "UNKNOWN", ] # noqa: E501 - - Keyword Args: - value (str): The function type of the group.., must be one of ["REGULAR", "ON_CALL", "TEAM", "UNKNOWN", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model/group_type_enum.py b/opal/model/group_type_enum.py deleted file mode 100644 index 246d78d..0000000 --- a/opal/model/group_type_enum.py +++ /dev/null @@ -1,288 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class GroupTypeEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'ACTIVE_DIRECTORY_GROUP': "ACTIVE_DIRECTORY_GROUP", - 'DUO_GROUP': "DUO_GROUP", - 'GIT_HUB_TEAM': "GIT_HUB_TEAM", - 'GOOGLE_GROUPS_GROUP': "GOOGLE_GROUPS_GROUP", - 'LDAP_GROUP': "LDAP_GROUP", - 'OKTA_GROUP': "OKTA_GROUP", - 'OPAL_GROUP': "OPAL_GROUP", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """GroupTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (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", ] # noqa: E501 - - Keyword Args: - 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", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """GroupTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (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", ] # noqa: E501 - - Keyword Args: - 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", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model/message_channel.py b/opal/model/message_channel.py deleted file mode 100644 index 8b31e23..0000000 --- a/opal/model/message_channel.py +++ /dev/null @@ -1,290 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.message_channel_provider_enum import MessageChannelProviderEnum - from opal.model.message_channel_type_enum import MessageChannelTypeEnum - globals()['MessageChannelProviderEnum'] = MessageChannelProviderEnum - globals()['MessageChannelTypeEnum'] = MessageChannelTypeEnum - - -class MessageChannel(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'message_channel_id': (str,), # noqa: E501 - 'third_party_provider': (MessageChannelProviderEnum,), # noqa: E501 - 'remote_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'message_channel_type': (MessageChannelTypeEnum,), # noqa: E501 - 'is_private': (bool,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'message_channel_id': 'message_channel_id', # noqa: E501 - 'third_party_provider': 'third_party_provider', # noqa: E501 - 'remote_id': 'remote_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'message_channel_type': 'message_channel_type', # noqa: E501 - 'is_private': 'is_private', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, message_channel_id, *args, **kwargs): # noqa: E501 - """MessageChannel - a model defined in OpenAPI - - Args: - message_channel_id (str): The ID of the message channel. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - third_party_provider (MessageChannelProviderEnum): [optional] # noqa: E501 - remote_id (str): The remote ID of the message channel. [optional] # noqa: E501 - name (str): The name of the message channel.. [optional] # noqa: E501 - message_channel_type (MessageChannelTypeEnum): [optional] # noqa: E501 - is_private (bool): A bool representing whether or not the message channel is private.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.message_channel_id = message_channel_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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, message_channel_id, *args, **kwargs): # noqa: E501 - """MessageChannel - a model defined in OpenAPI - - Args: - message_channel_id (str): The ID of the message channel. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - third_party_provider (MessageChannelProviderEnum): [optional] # noqa: E501 - remote_id (str): The remote ID of the message channel. [optional] # noqa: E501 - name (str): The name of the message channel.. [optional] # noqa: E501 - message_channel_type (MessageChannelTypeEnum): [optional] # noqa: E501 - is_private (bool): A bool representing whether or not the message channel is private.. [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.message_channel_id = message_channel_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: - # 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.") diff --git a/opal/model/message_channel_id_list.py b/opal/model/message_channel_id_list.py deleted file mode 100644 index 492d1f5..0000000 --- a/opal/model/message_channel_id_list.py +++ /dev/null @@ -1,262 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class MessageChannelIDList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'message_channel_ids': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'message_channel_ids': 'message_channel_ids', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, message_channel_ids, *args, **kwargs): # noqa: E501 - """MessageChannelIDList - a model defined in OpenAPI - - Args: - message_channel_ids ([str]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.message_channel_ids = message_channel_ids - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, message_channel_ids, *args, **kwargs): # noqa: E501 - """MessageChannelIDList - a model defined in OpenAPI - - Args: - message_channel_ids ([str]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.message_channel_ids = message_channel_ids - 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: - # 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.") diff --git a/opal/model/message_channel_list.py b/opal/model/message_channel_list.py deleted file mode 100644 index 8cce308..0000000 --- a/opal/model/message_channel_list.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.message_channel import MessageChannel - globals()['MessageChannel'] = MessageChannel - - -class MessageChannelList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'channels': ([MessageChannel],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'channels': 'channels', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, channels, *args, **kwargs): # noqa: E501 - """MessageChannelList - a model defined in OpenAPI - - Args: - channels ([MessageChannel]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.channels = channels - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, channels, *args, **kwargs): # noqa: E501 - """MessageChannelList - a model defined in OpenAPI - - Args: - channels ([MessageChannel]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.channels = channels - 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: - # 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.") diff --git a/opal/model/message_channel_provider_enum.py b/opal/model/message_channel_provider_enum.py deleted file mode 100644 index 7a0bfab..0000000 --- a/opal/model/message_channel_provider_enum.py +++ /dev/null @@ -1,274 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class MessageChannelProviderEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'SLACK': "SLACK", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """MessageChannelProviderEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The third party provider of the message channel.. if omitted defaults to "SLACK", must be one of ["SLACK", ] # noqa: E501 - - Keyword Args: - value (str): The third party provider of the message channel.. if omitted defaults to "SLACK", must be one of ["SLACK", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "SLACK" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """MessageChannelProviderEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The third party provider of the message channel.. if omitted defaults to "SLACK", must be one of ["SLACK", ] # noqa: E501 - - Keyword Args: - value (str): The third party provider of the message channel.. if omitted defaults to "SLACK", must be one of ["SLACK", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - value = "SLACK" - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model/message_channel_type_enum.py b/opal/model/message_channel_type_enum.py deleted file mode 100644 index dc8a17a..0000000 --- a/opal/model/message_channel_type_enum.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class MessageChannelTypeEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'AUDIT': "AUDIT", - 'REVIEWER': "REVIEWER", - 'MONITOR': "MONITOR", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """MessageChannelTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of the message channel.., must be one of ["AUDIT", "REVIEWER", "MONITOR", ] # noqa: E501 - - Keyword Args: - value (str): The type of the message channel.., must be one of ["AUDIT", "REVIEWER", "MONITOR", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """MessageChannelTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The type of the message channel.., must be one of ["AUDIT", "REVIEWER", "MONITOR", ] # noqa: E501 - - Keyword Args: - value (str): The type of the message channel.., must be one of ["AUDIT", "REVIEWER", "MONITOR", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model/new_admin_id_list.py b/opal/model/new_admin_id_list.py deleted file mode 100644 index 4eee33b..0000000 --- a/opal/model/new_admin_id_list.py +++ /dev/null @@ -1,256 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class NewAdminIDList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'admin_ids': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'admin_ids': 'admin_ids', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """NewAdminIDList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - admin_ids ([str]): The IDs of admins to set for the group if converting to a team. Required when converting from Group to Team.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """NewAdminIDList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - admin_ids ([str]): The IDs of admins to set for the group if converting to a team. Required when converting from Group to Team.. [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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.") diff --git a/opal/model/paginated_event_list.py b/opal/model/paginated_event_list.py deleted file mode 100644 index 6b8efa4..0000000 --- a/opal/model/paginated_event_list.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.event import Event - globals()['Event'] = Event - - -class PaginatedEventList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 - 'results': ([Event],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 - 'results': 'results', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaginatedEventList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [optional] # noqa: E501 - results ([Event]): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaginatedEventList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [optional] # noqa: E501 - results ([Event]): [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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.") diff --git a/opal/model/paginated_groups_list.py b/opal/model/paginated_groups_list.py deleted file mode 100644 index 4696af5..0000000 --- a/opal/model/paginated_groups_list.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.group import Group - globals()['Group'] = Group - - -class PaginatedGroupsList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'results': ([Group],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'results': 'results', # noqa: E501 - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, results, *args, **kwargs): # noqa: E501 - """PaginatedGroupsList - a model defined in OpenAPI - - Args: - results ([Group]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.results = results - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, results, *args, **kwargs): # noqa: E501 - """PaginatedGroupsList - a model defined in OpenAPI - - Args: - results ([Group]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.results = results - 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: - # 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.") diff --git a/opal/model/paginated_resource_user_list.py b/opal/model/paginated_resource_user_list.py deleted file mode 100644 index 57caef8..0000000 --- a/opal/model/paginated_resource_user_list.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.resource_user import ResourceUser - globals()['ResourceUser'] = ResourceUser - - -class PaginatedResourceUserList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 - 'results': ([ResourceUser],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 - 'results': 'results', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PaginatedResourceUserList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [optional] # noqa: E501 - results ([ResourceUser]): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """PaginatedResourceUserList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [optional] # noqa: E501 - results ([ResourceUser]): [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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.") diff --git a/opal/model/paginated_resources_list.py b/opal/model/paginated_resources_list.py deleted file mode 100644 index 5cc1848..0000000 --- a/opal/model/paginated_resources_list.py +++ /dev/null @@ -1,276 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.resource import Resource - globals()['Resource'] = Resource - - -class PaginatedResourcesList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'results': ([Resource],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'results': 'results', # noqa: E501 - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, results, *args, **kwargs): # noqa: E501 - """PaginatedResourcesList - a model defined in OpenAPI - - Args: - results ([Resource]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.results = results - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, results, *args, **kwargs): # noqa: E501 - """PaginatedResourcesList - a model defined in OpenAPI - - Args: - results ([Resource]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.results = results - 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: - # 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.") diff --git a/opal/model/resource.py b/opal/model/resource.py deleted file mode 100644 index 4d87c13..0000000 --- a/opal/model/resource.py +++ /dev/null @@ -1,306 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.resource_type_enum import ResourceTypeEnum - from opal.model.visibility_enum import VisibilityEnum - globals()['ResourceTypeEnum'] = ResourceTypeEnum - globals()['VisibilityEnum'] = VisibilityEnum - - -class Resource(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'resource_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'owner_team_id': (str,), # noqa: E501 - 'visibility': (VisibilityEnum,), # noqa: E501 - 'resource_type': (ResourceTypeEnum,), # 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 = { - 'resource_id': 'resource_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'description': 'description', # noqa: E501 - 'owner_team_id': 'owner_team_id', # noqa: E501 - 'visibility': 'visibility', # noqa: E501 - 'resource_type': 'resource_type', # 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 = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, resource_id, *args, **kwargs): # noqa: E501 - """Resource - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the resource.. [optional] # noqa: E501 - description (str): A description of the resource.. [optional] # noqa: E501 - owner_team_id (str): The ID of the owning team of the resource.. [optional] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - resource_type (ResourceTypeEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the resource can be requested for (in minutes).. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the resource require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the resource require a support ticket.. [optional] # noqa: E501 - folder_id (str): The ID of the folder that the resource 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, resource_id, *args, **kwargs): # noqa: E501 - """Resource - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the resource.. [optional] # noqa: E501 - description (str): A description of the resource.. [optional] # noqa: E501 - owner_team_id (str): The ID of the owning team of the resource.. [optional] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - resource_type (ResourceTypeEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the resource can be requested for (in minutes).. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the resource require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the resource require a support ticket.. [optional] # noqa: E501 - folder_id (str): The ID of the folder that the resource 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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_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: - # 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.") diff --git a/opal/model/resource_access_level.py b/opal/model/resource_access_level.py deleted file mode 100644 index 3aab599..0000000 --- a/opal/model/resource_access_level.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class ResourceAccessLevel(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'access_level_name': (str,), # noqa: E501 - 'access_level_remote_id': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'access_level_name': 'access_level_name', # noqa: E501 - 'access_level_remote_id': 'access_level_remote_id', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, access_level_name, access_level_remote_id, *args, **kwargs): # noqa: E501 - """ResourceAccessLevel - a model defined in OpenAPI - - Args: - 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.access_level_name = access_level_name - self.access_level_remote_id = access_level_remote_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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, access_level_name, access_level_remote_id, *args, **kwargs): # noqa: E501 - """ResourceAccessLevel - a model defined in OpenAPI - - Args: - 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.access_level_name = access_level_name - self.access_level_remote_id = access_level_remote_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: - # 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.") diff --git a/opal/model/resource_type_enum.py b/opal/model/resource_type_enum.py deleted file mode 100644 index 1b0e49c..0000000 --- a/opal/model/resource_type_enum.py +++ /dev/null @@ -1,308 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class ResourceTypeEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - '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", - '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", - '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", - '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", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """ResourceTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (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", ] # noqa: E501 - - Keyword Args: - 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", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ResourceTypeEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (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", ] # noqa: E501 - - Keyword Args: - 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", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model/resource_user.py b/opal/model/resource_user.py deleted file mode 100644 index dda59e8..0000000 --- a/opal/model/resource_user.py +++ /dev/null @@ -1,298 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.resource_access_level import ResourceAccessLevel - globals()['ResourceAccessLevel'] = ResourceAccessLevel - - -class ResourceUser(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'resource_id': (str,), # noqa: E501 - 'user_id': (str,), # noqa: E501 - 'access_level': (ResourceAccessLevel,), # noqa: E501 - 'full_name': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'expiration_date': (datetime, none_type,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'resource_id': 'resource_id', # noqa: E501 - 'user_id': 'user_id', # noqa: E501 - 'access_level': 'access_level', # noqa: E501 - 'full_name': 'full_name', # noqa: E501 - 'email': 'email', # noqa: E501 - 'expiration_date': 'expiration_date', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, resource_id, user_id, access_level, full_name, email, expiration_date, *args, **kwargs): # noqa: E501 - """ResourceUser - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - user_id (str): The ID of the user. - access_level (ResourceAccessLevel): - 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_id - self.user_id = user_id - self.access_level = access_level - self.full_name = full_name - self.email = email - self.expiration_date = expiration_date - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, resource_id, user_id, access_level, full_name, email, expiration_date, *args, **kwargs): # noqa: E501 - """ResourceUser - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - user_id (str): The ID of the user. - access_level (ResourceAccessLevel): - 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. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_id - self.user_id = user_id - self.access_level = access_level - self.full_name = full_name - self.email = email - self.expiration_date = expiration_date - 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: - # 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.") diff --git a/opal/model/resource_user_access_status.py b/opal/model/resource_user_access_status.py deleted file mode 100644 index f734f35..0000000 --- a/opal/model/resource_user_access_status.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.resource_access_level import ResourceAccessLevel - from opal.model.resource_user_access_status_enum import ResourceUserAccessStatusEnum - globals()['ResourceAccessLevel'] = ResourceAccessLevel - globals()['ResourceUserAccessStatusEnum'] = ResourceUserAccessStatusEnum - - -class ResourceUserAccessStatus(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'resource_id': (str,), # noqa: E501 - 'user_id': (str,), # noqa: E501 - 'status': (ResourceUserAccessStatusEnum,), # noqa: E501 - 'expiration_date': (datetime, none_type,), # noqa: E501 - 'access_level': (ResourceAccessLevel,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'resource_id': 'resource_id', # noqa: E501 - 'user_id': 'user_id', # noqa: E501 - 'status': 'status', # noqa: E501 - 'expiration_date': 'expiration_date', # noqa: E501 - 'access_level': 'access_level', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, resource_id, user_id, status, expiration_date, *args, **kwargs): # noqa: E501 - """ResourceUserAccessStatus - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - user_id (str): The ID of the user. - status (ResourceUserAccessStatusEnum): - expiration_date (datetime, none_type): The day and time the user's access will expire. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_level (ResourceAccessLevel): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_id - self.user_id = user_id - self.status = status - self.expiration_date = expiration_date - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, resource_id, user_id, status, expiration_date, *args, **kwargs): # noqa: E501 - """ResourceUserAccessStatus - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - user_id (str): The ID of the user. - status (ResourceUserAccessStatusEnum): - expiration_date (datetime, none_type): The day and time the user's access will expire. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - access_level (ResourceAccessLevel): [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_id - self.user_id = user_id - self.status = status - self.expiration_date = expiration_date - 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: - # 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.") diff --git a/opal/model/resource_user_access_status_enum.py b/opal/model/resource_user_access_status_enum.py deleted file mode 100644 index b0cd46c..0000000 --- a/opal/model/resource_user_access_status_enum.py +++ /dev/null @@ -1,284 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class ResourceUserAccessStatusEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'UNAUTHORIZED': "UNAUTHORIZED", - 'REQUESTED': "REQUESTED", - 'AUTHORIZED': "AUTHORIZED", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """ResourceUserAccessStatusEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The status of the user's access to the resource.., must be one of ["UNAUTHORIZED", "REQUESTED", "AUTHORIZED", ] # noqa: E501 - - Keyword Args: - value (str): The status of the user's access to the resource.., must be one of ["UNAUTHORIZED", "REQUESTED", "AUTHORIZED", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """ResourceUserAccessStatusEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The status of the user's access to the resource.., must be one of ["UNAUTHORIZED", "REQUESTED", "AUTHORIZED", ] # noqa: E501 - - Keyword Args: - value (str): The status of the user's access to the resource.., must be one of ["UNAUTHORIZED", "REQUESTED", "AUTHORIZED", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model/reviewer_id_list.py b/opal/model/reviewer_id_list.py deleted file mode 100644 index b0f21fe..0000000 --- a/opal/model/reviewer_id_list.py +++ /dev/null @@ -1,262 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class ReviewerIDList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'reviewer_ids': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'reviewer_ids': 'reviewer_ids', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, reviewer_ids, *args, **kwargs): # noqa: E501 - """ReviewerIDList - a model defined in OpenAPI - - Args: - reviewer_ids ([str]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.reviewer_ids = reviewer_ids - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, reviewer_ids, *args, **kwargs): # noqa: E501 - """ReviewerIDList - a model defined in OpenAPI - - Args: - reviewer_ids ([str]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.reviewer_ids = reviewer_ids - 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: - # 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.") diff --git a/opal/model/session.py b/opal/model/session.py deleted file mode 100644 index 9f116d4..0000000 --- a/opal/model/session.py +++ /dev/null @@ -1,292 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.resource_access_level import ResourceAccessLevel - globals()['ResourceAccessLevel'] = ResourceAccessLevel - - -class Session(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'connection_id': (str,), # noqa: E501 - 'user_id': (str,), # noqa: E501 - 'resource_id': (str,), # noqa: E501 - 'access_level': (ResourceAccessLevel,), # noqa: E501 - 'expiration_date': (datetime,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'connection_id': 'connection_id', # noqa: E501 - 'user_id': 'user_id', # noqa: E501 - 'resource_id': 'resource_id', # noqa: E501 - 'access_level': 'access_level', # noqa: E501 - 'expiration_date': 'expiration_date', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, connection_id, user_id, resource_id, access_level, expiration_date, *args, **kwargs): # noqa: E501 - """Session - a model defined in OpenAPI - - Args: - connection_id (str): The ID of the connection. - user_id (str): The ID of the user. - resource_id (str): The ID of the resource. - access_level (ResourceAccessLevel): - expiration_date (datetime): The day and time the user's access will expire. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.connection_id = connection_id - self.user_id = user_id - self.resource_id = resource_id - self.access_level = access_level - self.expiration_date = expiration_date - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, connection_id, user_id, resource_id, access_level, expiration_date, *args, **kwargs): # noqa: E501 - """Session - a model defined in OpenAPI - - Args: - connection_id (str): The ID of the connection. - user_id (str): The ID of the user. - resource_id (str): The ID of the resource. - access_level (ResourceAccessLevel): - expiration_date (datetime): The day and time the user's access will expire. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.connection_id = connection_id - self.user_id = user_id - self.resource_id = resource_id - self.access_level = access_level - self.expiration_date = expiration_date - 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: - # 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.") diff --git a/opal/model/sessions_list.py b/opal/model/sessions_list.py deleted file mode 100644 index e4177d5..0000000 --- a/opal/model/sessions_list.py +++ /dev/null @@ -1,270 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.session import Session - globals()['Session'] = Session - - -class SessionsList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 - 'results': ([Session],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 - 'results': 'results', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """SessionsList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [optional] # noqa: E501 - results ([Session]): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """SessionsList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - next (str, none_type): The cursor with which to continue pagination if additional result pages exist.. [optional] # noqa: E501 - previous (str, none_type): The cursor used to obtain the current result page.. [optional] # noqa: E501 - results ([Session]): [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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.") diff --git a/opal/model/tag.py b/opal/model/tag.py deleted file mode 100644 index c650b52..0000000 --- a/opal/model/tag.py +++ /dev/null @@ -1,286 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class Tag(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'tag_id': (str,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'updated_at': (datetime,), # noqa: E501 - 'user_creator_id': (str,), # noqa: E501 - 'owner_team_id': (str,), # noqa: E501 - 'key': (str,), # noqa: E501 - 'value': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'tag_id': 'tag_id', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'updated_at': 'updated_at', # noqa: E501 - 'user_creator_id': 'user_creator_id', # noqa: E501 - 'owner_team_id': 'owner_team_id', # noqa: E501 - 'key': 'key', # noqa: E501 - 'value': 'value', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, tag_id, *args, **kwargs): # noqa: E501 - """Tag - a model defined in OpenAPI - - Args: - tag_id (str): The ID of the tag. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - created_at (datetime): The date the tag was created.. [optional] # noqa: E501 - updated_at (datetime): The date the tag was last updated.. [optional] # noqa: E501 - user_creator_id (str): The ID of the user that created the tag.. [optional] # noqa: E501 - owner_team_id (str): The ID of the team that owns the tag.. [optional] # noqa: E501 - key (str): The key of the tag.. [optional] # noqa: E501 - value (str): The value of the tag.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.tag_id = tag_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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, tag_id, *args, **kwargs): # noqa: E501 - """Tag - a model defined in OpenAPI - - Args: - tag_id (str): The ID of the tag. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - created_at (datetime): The date the tag was created.. [optional] # noqa: E501 - updated_at (datetime): The date the tag was last updated.. [optional] # noqa: E501 - user_creator_id (str): The ID of the user that created the tag.. [optional] # noqa: E501 - owner_team_id (str): The ID of the team that owns the tag.. [optional] # noqa: E501 - key (str): The key of the tag.. [optional] # noqa: E501 - value (str): The value of the tag.. [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.tag_id = tag_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: - # 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.") diff --git a/opal/model/tags_list.py b/opal/model/tags_list.py deleted file mode 100644 index c36168e..0000000 --- a/opal/model/tags_list.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.tag import Tag - globals()['Tag'] = Tag - - -class TagsList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'tags': ([Tag],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'tags': 'tags', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, tags, *args, **kwargs): # noqa: E501 - """TagsList - a model defined in OpenAPI - - Args: - tags ([Tag]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.tags = tags - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, tags, *args, **kwargs): # noqa: E501 - """TagsList - a model defined in OpenAPI - - Args: - tags ([Tag]): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.tags = tags - 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: - # 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.") diff --git a/opal/model/update_group_info.py b/opal/model/update_group_info.py deleted file mode 100644 index f062785..0000000 --- a/opal/model/update_group_info.py +++ /dev/null @@ -1,300 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.visibility_enum import VisibilityEnum - globals()['VisibilityEnum'] = VisibilityEnum - - -class UpdateGroupInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'group_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'owner_team_id': (str,), # 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 - '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 = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, group_id, *args, **kwargs): # noqa: E501 - """UpdateGroupInfo - a model defined in OpenAPI - - Args: - group_id (str): The ID of the group. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the group.. [optional] # noqa: E501 - description (str): A description of the group.. [optional] # noqa: E501 - 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] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the group can be requested for (in minutes). Use 0 to set to indefinite.. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the group require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the group require a support ticket.. [optional] # 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, group_id, *args, **kwargs): # noqa: E501 - """UpdateGroupInfo - a model defined in OpenAPI - - Args: - group_id (str): The ID of the group. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the group.. [optional] # noqa: E501 - description (str): A description of the group.. [optional] # noqa: E501 - 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] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the group can be requested for (in minutes). Use 0 to set to indefinite.. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the group require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the group require a support ticket.. [optional] # 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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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.") diff --git a/opal/model/update_group_info_list.py b/opal/model/update_group_info_list.py deleted file mode 100644 index 40471d7..0000000 --- a/opal/model/update_group_info_list.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.update_group_info import UpdateGroupInfo - globals()['UpdateGroupInfo'] = UpdateGroupInfo - - -class UpdateGroupInfoList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'groups': ([UpdateGroupInfo],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'groups': 'groups', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, groups, *args, **kwargs): # noqa: E501 - """UpdateGroupInfoList - a model defined in OpenAPI - - Args: - groups ([UpdateGroupInfo]): A list of groups with information to update. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.groups = groups - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, groups, *args, **kwargs): # noqa: E501 - """UpdateGroupInfoList - a model defined in OpenAPI - - Args: - groups ([UpdateGroupInfo]): A list of groups with information to update. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.groups = groups - 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: - # 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.") diff --git a/opal/model/update_resource_info.py b/opal/model/update_resource_info.py deleted file mode 100644 index 6fc76dd..0000000 --- a/opal/model/update_resource_info.py +++ /dev/null @@ -1,300 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.visibility_enum import VisibilityEnum - globals()['VisibilityEnum'] = VisibilityEnum - - -class UpdateResourceInfo(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'resource_id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'owner_team_id': (str,), # 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 = { - 'resource_id': 'resource_id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'description': 'description', # noqa: E501 - 'owner_team_id': 'owner_team_id', # 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 = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, resource_id, *args, **kwargs): # noqa: E501 - """UpdateResourceInfo - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the resource.. [optional] # noqa: E501 - description (str): A description of the resource.. [optional] # noqa: E501 - owner_team_id (str): The ID of the owning team of the resource.. [optional] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the resource can be requested for (in minutes). Use 0 to set to indefinite.. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the resource require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the resource require a support ticket.. [optional] # noqa: E501 - folder_id (str): The ID of the folder that the resource 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, resource_id, *args, **kwargs): # noqa: E501 - """UpdateResourceInfo - a model defined in OpenAPI - - Args: - resource_id (str): The ID of the resource. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - name (str): The name of the resource.. [optional] # noqa: E501 - description (str): A description of the resource.. [optional] # noqa: E501 - owner_team_id (str): The ID of the owning team of the resource.. [optional] # noqa: E501 - visibility (VisibilityEnum): [optional] # noqa: E501 - max_duration (int): The maximum duration access to the resource can be requested for (in minutes). Use 0 to set to indefinite.. [optional] # noqa: E501 - require_manager_approval (bool): A bool representing whether or not access requests to the resource require manager approval.. [optional] # noqa: E501 - require_support_ticket (bool): A bool representing whether or not access requests to the resource require a support ticket.. [optional] # noqa: E501 - folder_id (str): The ID of the folder that the resource 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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resource_id = resource_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: - # 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.") diff --git a/opal/model/update_resource_info_list.py b/opal/model/update_resource_info_list.py deleted file mode 100644 index 0c7d802..0000000 --- a/opal/model/update_resource_info_list.py +++ /dev/null @@ -1,268 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.update_resource_info import UpdateResourceInfo - globals()['UpdateResourceInfo'] = UpdateResourceInfo - - -class UpdateResourceInfoList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'resources': ([UpdateResourceInfo],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'resources': 'resources', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, resources, *args, **kwargs): # noqa: E501 - """UpdateResourceInfoList - a model defined in OpenAPI - - Args: - resources ([UpdateResourceInfo]): A list of resources with information to update. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resources = resources - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, resources, *args, **kwargs): # noqa: E501 - """UpdateResourceInfoList - a model defined in OpenAPI - - Args: - resources ([UpdateResourceInfo]): A list of resources with information to update. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.resources = resources - 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: - # 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.") diff --git a/opal/model/user.py b/opal/model/user.py deleted file mode 100644 index 36a4b51..0000000 --- a/opal/model/user.py +++ /dev/null @@ -1,286 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class User(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'user_id': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'full_name': (str,), # noqa: E501 - 'team_id': (str, none_type,), # noqa: E501 - 'position': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'user_id': 'user_id', # noqa: E501 - 'email': 'email', # noqa: E501 - 'full_name': 'full_name', # noqa: E501 - 'team_id': 'team_id', # noqa: E501 - 'position': 'position', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, user_id, email, full_name, team_id, position, *args, **kwargs): # noqa: E501 - """User - a model defined in OpenAPI - - Args: - 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. - position (str): The user's position. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.user_id = user_id - self.email = email - self.full_name = full_name - self.team_id = team_id - self.position = position - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, user_id, email, full_name, team_id, position, *args, **kwargs): # noqa: E501 - """User - a model defined in OpenAPI - - Args: - 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. - position (str): The user's position. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.user_id = user_id - self.email = email - self.full_name = full_name - self.team_id = team_id - self.position = position - 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: - # 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.") diff --git a/opal/model/users_list.py b/opal/model/users_list.py deleted file mode 100644 index df76e4a..0000000 --- a/opal/model/users_list.py +++ /dev/null @@ -1,262 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - -def lazy_import(): - from opal.model.user import User - globals()['User'] = User - - -class UsersList(ModelNormal): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - } - - validations = { - } - - @cached_property - def additional_properties_type(): - """ - This must be a method because a model may have properties that are - 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 - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - 'results': ([User],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'results': 'results', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UsersList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - results ([User]): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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', - ]) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs): # noqa: E501 - """UsersList - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - results ([User]): [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', ()) - - if args: - raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - 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: - # 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.") diff --git a/opal/model/visibility_enum.py b/opal/model/visibility_enum.py deleted file mode 100644 index 7636d35..0000000 --- a/opal/model/visibility_enum.py +++ /dev/null @@ -1,283 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from opal.model_utils import ( # noqa: F401 - ApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, - OpenApiModel -) -from opal.exceptions import ApiAttributeError - - - -class VisibilityEnum(ModelSimple): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - allowed_values = { - ('value',): { - 'GLOBAL': "GLOBAL", - 'TEAM': "TEAM", - }, - } - - validations = { - } - - additional_properties_type = None - - _nullable = False - - @cached_property - def openapi_types(): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - 'value': (str,), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - read_only_vars = set() - - _composed_schemas = None - - 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, *args, **kwargs): - """VisibilityEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The visibility level of the entity.., must be one of ["GLOBAL", "TEAM", ] # noqa: E501 - - Keyword Args: - value (str): The visibility level of the entity.., must be one of ["GLOBAL", "TEAM", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): - """VisibilityEnum - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] (str): The visibility level of the entity.., must be one of ["GLOBAL", "TEAM", ] # noqa: E501 - - Keyword Args: - value (str): The visibility level of the entity.., must be one of ["GLOBAL", "TEAM", ] # noqa: E501 - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _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) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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." % ( - args, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - return self diff --git a/opal/model_utils.py b/opal/model_utils.py deleted file mode 100644 index 18588c3..0000000 --- a/opal/model_utils.py +++ /dev/null @@ -1,2038 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile - -from dateutil.parser import parse - -from opal.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.__getitem__(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return new_cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst - - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - 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 variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) - return results_classes - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - 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 variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - 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 variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - 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 variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if configuration: - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) - if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res - elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - result[attr] = value.value - elif hasattr(value, '_data_store'): - result[attr] = model_to_dict(value, serialize=serialize) - else: - result[attr] = value - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + composed_instances - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/opal/models/__init__.py b/opal/models/__init__.py deleted file mode 100644 index 83a71c3..0000000 --- a/opal/models/__init__.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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 models into model package -from opal.models.access import Access -from opal.models.access_list import AccessList -from opal.models.add_group_resource_request import AddGroupResourceRequest -from opal.models.add_group_user_request import AddGroupUserRequest -from opal.models.add_resource_nhi_request import AddResourceNhiRequest -from opal.models.add_resource_user_request import AddResourceUserRequest -from opal.models.app import App -from opal.models.app_type_enum import AppTypeEnum -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_request200_response import CreateRequest200Response -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList -from opal.models.create_request_info import CreateRequestInfo -from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner -from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner -from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner -from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket -from opal.models.create_resource_info import CreateResourceInfo -from opal.models.create_tag_info import CreateTagInfo -from opal.models.create_uar_info import CreateUARInfo -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.idp_group_mapping import IdpGroupMapping -from opal.models.idp_group_mapping_list import IdpGroupMappingList -from opal.models.message_channel import MessageChannel -from opal.models.message_channel_id_list import MessageChannelIDList -from opal.models.message_channel_list import MessageChannelList -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_nhi import ResourceNHI -from opal.models.resource_remote_info import ResourceRemoteInfo -from opal.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount -from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance -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_service_account import ResourceRemoteInfoGcpServiceAccount -from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance -from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo -from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject -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.risk_sensitivity_enum import RiskSensitivityEnum -from opal.models.session import Session -from opal.models.sessions_list import SessionsList -from opal.models.sub_event import SubEvent -from opal.models.tag import Tag -from opal.models.tag_filter import TagFilter -from opal.models.tags_list import TagsList -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration -from opal.models.ticketing_provider_enum import TicketingProviderEnum -from opal.models.uar import UAR -from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum -from opal.models.uar_scope import UARScope -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_idp_group_mappings_request import UpdateIdpGroupMappingsRequest -from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner -from opal.models.update_owner_info import UpdateOwnerInfo -from opal.models.update_owner_info_list import UpdateOwnerInfoList -from opal.models.update_resource_info import UpdateResourceInfo -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_security/__init__.py b/opal_security/__init__.py new file mode 100644 index 0000000..561cc0b --- /dev/null +++ b/opal_security/__init__.py @@ -0,0 +1,198 @@ +# 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 + + +__version__ = "1.0.0" + +# import apis into sdk package +from opal_security.api.apps_api import AppsApi +from opal_security.api.configuration_templates_api import ConfigurationTemplatesApi +from opal_security.api.events_api import EventsApi +from opal_security.api.group_bindings_api import GroupBindingsApi +from opal_security.api.groups_api import GroupsApi +from opal_security.api.idp_group_mappings_api import IdpGroupMappingsApi +from opal_security.api.message_channels_api import MessageChannelsApi +from opal_security.api.non_human_identities_api import NonHumanIdentitiesApi +from opal_security.api.on_call_schedules_api import OnCallSchedulesApi +from opal_security.api.owners_api import OwnersApi +from opal_security.api.requests_api import RequestsApi +from opal_security.api.resources_api import ResourcesApi +from opal_security.api.sessions_api import SessionsApi +from opal_security.api.tags_api import TagsApi +from opal_security.api.uars_api import UarsApi +from opal_security.api.users_api import UsersApi + +# import ApiClient +from opal_security.api_response import ApiResponse +from opal_security.api_client import ApiClient +from opal_security.configuration import Configuration +from opal_security.exceptions import OpenApiException +from opal_security.exceptions import ApiTypeError +from opal_security.exceptions import ApiValueError +from opal_security.exceptions import ApiKeyError +from opal_security.exceptions import ApiAttributeError +from opal_security.exceptions import ApiException + +# import models into sdk package +from opal_security.models.access import Access +from opal_security.models.access_list import AccessList +from opal_security.models.add_group_resource_request import AddGroupResourceRequest +from opal_security.models.add_group_user_request import AddGroupUserRequest +from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest +from opal_security.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.app import App +from opal_security.models.app_type_enum import AppTypeEnum +from opal_security.models.apps_list import AppsList +from opal_security.models.aws_permission_set_metadata import AwsPermissionSetMetadata +from opal_security.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet +from opal_security.models.condition import Condition +from opal_security.models.configuration_template import ConfigurationTemplate +from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo +from opal_security.models.create_group_binding_info import CreateGroupBindingInfo +from opal_security.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner +from opal_security.models.create_group_info import CreateGroupInfo +from opal_security.models.create_message_channel_info import CreateMessageChannelInfo +from opal_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo +from opal_security.models.create_owner_info import CreateOwnerInfo +from opal_security.models.create_request200_response import CreateRequest200Response +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.create_request_info import CreateRequestInfo +from opal_security.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal_security.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal_security.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal_security.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket +from opal_security.models.create_resource_info import CreateResourceInfo +from opal_security.models.create_tag_info import CreateTagInfo +from opal_security.models.create_uar_info import CreateUARInfo +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.event import Event +from opal_security.models.group import Group +from opal_security.models.group_access_level import GroupAccessLevel +from opal_security.models.group_binding import GroupBinding +from opal_security.models.group_binding_group import GroupBindingGroup +from opal_security.models.group_remote_info import GroupRemoteInfo +from opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group +from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup +from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam +from opal_security.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup +from opal_security.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup +from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup +from opal_security.models.group_resource import GroupResource +from opal_security.models.group_resource_list import GroupResourceList +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.group_user import GroupUser +from opal_security.models.group_user_list import GroupUserList +from opal_security.models.idp_group_mapping import IdpGroupMapping +from opal_security.models.idp_group_mapping_list import IdpGroupMappingList +from opal_security.models.message_channel import MessageChannel +from opal_security.models.message_channel_id_list import MessageChannelIDList +from opal_security.models.message_channel_list import MessageChannelList +from opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum +from opal_security.models.on_call_schedule import OnCallSchedule +from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList +from opal_security.models.on_call_schedule_list import OnCallScheduleList +from opal_security.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum +from opal_security.models.owner import Owner +from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList +from opal_security.models.paginated_event_list import PaginatedEventList +from opal_security.models.paginated_group_bindings_list import PaginatedGroupBindingsList +from opal_security.models.paginated_groups_list import PaginatedGroupsList +from opal_security.models.paginated_owners_list import PaginatedOwnersList +from opal_security.models.paginated_resources_list import PaginatedResourcesList +from opal_security.models.paginated_tags_list import PaginatedTagsList +from opal_security.models.paginated_uars_list import PaginatedUARsList +from opal_security.models.paginated_users_list import PaginatedUsersList +from opal_security.models.request import Request +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.request_custom_field_response import RequestCustomFieldResponse +from opal_security.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue +from opal_security.models.request_list import RequestList +from opal_security.models.request_status_enum import RequestStatusEnum +from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum +from opal_security.models.requested_item import RequestedItem +from opal_security.models.resource import Resource +from opal_security.models.resource_access_level import ResourceAccessLevel +from opal_security.models.resource_access_user import ResourceAccessUser +from opal_security.models.resource_access_user_list import ResourceAccessUserList +from opal_security.models.resource_nhi import ResourceNHI +from opal_security.models.resource_remote_info import ResourceRemoteInfo +from opal_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount +from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance +from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster +from opal_security.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole +from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet +from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset +from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket +from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance +from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder +from opal_security.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster +from opal_security.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization +from opal_security.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal_security.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount +from opal_security.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance +from opal_security.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo +from opal_security.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject +from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp +from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole +from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet +from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile +from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.models.resource_user import ResourceUser +from opal_security.models.resource_user_access_status import ResourceUserAccessStatus +from opal_security.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum +from opal_security.models.resource_with_access_level import ResourceWithAccessLevel +from opal_security.models.reviewer_id_list import ReviewerIDList +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage_list import ReviewerStageList +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.session import Session +from opal_security.models.sessions_list import SessionsList +from opal_security.models.sub_event import SubEvent +from opal_security.models.tag import Tag +from opal_security.models.tag_filter import TagFilter +from opal_security.models.tags_list import TagsList +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.ticketing_provider_enum import TicketingProviderEnum +from opal_security.models.uar import UAR +from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum +from opal_security.models.uar_scope import UARScope +from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo +from opal_security.models.update_group_binding_info import UpdateGroupBindingInfo +from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList +from opal_security.models.update_group_info import UpdateGroupInfo +from opal_security.models.update_group_info_list import UpdateGroupInfoList +from opal_security.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal_security.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner +from opal_security.models.update_owner_info import UpdateOwnerInfo +from opal_security.models.update_owner_info_list import UpdateOwnerInfoList +from opal_security.models.update_resource_info import UpdateResourceInfo +from opal_security.models.update_resource_info_list import UpdateResourceInfoList +from opal_security.models.user import User +from opal_security.models.user_hr_idp_status_enum import UserHrIdpStatusEnum +from opal_security.models.user_id_list import UserIDList +from opal_security.models.user_list import UserList +from opal_security.models.visibility_info import VisibilityInfo +from opal_security.models.visibility_type_enum import VisibilityTypeEnum diff --git a/opal_security/api/__init__.py b/opal_security/api/__init__.py new file mode 100644 index 0000000..c3fde7c --- /dev/null +++ b/opal_security/api/__init__.py @@ -0,0 +1,20 @@ +# flake8: noqa + +# import apis into api package +from opal_security.api.apps_api import AppsApi +from opal_security.api.configuration_templates_api import ConfigurationTemplatesApi +from opal_security.api.events_api import EventsApi +from opal_security.api.group_bindings_api import GroupBindingsApi +from opal_security.api.groups_api import GroupsApi +from opal_security.api.idp_group_mappings_api import IdpGroupMappingsApi +from opal_security.api.message_channels_api import MessageChannelsApi +from opal_security.api.non_human_identities_api import NonHumanIdentitiesApi +from opal_security.api.on_call_schedules_api import OnCallSchedulesApi +from opal_security.api.owners_api import OwnersApi +from opal_security.api.requests_api import RequestsApi +from opal_security.api.resources_api import ResourcesApi +from opal_security.api.sessions_api import SessionsApi +from opal_security.api.tags_api import TagsApi +from opal_security.api.uars_api import UarsApi +from opal_security.api.users_api import UsersApi + diff --git a/opal/api/apps_api.py b/opal_security/api/apps_api.py similarity index 98% rename from opal/api/apps_api.py rename to opal_security/api/apps_api.py index 0f37b17..f484c8d 100644 --- a/opal/api/apps_api.py +++ b/opal_security/api/apps_api.py @@ -20,13 +20,13 @@ 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_security.models.app import App +from opal_security.models.app_type_enum import AppTypeEnum +from opal_security.models.apps_list import AppsList -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class AppsApi: diff --git a/opal/api/configuration_templates_api.py b/opal_security/api/configuration_templates_api.py similarity index 98% rename from opal/api/configuration_templates_api.py rename to opal_security/api/configuration_templates_api.py index 08935a6..cfb7059 100644 --- a/opal/api/configuration_templates_api.py +++ b/opal_security/api/configuration_templates_api.py @@ -19,14 +19,14 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated -from opal.models.configuration_template import ConfigurationTemplate -from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo -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 +from opal_security.models.configuration_template import ConfigurationTemplate +from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo +from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList +from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class ConfigurationTemplatesApi: diff --git a/opal/api/events_api.py b/opal_security/api/events_api.py similarity index 98% rename from opal/api/events_api.py rename to opal_security/api/events_api.py index b8c7462..c52b7c3 100644 --- a/opal/api/events_api.py +++ b/opal_security/api/events_api.py @@ -20,11 +20,11 @@ from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated -from opal.models.paginated_event_list import PaginatedEventList +from opal_security.models.paginated_event_list import PaginatedEventList -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class EventsApi: diff --git a/opal/api/group_bindings_api.py b/opal_security/api/group_bindings_api.py similarity index 99% rename from opal/api/group_bindings_api.py rename to opal_security/api/group_bindings_api.py index ada764c..30344aa 100644 --- a/opal/api/group_bindings_api.py +++ b/opal_security/api/group_bindings_api.py @@ -20,14 +20,14 @@ 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 +from opal_security.models.create_group_binding_info import CreateGroupBindingInfo +from opal_security.models.group_binding import GroupBinding +from opal_security.models.paginated_group_bindings_list import PaginatedGroupBindingsList +from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class GroupBindingsApi: diff --git a/opal/api/groups_api.py b/opal_security/api/groups_api.py similarity index 99% rename from opal/api/groups_api.py rename to opal_security/api/groups_api.py index e42cd3f..bd30e66 100644 --- a/opal/api/groups_api.py +++ b/opal_security/api/groups_api.py @@ -20,31 +20,31 @@ 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 +from opal_security.models.add_group_resource_request import AddGroupResourceRequest +from opal_security.models.add_group_user_request import AddGroupUserRequest +from opal_security.models.create_group_info import CreateGroupInfo +from opal_security.models.group import Group +from opal_security.models.group_resource import GroupResource +from opal_security.models.group_resource_list import GroupResourceList +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.group_user import GroupUser +from opal_security.models.group_user_list import GroupUserList +from opal_security.models.message_channel_id_list import MessageChannelIDList +from opal_security.models.message_channel_list import MessageChannelList +from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList +from opal_security.models.on_call_schedule_list import OnCallScheduleList +from opal_security.models.paginated_groups_list import PaginatedGroupsList +from opal_security.models.reviewer_id_list import ReviewerIDList +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage_list import ReviewerStageList +from opal_security.models.tags_list import TagsList +from opal_security.models.update_group_info_list import UpdateGroupInfoList +from opal_security.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal_security.models.visibility_info import VisibilityInfo + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class GroupsApi: diff --git a/opal/api/idp_group_mappings_api.py b/opal_security/api/idp_group_mappings_api.py similarity index 99% rename from opal/api/idp_group_mappings_api.py rename to opal_security/api/idp_group_mappings_api.py index fa2e326..c9fc194 100644 --- a/opal/api/idp_group_mappings_api.py +++ b/opal_security/api/idp_group_mappings_api.py @@ -19,12 +19,12 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated -from opal.models.idp_group_mapping_list import IdpGroupMappingList -from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal_security.models.idp_group_mapping_list import IdpGroupMappingList +from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class IdpGroupMappingsApi: diff --git a/opal/api/message_channels_api.py b/opal_security/api/message_channels_api.py similarity index 98% rename from opal/api/message_channels_api.py rename to opal_security/api/message_channels_api.py index 9b6f103..9e7b1f5 100644 --- a/opal/api/message_channels_api.py +++ b/opal_security/api/message_channels_api.py @@ -19,13 +19,13 @@ 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_security.models.create_message_channel_info import CreateMessageChannelInfo +from opal_security.models.message_channel import MessageChannel +from opal_security.models.message_channel_list import MessageChannelList -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class MessageChannelsApi: diff --git a/opal/api/non_human_identities_api.py b/opal_security/api/non_human_identities_api.py similarity index 98% rename from opal/api/non_human_identities_api.py rename to opal_security/api/non_human_identities_api.py index cb810ea..05f9035 100644 --- a/opal/api/non_human_identities_api.py +++ b/opal_security/api/non_human_identities_api.py @@ -20,11 +20,11 @@ from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated -from opal.models.paginated_resources_list import PaginatedResourcesList +from opal_security.models.paginated_resources_list import PaginatedResourcesList -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class NonHumanIdentitiesApi: diff --git a/opal/api/on_call_schedules_api.py b/opal_security/api/on_call_schedules_api.py similarity index 98% rename from opal/api/on_call_schedules_api.py rename to opal_security/api/on_call_schedules_api.py index d2fbcd2..d888402 100644 --- a/opal/api/on_call_schedules_api.py +++ b/opal_security/api/on_call_schedules_api.py @@ -19,13 +19,13 @@ 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_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo +from opal_security.models.on_call_schedule import OnCallSchedule +from opal_security.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 +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class OnCallSchedulesApi: diff --git a/opal/api/owners_api.py b/opal_security/api/owners_api.py similarity index 99% rename from opal/api/owners_api.py rename to opal_security/api/owners_api.py index ec975f6..c30b119 100644 --- a/opal/api/owners_api.py +++ b/opal_security/api/owners_api.py @@ -20,16 +20,16 @@ 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 +from opal_security.models.create_owner_info import CreateOwnerInfo +from opal_security.models.owner import Owner +from opal_security.models.paginated_owners_list import PaginatedOwnersList +from opal_security.models.update_owner_info_list import UpdateOwnerInfoList +from opal_security.models.user_id_list import UserIDList +from opal_security.models.user_list import UserList + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class OwnersApi: diff --git a/opal/api/requests_api.py b/opal_security/api/requests_api.py similarity index 98% rename from opal/api/requests_api.py rename to opal_security/api/requests_api.py index 73ccca8..0015d36 100644 --- a/opal/api/requests_api.py +++ b/opal_security/api/requests_api.py @@ -20,13 +20,13 @@ from pydantic import Field, StrictBool, StrictStr from typing import Optional from typing_extensions import Annotated -from opal.models.create_request200_response import CreateRequest200Response -from opal.models.create_request_info import CreateRequestInfo -from opal.models.request_list import RequestList +from opal_security.models.create_request200_response import CreateRequest200Response +from opal_security.models.create_request_info import CreateRequestInfo +from opal_security.models.request_list import RequestList -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class RequestsApi: diff --git a/opal/api/resources_api.py b/opal_security/api/resources_api.py similarity index 99% rename from opal/api/resources_api.py rename to opal_security/api/resources_api.py index a2ac389..e32d729 100644 --- a/opal/api/resources_api.py +++ b/opal_security/api/resources_api.py @@ -20,29 +20,29 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated -from opal.models.access_list import AccessList -from opal.models.add_resource_nhi_request import AddResourceNhiRequest -from opal.models.add_resource_user_request import AddResourceUserRequest -from opal.models.create_resource_info import CreateResourceInfo -from opal.models.message_channel_id_list import MessageChannelIDList -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_nhi import ResourceNHI -from opal.models.resource_type_enum import ResourceTypeEnum -from opal.models.resource_user import ResourceUser -from opal.models.resource_user_access_status import ResourceUserAccessStatus -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 +from opal_security.models.access_list import AccessList +from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest +from opal_security.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.create_resource_info import CreateResourceInfo +from opal_security.models.message_channel_id_list import MessageChannelIDList +from opal_security.models.message_channel_list import MessageChannelList +from opal_security.models.paginated_resources_list import PaginatedResourcesList +from opal_security.models.resource import Resource +from opal_security.models.resource_access_user_list import ResourceAccessUserList +from opal_security.models.resource_nhi import ResourceNHI +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.models.resource_user import ResourceUser +from opal_security.models.resource_user_access_status import ResourceUserAccessStatus +from opal_security.models.reviewer_id_list import ReviewerIDList +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage_list import ReviewerStageList +from opal_security.models.tags_list import TagsList +from opal_security.models.update_resource_info_list import UpdateResourceInfoList +from opal_security.models.visibility_info import VisibilityInfo + +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class ResourcesApi: diff --git a/opal/api/sessions_api.py b/opal_security/api/sessions_api.py similarity index 98% rename from opal/api/sessions_api.py rename to opal_security/api/sessions_api.py index 925b18f..d1c9e79 100644 --- a/opal/api/sessions_api.py +++ b/opal_security/api/sessions_api.py @@ -20,11 +20,11 @@ from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated -from opal.models.sessions_list import SessionsList +from opal_security.models.sessions_list import SessionsList -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class SessionsApi: diff --git a/opal/api/tags_api.py b/opal_security/api/tags_api.py similarity index 99% rename from opal/api/tags_api.py rename to opal_security/api/tags_api.py index 57e8e1c..017b6cc 100644 --- a/opal/api/tags_api.py +++ b/opal_security/api/tags_api.py @@ -20,13 +20,13 @@ 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_security.models.create_tag_info import CreateTagInfo +from opal_security.models.paginated_tags_list import PaginatedTagsList +from opal_security.models.tag import Tag -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class TagsApi: diff --git a/opal/api/uars_api.py b/opal_security/api/uars_api.py similarity index 98% rename from opal/api/uars_api.py rename to opal_security/api/uars_api.py index c862308..390cefb 100644 --- a/opal/api/uars_api.py +++ b/opal_security/api/uars_api.py @@ -20,13 +20,13 @@ 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_security.models.create_uar_info import CreateUARInfo +from opal_security.models.paginated_uars_list import PaginatedUARsList +from opal_security.models.uar import UAR -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class UarsApi: diff --git a/opal/api/users_api.py b/opal_security/api/users_api.py similarity index 99% rename from opal/api/users_api.py rename to opal_security/api/users_api.py index 1f5584f..c47e578 100644 --- a/opal/api/users_api.py +++ b/opal_security/api/users_api.py @@ -20,13 +20,13 @@ 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_security.models.paginated_users_list import PaginatedUsersList +from opal_security.models.tags_list import TagsList +from opal_security.models.user import User -from opal.api_client import ApiClient, RequestSerialized -from opal.api_response import ApiResponse -from opal.rest import RESTResponseType +from opal_security.api_client import ApiClient, RequestSerialized +from opal_security.api_response import ApiResponse +from opal_security.rest import RESTResponseType class UsersApi: diff --git a/opal/api_client.py b/opal_security/api_client.py similarity index 98% rename from opal/api_client.py rename to opal_security/api_client.py index 6ff3a7d..cb37f9d 100644 --- a/opal/api_client.py +++ b/opal_security/api_client.py @@ -27,11 +27,11 @@ from typing import Tuple, Optional, List, Dict, Union from pydantic import SecretStr -from opal.configuration import Configuration -from opal.api_response import ApiResponse, T as ApiResponseT -import opal.models -from opal import rest -from opal.exceptions import ( +from opal_security.configuration import Configuration +from opal_security.api_response import ApiResponse, T as ApiResponseT +import opal_security.models +from opal_security import rest +from opal_security.exceptions import ( ApiValueError, ApiException, BadRequestException, @@ -450,7 +450,7 @@ def __deserialize(self, data, klass): if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: - klass = getattr(opal.models, klass) + klass = getattr(opal_security.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) diff --git a/opal/api_response.py b/opal_security/api_response.py similarity index 100% rename from opal/api_response.py rename to opal_security/api_response.py diff --git a/opal/configuration.py b/opal_security/configuration.py similarity index 99% rename from opal/configuration.py rename to opal_security/configuration.py index 023dad9..abf5661 100644 --- a/opal/configuration.py +++ b/opal_security/configuration.py @@ -231,7 +231,7 @@ def __init__( self.logger = {} """Logging Settings """ - self.logger["package_logger"] = logging.getLogger("opal") + self.logger["package_logger"] = logging.getLogger("opal_security") self.logger["urllib3_logger"] = logging.getLogger("urllib3") self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format diff --git a/opal/exceptions.py b/opal_security/exceptions.py similarity index 100% rename from opal/exceptions.py rename to opal_security/exceptions.py diff --git a/opal_security/models/__init__.py b/opal_security/models/__init__.py new file mode 100644 index 0000000..9ce99fc --- /dev/null +++ b/opal_security/models/__init__.py @@ -0,0 +1,166 @@ +# 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 models into model package +from opal_security.models.access import Access +from opal_security.models.access_list import AccessList +from opal_security.models.add_group_resource_request import AddGroupResourceRequest +from opal_security.models.add_group_user_request import AddGroupUserRequest +from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest +from opal_security.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.app import App +from opal_security.models.app_type_enum import AppTypeEnum +from opal_security.models.apps_list import AppsList +from opal_security.models.aws_permission_set_metadata import AwsPermissionSetMetadata +from opal_security.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet +from opal_security.models.condition import Condition +from opal_security.models.configuration_template import ConfigurationTemplate +from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo +from opal_security.models.create_group_binding_info import CreateGroupBindingInfo +from opal_security.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner +from opal_security.models.create_group_info import CreateGroupInfo +from opal_security.models.create_message_channel_info import CreateMessageChannelInfo +from opal_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo +from opal_security.models.create_owner_info import CreateOwnerInfo +from opal_security.models.create_request200_response import CreateRequest200Response +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.create_request_info import CreateRequestInfo +from opal_security.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal_security.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal_security.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal_security.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket +from opal_security.models.create_resource_info import CreateResourceInfo +from opal_security.models.create_tag_info import CreateTagInfo +from opal_security.models.create_uar_info import CreateUARInfo +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.event import Event +from opal_security.models.group import Group +from opal_security.models.group_access_level import GroupAccessLevel +from opal_security.models.group_binding import GroupBinding +from opal_security.models.group_binding_group import GroupBindingGroup +from opal_security.models.group_remote_info import GroupRemoteInfo +from opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group +from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup +from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam +from opal_security.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup +from opal_security.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup +from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup +from opal_security.models.group_resource import GroupResource +from opal_security.models.group_resource_list import GroupResourceList +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.group_user import GroupUser +from opal_security.models.group_user_list import GroupUserList +from opal_security.models.idp_group_mapping import IdpGroupMapping +from opal_security.models.idp_group_mapping_list import IdpGroupMappingList +from opal_security.models.message_channel import MessageChannel +from opal_security.models.message_channel_id_list import MessageChannelIDList +from opal_security.models.message_channel_list import MessageChannelList +from opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum +from opal_security.models.on_call_schedule import OnCallSchedule +from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList +from opal_security.models.on_call_schedule_list import OnCallScheduleList +from opal_security.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum +from opal_security.models.owner import Owner +from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList +from opal_security.models.paginated_event_list import PaginatedEventList +from opal_security.models.paginated_group_bindings_list import PaginatedGroupBindingsList +from opal_security.models.paginated_groups_list import PaginatedGroupsList +from opal_security.models.paginated_owners_list import PaginatedOwnersList +from opal_security.models.paginated_resources_list import PaginatedResourcesList +from opal_security.models.paginated_tags_list import PaginatedTagsList +from opal_security.models.paginated_uars_list import PaginatedUARsList +from opal_security.models.paginated_users_list import PaginatedUsersList +from opal_security.models.request import Request +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.request_custom_field_response import RequestCustomFieldResponse +from opal_security.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue +from opal_security.models.request_list import RequestList +from opal_security.models.request_status_enum import RequestStatusEnum +from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum +from opal_security.models.requested_item import RequestedItem +from opal_security.models.resource import Resource +from opal_security.models.resource_access_level import ResourceAccessLevel +from opal_security.models.resource_access_user import ResourceAccessUser +from opal_security.models.resource_access_user_list import ResourceAccessUserList +from opal_security.models.resource_nhi import ResourceNHI +from opal_security.models.resource_remote_info import ResourceRemoteInfo +from opal_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount +from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance +from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster +from opal_security.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole +from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet +from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset +from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket +from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance +from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder +from opal_security.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster +from opal_security.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization +from opal_security.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal_security.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount +from opal_security.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance +from opal_security.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo +from opal_security.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject +from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp +from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole +from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet +from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile +from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.models.resource_user import ResourceUser +from opal_security.models.resource_user_access_status import ResourceUserAccessStatus +from opal_security.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum +from opal_security.models.resource_with_access_level import ResourceWithAccessLevel +from opal_security.models.reviewer_id_list import ReviewerIDList +from opal_security.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage_list import ReviewerStageList +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.session import Session +from opal_security.models.sessions_list import SessionsList +from opal_security.models.sub_event import SubEvent +from opal_security.models.tag import Tag +from opal_security.models.tag_filter import TagFilter +from opal_security.models.tags_list import TagsList +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.ticketing_provider_enum import TicketingProviderEnum +from opal_security.models.uar import UAR +from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum +from opal_security.models.uar_scope import UARScope +from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo +from opal_security.models.update_group_binding_info import UpdateGroupBindingInfo +from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList +from opal_security.models.update_group_info import UpdateGroupInfo +from opal_security.models.update_group_info_list import UpdateGroupInfoList +from opal_security.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal_security.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner +from opal_security.models.update_owner_info import UpdateOwnerInfo +from opal_security.models.update_owner_info_list import UpdateOwnerInfoList +from opal_security.models.update_resource_info import UpdateResourceInfo +from opal_security.models.update_resource_info_list import UpdateResourceInfoList +from opal_security.models.user import User +from opal_security.models.user_hr_idp_status_enum import UserHrIdpStatusEnum +from opal_security.models.user_id_list import UserIDList +from opal_security.models.user_list import UserList +from opal_security.models.visibility_info import VisibilityInfo +from opal_security.models.visibility_type_enum import VisibilityTypeEnum diff --git a/opal/models/access.py b/opal_security/models/access.py similarity index 97% rename from opal/models/access.py rename to opal_security/models/access.py index 534cb0b..1acfff2 100644 --- a/opal/models/access.py +++ b/opal_security/models/access.py @@ -21,8 +21,8 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.entity_type_enum import EntityTypeEnum -from opal.models.resource_access_level import ResourceAccessLevel +from opal_security.models.entity_type_enum import EntityTypeEnum +from opal_security.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/access_list.py b/opal_security/models/access_list.py similarity index 98% rename from opal/models/access_list.py rename to opal_security/models/access_list.py index eaca29c..166460b 100644 --- a/opal/models/access_list.py +++ b/opal_security/models/access_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from opal.models.access import Access +from opal_security.models.access import Access from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/add_group_resource_request.py b/opal_security/models/add_group_resource_request.py similarity index 100% rename from opal/models/add_group_resource_request.py rename to opal_security/models/add_group_resource_request.py diff --git a/opal/models/add_group_user_request.py b/opal_security/models/add_group_user_request.py similarity index 100% rename from opal/models/add_group_user_request.py rename to opal_security/models/add_group_user_request.py diff --git a/opal/models/add_resource_nhi_request.py b/opal_security/models/add_resource_nhi_request.py similarity index 100% rename from opal/models/add_resource_nhi_request.py rename to opal_security/models/add_resource_nhi_request.py diff --git a/opal/models/add_resource_user_request.py b/opal_security/models/add_resource_user_request.py similarity index 100% rename from opal/models/add_resource_user_request.py rename to opal_security/models/add_resource_user_request.py diff --git a/opal/models/app.py b/opal_security/models/app.py similarity index 98% rename from opal/models/app.py rename to opal_security/models/app.py index 2c66934..d33becb 100644 --- a/opal/models/app.py +++ b/opal_security/models/app.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from opal.models.app_type_enum import AppTypeEnum +from opal_security.models.app_type_enum import AppTypeEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/app_type_enum.py b/opal_security/models/app_type_enum.py similarity index 100% rename from opal/models/app_type_enum.py rename to opal_security/models/app_type_enum.py diff --git a/opal/models/apps_list.py b/opal_security/models/apps_list.py similarity index 98% rename from opal/models/apps_list.py rename to opal_security/models/apps_list.py index f9a9e6f..21f6a75 100644 --- a/opal/models/apps_list.py +++ b/opal_security/models/apps_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.app import App +from opal_security.models.app import App from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/aws_permission_set_metadata.py b/opal_security/models/aws_permission_set_metadata.py similarity index 96% rename from opal/models/aws_permission_set_metadata.py rename to opal_security/models/aws_permission_set_metadata.py index b3c59ed..ca7a430 100644 --- a/opal/models/aws_permission_set_metadata.py +++ b/opal_security/models/aws_permission_set_metadata.py @@ -20,7 +20,7 @@ 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 opal_security.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/aws_permission_set_metadata_aws_permission_set.py b/opal_security/models/aws_permission_set_metadata_aws_permission_set.py similarity index 100% rename from opal/models/aws_permission_set_metadata_aws_permission_set.py rename to opal_security/models/aws_permission_set_metadata_aws_permission_set.py diff --git a/opal/models/condition.py b/opal_security/models/condition.py similarity index 100% rename from opal/models/condition.py rename to opal_security/models/condition.py diff --git a/opal/models/configuration_template.py b/opal_security/models/configuration_template.py similarity index 97% rename from opal/models/configuration_template.py rename to opal_security/models/configuration_template.py index f8197ce..7799049 100644 --- a/opal/models/configuration_template.py +++ b/opal_security/models/configuration_template.py @@ -21,8 +21,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration -from opal.models.visibility_info import VisibilityInfo +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.visibility_info import VisibilityInfo from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_configuration_template_info.py b/opal_security/models/create_configuration_template_info.py similarity index 95% rename from opal/models/create_configuration_template_info.py rename to opal_security/models/create_configuration_template_info.py index 70d7742..0e511ad 100644 --- a/opal/models/create_configuration_template_info.py +++ b/opal_security/models/create_configuration_template_info.py @@ -21,10 +21,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList -from opal.models.request_configuration import RequestConfiguration -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration -from opal.models.visibility_info import VisibilityInfo +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.visibility_info import VisibilityInfo from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_group_binding_info.py b/opal_security/models/create_group_binding_info.py similarity index 97% rename from opal/models/create_group_binding_info.py rename to opal_security/models/create_group_binding_info.py index 9a35d82..3475d86 100644 --- a/opal/models/create_group_binding_info.py +++ b/opal_security/models/create_group_binding_info.py @@ -20,7 +20,7 @@ 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 opal_security.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_group_binding_info_groups_inner.py b/opal_security/models/create_group_binding_info_groups_inner.py similarity index 100% rename from opal/models/create_group_binding_info_groups_inner.py rename to opal_security/models/create_group_binding_info_groups_inner.py diff --git a/opal/models/create_group_info.py b/opal_security/models/create_group_info.py similarity index 97% rename from opal/models/create_group_info.py rename to opal_security/models/create_group_info.py index f995e43..99a03ea 100644 --- a/opal/models/create_group_info.py +++ b/opal_security/models/create_group_info.py @@ -21,9 +21,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.group_remote_info import GroupRemoteInfo -from opal.models.group_type_enum import GroupTypeEnum -from opal.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.group_remote_info import GroupRemoteInfo +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_message_channel_info.py b/opal_security/models/create_message_channel_info.py similarity index 97% rename from opal/models/create_message_channel_info.py rename to opal_security/models/create_message_channel_info.py index d74541d..a601fb8 100644 --- a/opal/models/create_message_channel_info.py +++ b/opal_security/models/create_message_channel_info.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from opal.models.message_channel_provider_enum import MessageChannelProviderEnum +from opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_on_call_schedule_info.py b/opal_security/models/create_on_call_schedule_info.py similarity index 97% rename from opal/models/create_on_call_schedule_info.py rename to opal_security/models/create_on_call_schedule_info.py index 005219b..af7774d 100644 --- a/opal/models/create_on_call_schedule_info.py +++ b/opal_security/models/create_on_call_schedule_info.py @@ -20,7 +20,7 @@ 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 opal_security.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_owner_info.py b/opal_security/models/create_owner_info.py similarity index 100% rename from opal/models/create_owner_info.py rename to opal_security/models/create_owner_info.py diff --git a/opal/models/create_request200_response.py b/opal_security/models/create_request200_response.py similarity index 100% rename from opal/models/create_request200_response.py rename to opal_security/models/create_request200_response.py diff --git a/opal/models/create_request_configuration_info_list.py b/opal_security/models/create_request_configuration_info_list.py similarity index 98% rename from opal/models/create_request_configuration_info_list.py rename to opal_security/models/create_request_configuration_info_list.py index 56dc3a9..b30c192 100644 --- a/opal/models/create_request_configuration_info_list.py +++ b/opal_security/models/create_request_configuration_info_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from opal.models.request_configuration import RequestConfiguration +from opal_security.models.request_configuration import RequestConfiguration from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_request_info.py b/opal_security/models/create_request_info.py similarity index 93% rename from opal/models/create_request_info.py rename to opal_security/models/create_request_info.py index d280e0b..c5eda4f 100644 --- a/opal/models/create_request_info.py +++ b/opal_security/models/create_request_info.py @@ -21,10 +21,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner -from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner -from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner -from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket +from opal_security.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal_security.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal_security.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal_security.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_request_info_custom_metadata_inner.py b/opal_security/models/create_request_info_custom_metadata_inner.py similarity index 96% rename from opal/models/create_request_info_custom_metadata_inner.py rename to opal_security/models/create_request_info_custom_metadata_inner.py index 0017511..2d3bf80 100644 --- a/opal/models/create_request_info_custom_metadata_inner.py +++ b/opal_security/models/create_request_info_custom_metadata_inner.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from opal.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum +from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_request_info_groups_inner.py b/opal_security/models/create_request_info_groups_inner.py similarity index 100% rename from opal/models/create_request_info_groups_inner.py rename to opal_security/models/create_request_info_groups_inner.py diff --git a/opal/models/create_request_info_resources_inner.py b/opal_security/models/create_request_info_resources_inner.py similarity index 100% rename from opal/models/create_request_info_resources_inner.py rename to opal_security/models/create_request_info_resources_inner.py diff --git a/opal/models/create_request_info_support_ticket.py b/opal_security/models/create_request_info_support_ticket.py similarity index 97% rename from opal/models/create_request_info_support_ticket.py rename to opal_security/models/create_request_info_support_ticket.py index 9992d73..e7efdde 100644 --- a/opal/models/create_request_info_support_ticket.py +++ b/opal_security/models/create_request_info_support_ticket.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from opal.models.ticketing_provider_enum import TicketingProviderEnum +from opal_security.models.ticketing_provider_enum import TicketingProviderEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_resource_info.py b/opal_security/models/create_resource_info.py similarity index 98% rename from opal/models/create_resource_info.py rename to opal_security/models/create_resource_info.py index 453c0d5..e498ea6 100644 --- a/opal/models/create_resource_info.py +++ b/opal_security/models/create_resource_info.py @@ -21,9 +21,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.resource_remote_info import ResourceRemoteInfo -from opal.models.resource_type_enum import ResourceTypeEnum -from opal.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.resource_remote_info import ResourceRemoteInfo +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/create_tag_info.py b/opal_security/models/create_tag_info.py similarity index 100% rename from opal/models/create_tag_info.py rename to opal_security/models/create_tag_info.py diff --git a/opal/models/create_uar_info.py b/opal_security/models/create_uar_info.py similarity index 97% rename from opal/models/create_uar_info.py rename to opal_security/models/create_uar_info.py index b1032a3..77cba71 100644 --- a/opal/models/create_uar_info.py +++ b/opal_security/models/create_uar_info.py @@ -21,8 +21,8 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum -from opal.models.uar_scope import UARScope +from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum +from opal_security.models.uar_scope import UARScope from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/entity_type_enum.py b/opal_security/models/entity_type_enum.py similarity index 100% rename from opal/models/entity_type_enum.py rename to opal_security/models/entity_type_enum.py diff --git a/opal/models/event.py b/opal_security/models/event.py similarity index 99% rename from opal/models/event.py rename to opal_security/models/event.py index d36aa5d..4098c69 100644 --- a/opal/models/event.py +++ b/opal_security/models/event.py @@ -21,7 +21,7 @@ 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 opal_security.models.sub_event import SubEvent from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group.py b/opal_security/models/group.py similarity index 97% rename from opal/models/group.py rename to opal_security/models/group.py index 76f029f..fa7008f 100644 --- a/opal/models/group.py +++ b/opal_security/models/group.py @@ -21,10 +21,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.group_remote_info import GroupRemoteInfo -from opal.models.group_type_enum import GroupTypeEnum -from opal.models.request_configuration import RequestConfiguration -from opal.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.group_remote_info import GroupRemoteInfo +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group_access_level.py b/opal_security/models/group_access_level.py similarity index 100% rename from opal/models/group_access_level.py rename to opal_security/models/group_access_level.py diff --git a/opal/models/group_binding.py b/opal_security/models/group_binding.py similarity index 98% rename from opal/models/group_binding.py rename to opal_security/models/group_binding.py index 9c6d78c..ecd20fb 100644 --- a/opal/models/group_binding.py +++ b/opal_security/models/group_binding.py @@ -21,7 +21,7 @@ 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 opal_security.models.group_binding_group import GroupBindingGroup from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group_binding_group.py b/opal_security/models/group_binding_group.py similarity index 98% rename from opal/models/group_binding_group.py rename to opal_security/models/group_binding_group.py index bc67c16..0d793fc 100644 --- a/opal/models/group_binding_group.py +++ b/opal_security/models/group_binding_group.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from opal.models.group_type_enum import GroupTypeEnum +from opal_security.models.group_type_enum import GroupTypeEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group_remote_info.py b/opal_security/models/group_remote_info.py similarity index 88% rename from opal/models/group_remote_info.py rename to opal_security/models/group_remote_info.py index cd74ada..920715d 100644 --- a/opal/models/group_remote_info.py +++ b/opal_security/models/group_remote_info.py @@ -20,15 +20,15 @@ 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 opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group +from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup +from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam +from opal_security.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup +from opal_security.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup +from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group_remote_info_active_directory_group.py b/opal_security/models/group_remote_info_active_directory_group.py similarity index 100% rename from opal/models/group_remote_info_active_directory_group.py rename to opal_security/models/group_remote_info_active_directory_group.py diff --git a/opal/models/group_remote_info_azure_ad_microsoft365_group.py b/opal_security/models/group_remote_info_azure_ad_microsoft365_group.py similarity index 100% rename from opal/models/group_remote_info_azure_ad_microsoft365_group.py rename to opal_security/models/group_remote_info_azure_ad_microsoft365_group.py diff --git a/opal/models/group_remote_info_azure_ad_security_group.py b/opal_security/models/group_remote_info_azure_ad_security_group.py similarity index 100% rename from opal/models/group_remote_info_azure_ad_security_group.py rename to opal_security/models/group_remote_info_azure_ad_security_group.py diff --git a/opal/models/group_remote_info_duo_group.py b/opal_security/models/group_remote_info_duo_group.py similarity index 100% rename from opal/models/group_remote_info_duo_group.py rename to opal_security/models/group_remote_info_duo_group.py diff --git a/opal/models/group_remote_info_github_team.py b/opal_security/models/group_remote_info_github_team.py similarity index 100% rename from opal/models/group_remote_info_github_team.py rename to opal_security/models/group_remote_info_github_team.py diff --git a/opal/models/group_remote_info_gitlab_group.py b/opal_security/models/group_remote_info_gitlab_group.py similarity index 100% rename from opal/models/group_remote_info_gitlab_group.py rename to opal_security/models/group_remote_info_gitlab_group.py diff --git a/opal/models/group_remote_info_google_group.py b/opal_security/models/group_remote_info_google_group.py similarity index 100% rename from opal/models/group_remote_info_google_group.py rename to opal_security/models/group_remote_info_google_group.py diff --git a/opal/models/group_remote_info_ldap_group.py b/opal_security/models/group_remote_info_ldap_group.py similarity index 100% rename from opal/models/group_remote_info_ldap_group.py rename to opal_security/models/group_remote_info_ldap_group.py diff --git a/opal/models/group_remote_info_okta_group.py b/opal_security/models/group_remote_info_okta_group.py similarity index 100% rename from opal/models/group_remote_info_okta_group.py rename to opal_security/models/group_remote_info_okta_group.py diff --git a/opal/models/group_resource.py b/opal_security/models/group_resource.py similarity index 98% rename from opal/models/group_resource.py rename to opal_security/models/group_resource.py index b329735..cd5e7f7 100644 --- a/opal/models/group_resource.py +++ b/opal_security/models/group_resource.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from opal.models.resource_access_level import ResourceAccessLevel +from opal_security.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group_resource_list.py b/opal_security/models/group_resource_list.py similarity index 98% rename from opal/models/group_resource_list.py rename to opal_security/models/group_resource_list.py index ae102b0..87048df 100644 --- a/opal/models/group_resource_list.py +++ b/opal_security/models/group_resource_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.group_resource import GroupResource +from opal_security.models.group_resource import GroupResource from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group_type_enum.py b/opal_security/models/group_type_enum.py similarity index 100% rename from opal/models/group_type_enum.py rename to opal_security/models/group_type_enum.py diff --git a/opal/models/group_user.py b/opal_security/models/group_user.py similarity index 98% rename from opal/models/group_user.py rename to opal_security/models/group_user.py index fe713f6..04f5036 100644 --- a/opal/models/group_user.py +++ b/opal_security/models/group_user.py @@ -21,7 +21,7 @@ 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 opal_security.models.group_access_level import GroupAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/group_user_list.py b/opal_security/models/group_user_list.py similarity index 98% rename from opal/models/group_user_list.py rename to opal_security/models/group_user_list.py index 8150d21..2e3cac2 100644 --- a/opal/models/group_user_list.py +++ b/opal_security/models/group_user_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from opal.models.group_user import GroupUser +from opal_security.models.group_user import GroupUser from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/idp_group_mapping.py b/opal_security/models/idp_group_mapping.py similarity index 100% rename from opal/models/idp_group_mapping.py rename to opal_security/models/idp_group_mapping.py diff --git a/opal/models/idp_group_mapping_list.py b/opal_security/models/idp_group_mapping_list.py similarity index 98% rename from opal/models/idp_group_mapping_list.py rename to opal_security/models/idp_group_mapping_list.py index 836580b..abecc31 100644 --- a/opal/models/idp_group_mapping_list.py +++ b/opal_security/models/idp_group_mapping_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.idp_group_mapping import IdpGroupMapping +from opal_security.models.idp_group_mapping import IdpGroupMapping from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/message_channel.py b/opal_security/models/message_channel.py similarity index 97% rename from opal/models/message_channel.py rename to opal_security/models/message_channel.py index 162a9da..cb53c4d 100644 --- a/opal/models/message_channel.py +++ b/opal_security/models/message_channel.py @@ -20,7 +20,7 @@ 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 opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/message_channel_id_list.py b/opal_security/models/message_channel_id_list.py similarity index 100% rename from opal/models/message_channel_id_list.py rename to opal_security/models/message_channel_id_list.py diff --git a/opal/models/message_channel_list.py b/opal_security/models/message_channel_list.py similarity index 98% rename from opal/models/message_channel_list.py rename to opal_security/models/message_channel_list.py index 4cd4165..b7b89a1 100644 --- a/opal/models/message_channel_list.py +++ b/opal_security/models/message_channel_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.message_channel import MessageChannel +from opal_security.models.message_channel import MessageChannel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/message_channel_provider_enum.py b/opal_security/models/message_channel_provider_enum.py similarity index 100% rename from opal/models/message_channel_provider_enum.py rename to opal_security/models/message_channel_provider_enum.py diff --git a/opal/models/on_call_schedule.py b/opal_security/models/on_call_schedule.py similarity index 97% rename from opal/models/on_call_schedule.py rename to opal_security/models/on_call_schedule.py index 5816957..e2b507e 100644 --- a/opal/models/on_call_schedule.py +++ b/opal_security/models/on_call_schedule.py @@ -20,7 +20,7 @@ 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 opal_security.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/on_call_schedule_id_list.py b/opal_security/models/on_call_schedule_id_list.py similarity index 100% rename from opal/models/on_call_schedule_id_list.py rename to opal_security/models/on_call_schedule_id_list.py diff --git a/opal/models/on_call_schedule_list.py b/opal_security/models/on_call_schedule_list.py similarity index 98% rename from opal/models/on_call_schedule_list.py rename to opal_security/models/on_call_schedule_list.py index a5bfd84..6c7dfb9 100644 --- a/opal/models/on_call_schedule_list.py +++ b/opal_security/models/on_call_schedule_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.on_call_schedule import OnCallSchedule +from opal_security.models.on_call_schedule import OnCallSchedule from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/on_call_schedule_provider_enum.py b/opal_security/models/on_call_schedule_provider_enum.py similarity index 100% rename from opal/models/on_call_schedule_provider_enum.py rename to opal_security/models/on_call_schedule_provider_enum.py diff --git a/opal/models/owner.py b/opal_security/models/owner.py similarity index 100% rename from opal/models/owner.py rename to opal_security/models/owner.py diff --git a/opal/models/paginated_configuration_template_list.py b/opal_security/models/paginated_configuration_template_list.py similarity index 97% rename from opal/models/paginated_configuration_template_list.py rename to opal_security/models/paginated_configuration_template_list.py index 0f00124..c0264a7 100644 --- a/opal/models/paginated_configuration_template_list.py +++ b/opal_security/models/paginated_configuration_template_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from opal.models.configuration_template import ConfigurationTemplate +from opal_security.models.configuration_template import ConfigurationTemplate from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_event_list.py b/opal_security/models/paginated_event_list.py similarity index 98% rename from opal/models/paginated_event_list.py rename to opal_security/models/paginated_event_list.py index afcd43e..665d48b 100644 --- a/opal/models/paginated_event_list.py +++ b/opal_security/models/paginated_event_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.event import Event +from opal_security.models.event import Event from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_group_bindings_list.py b/opal_security/models/paginated_group_bindings_list.py similarity index 98% rename from opal/models/paginated_group_bindings_list.py rename to opal_security/models/paginated_group_bindings_list.py index 7bb0b04..439d6eb 100644 --- a/opal/models/paginated_group_bindings_list.py +++ b/opal_security/models/paginated_group_bindings_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.group_binding import GroupBinding +from opal_security.models.group_binding import GroupBinding from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_groups_list.py b/opal_security/models/paginated_groups_list.py similarity index 98% rename from opal/models/paginated_groups_list.py rename to opal_security/models/paginated_groups_list.py index 531b469..f0f81e9 100644 --- a/opal/models/paginated_groups_list.py +++ b/opal_security/models/paginated_groups_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.group import Group +from opal_security.models.group import Group from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_owners_list.py b/opal_security/models/paginated_owners_list.py similarity index 98% rename from opal/models/paginated_owners_list.py rename to opal_security/models/paginated_owners_list.py index eb8dfd1..5297b75 100644 --- a/opal/models/paginated_owners_list.py +++ b/opal_security/models/paginated_owners_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.owner import Owner +from opal_security.models.owner import Owner from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_resources_list.py b/opal_security/models/paginated_resources_list.py similarity index 98% rename from opal/models/paginated_resources_list.py rename to opal_security/models/paginated_resources_list.py index fbdcc45..d05e7d1 100644 --- a/opal/models/paginated_resources_list.py +++ b/opal_security/models/paginated_resources_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.resource import Resource +from opal_security.models.resource import Resource from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_tags_list.py b/opal_security/models/paginated_tags_list.py similarity index 98% rename from opal/models/paginated_tags_list.py rename to opal_security/models/paginated_tags_list.py index b4403ef..6371087 100644 --- a/opal/models/paginated_tags_list.py +++ b/opal_security/models/paginated_tags_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.tag import Tag +from opal_security.models.tag import Tag from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_uars_list.py b/opal_security/models/paginated_uars_list.py similarity index 98% rename from opal/models/paginated_uars_list.py rename to opal_security/models/paginated_uars_list.py index 967cf8a..69ccae5 100644 --- a/opal/models/paginated_uars_list.py +++ b/opal_security/models/paginated_uars_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.uar import UAR +from opal_security.models.uar import UAR from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/paginated_users_list.py b/opal_security/models/paginated_users_list.py similarity index 98% rename from opal/models/paginated_users_list.py rename to opal_security/models/paginated_users_list.py index 0214683..414263c 100644 --- a/opal/models/paginated_users_list.py +++ b/opal_security/models/paginated_users_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.user import User +from opal_security.models.user import User from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/request.py b/opal_security/models/request.py similarity index 96% rename from opal/models/request.py rename to opal_security/models/request.py index 4a9714f..c6c9369 100644 --- a/opal/models/request.py +++ b/opal_security/models/request.py @@ -21,9 +21,9 @@ 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 opal_security.models.request_custom_field_response import RequestCustomFieldResponse +from opal_security.models.request_status_enum import RequestStatusEnum +from opal_security.models.requested_item import RequestedItem from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/request_configuration.py b/opal_security/models/request_configuration.py similarity index 98% rename from opal/models/request_configuration.py rename to opal_security/models/request_configuration.py index 58d2cf2..5520418 100644 --- a/opal/models/request_configuration.py +++ b/opal_security/models/request_configuration.py @@ -20,8 +20,8 @@ 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 opal_security.models.condition import Condition +from opal_security.models.reviewer_stage import ReviewerStage from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/request_custom_field_response.py b/opal_security/models/request_custom_field_response.py similarity index 94% rename from opal/models/request_custom_field_response.py rename to opal_security/models/request_custom_field_response.py index 7362747..0a2b842 100644 --- a/opal/models/request_custom_field_response.py +++ b/opal_security/models/request_custom_field_response.py @@ -20,8 +20,8 @@ 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 opal_security.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue +from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/request_custom_field_response_field_value.py b/opal_security/models/request_custom_field_response_field_value.py similarity index 100% rename from opal/models/request_custom_field_response_field_value.py rename to opal_security/models/request_custom_field_response_field_value.py diff --git a/opal/models/request_list.py b/opal_security/models/request_list.py similarity index 98% rename from opal/models/request_list.py rename to opal_security/models/request_list.py index 667f4b0..03a06c6 100644 --- a/opal/models/request_list.py +++ b/opal_security/models/request_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.request import Request +from opal_security.models.request import Request from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/request_status_enum.py b/opal_security/models/request_status_enum.py similarity index 100% rename from opal/models/request_status_enum.py rename to opal_security/models/request_status_enum.py diff --git a/opal/models/request_template_custom_field_type_enum.py b/opal_security/models/request_template_custom_field_type_enum.py similarity index 100% rename from opal/models/request_template_custom_field_type_enum.py rename to opal_security/models/request_template_custom_field_type_enum.py diff --git a/opal/models/requested_item.py b/opal_security/models/requested_item.py similarity index 100% rename from opal/models/requested_item.py rename to opal_security/models/requested_item.py diff --git a/opal/models/resource.py b/opal_security/models/resource.py similarity index 96% rename from opal/models/resource.py rename to opal_security/models/resource.py index fd32976..862c521 100644 --- a/opal/models/resource.py +++ b/opal_security/models/resource.py @@ -21,11 +21,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.request_configuration import RequestConfiguration -from opal.models.resource_remote_info import ResourceRemoteInfo -from opal.models.resource_type_enum import ResourceTypeEnum -from opal.models.risk_sensitivity_enum import RiskSensitivityEnum -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.resource_remote_info import ResourceRemoteInfo +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/resource_access_level.py b/opal_security/models/resource_access_level.py similarity index 100% rename from opal/models/resource_access_level.py rename to opal_security/models/resource_access_level.py diff --git a/opal/models/resource_access_user.py b/opal_security/models/resource_access_user.py similarity index 98% rename from opal/models/resource_access_user.py rename to opal_security/models/resource_access_user.py index 8f9dec4..babe9e4 100644 --- a/opal/models/resource_access_user.py +++ b/opal_security/models/resource_access_user.py @@ -21,7 +21,7 @@ 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 opal_security.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/resource_access_user_list.py b/opal_security/models/resource_access_user_list.py similarity index 97% rename from opal/models/resource_access_user_list.py rename to opal_security/models/resource_access_user_list.py index 1c0a90f..2fa075f 100644 --- a/opal/models/resource_access_user_list.py +++ b/opal_security/models/resource_access_user_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from opal.models.resource_access_user import ResourceAccessUser +from opal_security.models.resource_access_user import ResourceAccessUser from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/resource_nhi.py b/opal_security/models/resource_nhi.py similarity index 98% rename from opal/models/resource_nhi.py rename to opal_security/models/resource_nhi.py index 9bfa5da..72310b5 100644 --- a/opal/models/resource_nhi.py +++ b/opal_security/models/resource_nhi.py @@ -21,7 +21,7 @@ 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_security.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/resource_remote_info.py b/opal_security/models/resource_remote_info.py similarity index 84% rename from opal/models/resource_remote_info.py rename to opal_security/models/resource_remote_info.py index 2ba1910..772c042 100644 --- a/opal/models/resource_remote_info.py +++ b/opal_security/models/resource_remote_info.py @@ -20,32 +20,32 @@ 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_service_account import ResourceRemoteInfoGcpServiceAccount -from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance -from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo -from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject -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_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount +from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance +from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster +from opal_security.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole +from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet +from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset +from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket +from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance +from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder +from opal_security.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster +from opal_security.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization +from opal_security.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal_security.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount +from opal_security.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance +from opal_security.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo +from opal_security.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject +from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp +from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole +from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet +from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile +from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/resource_remote_info_aws_account.py b/opal_security/models/resource_remote_info_aws_account.py similarity index 100% rename from opal/models/resource_remote_info_aws_account.py rename to opal_security/models/resource_remote_info_aws_account.py diff --git a/opal/models/resource_remote_info_aws_ec2_instance.py b/opal_security/models/resource_remote_info_aws_ec2_instance.py similarity index 100% rename from opal/models/resource_remote_info_aws_ec2_instance.py rename to opal_security/models/resource_remote_info_aws_ec2_instance.py diff --git a/opal/models/resource_remote_info_aws_eks_cluster.py b/opal_security/models/resource_remote_info_aws_eks_cluster.py similarity index 100% rename from opal/models/resource_remote_info_aws_eks_cluster.py rename to opal_security/models/resource_remote_info_aws_eks_cluster.py diff --git a/opal/models/resource_remote_info_aws_iam_role.py b/opal_security/models/resource_remote_info_aws_iam_role.py similarity index 100% rename from opal/models/resource_remote_info_aws_iam_role.py rename to opal_security/models/resource_remote_info_aws_iam_role.py diff --git a/opal/models/resource_remote_info_aws_permission_set.py b/opal_security/models/resource_remote_info_aws_permission_set.py similarity index 100% rename from opal/models/resource_remote_info_aws_permission_set.py rename to opal_security/models/resource_remote_info_aws_permission_set.py diff --git a/opal/models/resource_remote_info_aws_rds_instance.py b/opal_security/models/resource_remote_info_aws_rds_instance.py similarity index 100% rename from opal/models/resource_remote_info_aws_rds_instance.py rename to opal_security/models/resource_remote_info_aws_rds_instance.py diff --git a/opal/models/resource_remote_info_gcp_big_query_dataset.py b/opal_security/models/resource_remote_info_gcp_big_query_dataset.py similarity index 100% rename from opal/models/resource_remote_info_gcp_big_query_dataset.py rename to opal_security/models/resource_remote_info_gcp_big_query_dataset.py diff --git a/opal/models/resource_remote_info_gcp_big_query_table.py b/opal_security/models/resource_remote_info_gcp_big_query_table.py similarity index 100% rename from opal/models/resource_remote_info_gcp_big_query_table.py rename to opal_security/models/resource_remote_info_gcp_big_query_table.py diff --git a/opal/models/resource_remote_info_gcp_bucket.py b/opal_security/models/resource_remote_info_gcp_bucket.py similarity index 100% rename from opal/models/resource_remote_info_gcp_bucket.py rename to opal_security/models/resource_remote_info_gcp_bucket.py diff --git a/opal/models/resource_remote_info_gcp_compute_instance.py b/opal_security/models/resource_remote_info_gcp_compute_instance.py similarity index 100% rename from opal/models/resource_remote_info_gcp_compute_instance.py rename to opal_security/models/resource_remote_info_gcp_compute_instance.py diff --git a/opal/models/resource_remote_info_gcp_folder.py b/opal_security/models/resource_remote_info_gcp_folder.py similarity index 100% rename from opal/models/resource_remote_info_gcp_folder.py rename to opal_security/models/resource_remote_info_gcp_folder.py diff --git a/opal/models/resource_remote_info_gcp_gke_cluster.py b/opal_security/models/resource_remote_info_gcp_gke_cluster.py similarity index 100% rename from opal/models/resource_remote_info_gcp_gke_cluster.py rename to opal_security/models/resource_remote_info_gcp_gke_cluster.py diff --git a/opal/models/resource_remote_info_gcp_organization.py b/opal_security/models/resource_remote_info_gcp_organization.py similarity index 100% rename from opal/models/resource_remote_info_gcp_organization.py rename to opal_security/models/resource_remote_info_gcp_organization.py diff --git a/opal/models/resource_remote_info_gcp_project.py b/opal_security/models/resource_remote_info_gcp_project.py similarity index 100% rename from opal/models/resource_remote_info_gcp_project.py rename to opal_security/models/resource_remote_info_gcp_project.py diff --git a/opal/models/resource_remote_info_gcp_service_account.py b/opal_security/models/resource_remote_info_gcp_service_account.py similarity index 100% rename from opal/models/resource_remote_info_gcp_service_account.py rename to opal_security/models/resource_remote_info_gcp_service_account.py diff --git a/opal/models/resource_remote_info_gcp_sql_instance.py b/opal_security/models/resource_remote_info_gcp_sql_instance.py similarity index 100% rename from opal/models/resource_remote_info_gcp_sql_instance.py rename to opal_security/models/resource_remote_info_gcp_sql_instance.py diff --git a/opal/models/resource_remote_info_github_repo.py b/opal_security/models/resource_remote_info_github_repo.py similarity index 100% rename from opal/models/resource_remote_info_github_repo.py rename to opal_security/models/resource_remote_info_github_repo.py diff --git a/opal/models/resource_remote_info_gitlab_project.py b/opal_security/models/resource_remote_info_gitlab_project.py similarity index 100% rename from opal/models/resource_remote_info_gitlab_project.py rename to opal_security/models/resource_remote_info_gitlab_project.py diff --git a/opal/models/resource_remote_info_okta_app.py b/opal_security/models/resource_remote_info_okta_app.py similarity index 100% rename from opal/models/resource_remote_info_okta_app.py rename to opal_security/models/resource_remote_info_okta_app.py diff --git a/opal/models/resource_remote_info_okta_custom_role.py b/opal_security/models/resource_remote_info_okta_custom_role.py similarity index 100% rename from opal/models/resource_remote_info_okta_custom_role.py rename to opal_security/models/resource_remote_info_okta_custom_role.py diff --git a/opal/models/resource_remote_info_okta_standard_role.py b/opal_security/models/resource_remote_info_okta_standard_role.py similarity index 100% rename from opal/models/resource_remote_info_okta_standard_role.py rename to opal_security/models/resource_remote_info_okta_standard_role.py diff --git a/opal/models/resource_remote_info_pagerduty_role.py b/opal_security/models/resource_remote_info_pagerduty_role.py similarity index 100% rename from opal/models/resource_remote_info_pagerduty_role.py rename to opal_security/models/resource_remote_info_pagerduty_role.py diff --git a/opal/models/resource_remote_info_salesforce_permission_set.py b/opal_security/models/resource_remote_info_salesforce_permission_set.py similarity index 100% rename from opal/models/resource_remote_info_salesforce_permission_set.py rename to opal_security/models/resource_remote_info_salesforce_permission_set.py diff --git a/opal/models/resource_remote_info_salesforce_profile.py b/opal_security/models/resource_remote_info_salesforce_profile.py similarity index 100% rename from opal/models/resource_remote_info_salesforce_profile.py rename to opal_security/models/resource_remote_info_salesforce_profile.py diff --git a/opal/models/resource_remote_info_salesforce_role.py b/opal_security/models/resource_remote_info_salesforce_role.py similarity index 100% rename from opal/models/resource_remote_info_salesforce_role.py rename to opal_security/models/resource_remote_info_salesforce_role.py diff --git a/opal/models/resource_remote_info_teleport_role.py b/opal_security/models/resource_remote_info_teleport_role.py similarity index 100% rename from opal/models/resource_remote_info_teleport_role.py rename to opal_security/models/resource_remote_info_teleport_role.py diff --git a/opal/models/resource_type_enum.py b/opal_security/models/resource_type_enum.py similarity index 100% rename from opal/models/resource_type_enum.py rename to opal_security/models/resource_type_enum.py diff --git a/opal/models/resource_user.py b/opal_security/models/resource_user.py similarity index 98% rename from opal/models/resource_user.py rename to opal_security/models/resource_user.py index 2c71049..bf4e868 100644 --- a/opal/models/resource_user.py +++ b/opal_security/models/resource_user.py @@ -21,7 +21,7 @@ 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_security.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/resource_user_access_status.py b/opal_security/models/resource_user_access_status.py similarity index 96% rename from opal/models/resource_user_access_status.py rename to opal_security/models/resource_user_access_status.py index cfce3fd..b6e8723 100644 --- a/opal/models/resource_user_access_status.py +++ b/opal_security/models/resource_user_access_status.py @@ -21,8 +21,8 @@ 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 opal_security.models.resource_access_level import ResourceAccessLevel +from opal_security.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/resource_user_access_status_enum.py b/opal_security/models/resource_user_access_status_enum.py similarity index 100% rename from opal/models/resource_user_access_status_enum.py rename to opal_security/models/resource_user_access_status_enum.py diff --git a/opal/models/resource_with_access_level.py b/opal_security/models/resource_with_access_level.py similarity index 100% rename from opal/models/resource_with_access_level.py rename to opal_security/models/resource_with_access_level.py diff --git a/opal/models/reviewer_id_list.py b/opal_security/models/reviewer_id_list.py similarity index 100% rename from opal/models/reviewer_id_list.py rename to opal_security/models/reviewer_id_list.py diff --git a/opal/models/reviewer_stage.py b/opal_security/models/reviewer_stage.py similarity index 100% rename from opal/models/reviewer_stage.py rename to opal_security/models/reviewer_stage.py diff --git a/opal/models/reviewer_stage_list.py b/opal_security/models/reviewer_stage_list.py similarity index 98% rename from opal/models/reviewer_stage_list.py rename to opal_security/models/reviewer_stage_list.py index f4c9bcc..7132915 100644 --- a/opal/models/reviewer_stage_list.py +++ b/opal_security/models/reviewer_stage_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from opal.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage import ReviewerStage from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/risk_sensitivity_enum.py b/opal_security/models/risk_sensitivity_enum.py similarity index 100% rename from opal/models/risk_sensitivity_enum.py rename to opal_security/models/risk_sensitivity_enum.py diff --git a/opal/models/session.py b/opal_security/models/session.py similarity index 98% rename from opal/models/session.py rename to opal_security/models/session.py index 97afa80..d624be7 100644 --- a/opal/models/session.py +++ b/opal_security/models/session.py @@ -21,7 +21,7 @@ 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 opal_security.models.resource_access_level import ResourceAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/sessions_list.py b/opal_security/models/sessions_list.py similarity index 98% rename from opal/models/sessions_list.py rename to opal_security/models/sessions_list.py index a635aa2..6234f9b 100644 --- a/opal/models/sessions_list.py +++ b/opal_security/models/sessions_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.session import Session +from opal_security.models.session import Session from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/sub_event.py b/opal_security/models/sub_event.py similarity index 100% rename from opal/models/sub_event.py rename to opal_security/models/sub_event.py diff --git a/opal/models/tag.py b/opal_security/models/tag.py similarity index 100% rename from opal/models/tag.py rename to opal_security/models/tag.py diff --git a/opal/models/tag_filter.py b/opal_security/models/tag_filter.py similarity index 100% rename from opal/models/tag_filter.py rename to opal_security/models/tag_filter.py diff --git a/opal/models/tags_list.py b/opal_security/models/tags_list.py similarity index 98% rename from opal/models/tags_list.py rename to opal_security/models/tags_list.py index d967680..516b85f 100644 --- a/opal/models/tags_list.py +++ b/opal_security/models/tags_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.tag import Tag +from opal_security.models.tag import Tag from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/ticket_propagation_configuration.py b/opal_security/models/ticket_propagation_configuration.py similarity index 97% rename from opal/models/ticket_propagation_configuration.py rename to opal_security/models/ticket_propagation_configuration.py index a73e64e..4f93135 100644 --- a/opal/models/ticket_propagation_configuration.py +++ b/opal_security/models/ticket_propagation_configuration.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.ticketing_provider_enum import TicketingProviderEnum +from opal_security.models.ticketing_provider_enum import TicketingProviderEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/ticketing_provider_enum.py b/opal_security/models/ticketing_provider_enum.py similarity index 100% rename from opal/models/ticketing_provider_enum.py rename to opal_security/models/ticketing_provider_enum.py diff --git a/opal/models/uar.py b/opal_security/models/uar.py similarity index 96% rename from opal/models/uar.py rename to opal_security/models/uar.py index 656a7f2..41acc91 100644 --- a/opal/models/uar.py +++ b/opal_security/models/uar.py @@ -21,8 +21,8 @@ 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 opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum +from opal_security.models.uar_scope import UARScope from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/uar_reviewer_assignment_policy_enum.py b/opal_security/models/uar_reviewer_assignment_policy_enum.py similarity index 100% rename from opal/models/uar_reviewer_assignment_policy_enum.py rename to opal_security/models/uar_reviewer_assignment_policy_enum.py diff --git a/opal/models/uar_scope.py b/opal_security/models/uar_scope.py similarity index 97% rename from opal/models/uar_scope.py rename to opal_security/models/uar_scope.py index 00e3b75..563f9dc 100644 --- a/opal/models/uar_scope.py +++ b/opal_security/models/uar_scope.py @@ -20,9 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from opal.models.group_type_enum import GroupTypeEnum -from opal.models.resource_type_enum import ResourceTypeEnum -from opal.models.tag_filter import TagFilter +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.models.tag_filter import TagFilter from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_configuration_template_info.py b/opal_security/models/update_configuration_template_info.py similarity index 95% rename from opal/models/update_configuration_template_info.py rename to opal_security/models/update_configuration_template_info.py index 3b223d4..7e56184 100644 --- a/opal/models/update_configuration_template_info.py +++ b/opal_security/models/update_configuration_template_info.py @@ -21,10 +21,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList -from opal.models.request_configuration import RequestConfiguration -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration -from opal.models.visibility_info import VisibilityInfo +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.visibility_info import VisibilityInfo from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_group_binding_info.py b/opal_security/models/update_group_binding_info.py similarity index 97% rename from opal/models/update_group_binding_info.py rename to opal_security/models/update_group_binding_info.py index ad8a38e..d36a1de 100644 --- a/opal/models/update_group_binding_info.py +++ b/opal_security/models/update_group_binding_info.py @@ -20,7 +20,7 @@ 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 opal_security.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_group_binding_info_list.py b/opal_security/models/update_group_binding_info_list.py similarity index 97% rename from opal/models/update_group_binding_info_list.py rename to opal_security/models/update_group_binding_info_list.py index d1024d3..a4ee61d 100644 --- a/opal/models/update_group_binding_info_list.py +++ b/opal_security/models/update_group_binding_info_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from opal.models.update_group_binding_info import UpdateGroupBindingInfo +from opal_security.models.update_group_binding_info import UpdateGroupBindingInfo from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_group_info.py b/opal_security/models/update_group_info.py similarity index 97% rename from opal/models/update_group_info.py rename to opal_security/models/update_group_info.py index d4c022f..9662764 100644 --- a/opal/models/update_group_info.py +++ b/opal_security/models/update_group_info.py @@ -21,9 +21,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList -from opal.models.request_configuration import RequestConfiguration -from opal.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_group_info_list.py b/opal_security/models/update_group_info_list.py similarity index 98% rename from opal/models/update_group_info_list.py rename to opal_security/models/update_group_info_list.py index afe16c9..43d7e37 100644 --- a/opal/models/update_group_info_list.py +++ b/opal_security/models/update_group_info_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from opal.models.update_group_info import UpdateGroupInfo +from opal_security.models.update_group_info import UpdateGroupInfo from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_group_resources_info.py b/opal_security/models/update_group_resources_info.py similarity index 97% rename from opal/models/update_group_resources_info.py rename to opal_security/models/update_group_resources_info.py index 01f77b8..818764e 100644 --- a/opal/models/update_group_resources_info.py +++ b/opal_security/models/update_group_resources_info.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.resource_with_access_level import ResourceWithAccessLevel +from opal_security.models.resource_with_access_level import ResourceWithAccessLevel from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_idp_group_mappings_request.py b/opal_security/models/update_idp_group_mappings_request.py similarity index 96% rename from opal/models/update_idp_group_mappings_request.py rename to opal_security/models/update_idp_group_mappings_request.py index 628b2a7..d487835 100644 --- a/opal/models/update_idp_group_mappings_request.py +++ b/opal_security/models/update_idp_group_mappings_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner +from opal_security.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_idp_group_mappings_request_mappings_inner.py b/opal_security/models/update_idp_group_mappings_request_mappings_inner.py similarity index 100% rename from opal/models/update_idp_group_mappings_request_mappings_inner.py rename to opal_security/models/update_idp_group_mappings_request_mappings_inner.py diff --git a/opal/models/update_owner_info.py b/opal_security/models/update_owner_info.py similarity index 100% rename from opal/models/update_owner_info.py rename to opal_security/models/update_owner_info.py diff --git a/opal/models/update_owner_info_list.py b/opal_security/models/update_owner_info_list.py similarity index 98% rename from opal/models/update_owner_info_list.py rename to opal_security/models/update_owner_info_list.py index 823ce8a..1a93084 100644 --- a/opal/models/update_owner_info_list.py +++ b/opal_security/models/update_owner_info_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from opal.models.update_owner_info import UpdateOwnerInfo +from opal_security.models.update_owner_info import UpdateOwnerInfo from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_resource_info.py b/opal_security/models/update_resource_info.py similarity index 96% rename from opal/models/update_resource_info.py rename to opal_security/models/update_resource_info.py index 966659d..c20bdef 100644 --- a/opal/models/update_resource_info.py +++ b/opal_security/models/update_resource_info.py @@ -21,10 +21,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList -from opal.models.request_configuration import RequestConfiguration -from opal.models.risk_sensitivity_enum import RiskSensitivityEnum -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.request_configuration import RequestConfiguration +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/update_resource_info_list.py b/opal_security/models/update_resource_info_list.py similarity index 98% rename from opal/models/update_resource_info_list.py rename to opal_security/models/update_resource_info_list.py index 29395a0..8819746 100644 --- a/opal/models/update_resource_info_list.py +++ b/opal_security/models/update_resource_info_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from opal.models.update_resource_info import UpdateResourceInfo +from opal_security.models.update_resource_info import UpdateResourceInfo from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/user.py b/opal_security/models/user.py similarity index 98% rename from opal/models/user.py rename to opal_security/models/user.py index 3dfa8f3..2ff008e 100644 --- a/opal/models/user.py +++ b/opal_security/models/user.py @@ -20,7 +20,7 @@ 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 opal_security.models.user_hr_idp_status_enum import UserHrIdpStatusEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/user_hr_idp_status_enum.py b/opal_security/models/user_hr_idp_status_enum.py similarity index 100% rename from opal/models/user_hr_idp_status_enum.py rename to opal_security/models/user_hr_idp_status_enum.py diff --git a/opal/models/user_id_list.py b/opal_security/models/user_id_list.py similarity index 100% rename from opal/models/user_id_list.py rename to opal_security/models/user_id_list.py diff --git a/opal/models/user_list.py b/opal_security/models/user_list.py similarity index 98% rename from opal/models/user_list.py rename to opal_security/models/user_list.py index 24b01b6..4fb2096 100644 --- a/opal/models/user_list.py +++ b/opal_security/models/user_list.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from opal.models.user import User +from opal_security.models.user import User from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/visibility_info.py b/opal_security/models/visibility_info.py similarity index 97% rename from opal/models/visibility_info.py rename to opal_security/models/visibility_info.py index c7ca210..0a4ef5f 100644 --- a/opal/models/visibility_info.py +++ b/opal_security/models/visibility_info.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from opal.models.visibility_type_enum import VisibilityTypeEnum +from opal_security.models.visibility_type_enum import VisibilityTypeEnum from typing import Optional, Set from typing_extensions import Self diff --git a/opal/models/visibility_type_enum.py b/opal_security/models/visibility_type_enum.py similarity index 100% rename from opal/models/visibility_type_enum.py rename to opal_security/models/visibility_type_enum.py diff --git a/opal/py.typed b/opal_security/py.typed similarity index 100% rename from opal/py.typed rename to opal_security/py.typed diff --git a/opal/rest.py b/opal_security/rest.py similarity index 99% rename from opal/rest.py rename to opal_security/rest.py index fe4e015..c728ccf 100644 --- a/opal/rest.py +++ b/opal_security/rest.py @@ -20,7 +20,7 @@ import urllib3 -from opal.exceptions import ApiException, ApiValueError +from opal_security.exceptions import ApiException, ApiValueError SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse diff --git a/pyproject.toml b/pyproject.toml index f9d07f3..ed45f2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "opal" +name = "opal_security" version = "1.0.0" description = "Opal API" authors = ["Opal Team "] @@ -7,7 +7,7 @@ license = "NoLicense" readme = "README.md" repository = "https://github.com/opalsecurity/opal-python" keywords = ["OpenAPI", "OpenAPI-Generator", "Opal API"] -include = ["opal/py.typed"] +include = ["opal_security/py.typed"] [tool.poetry.dependencies] python = "^3.8" @@ -35,7 +35,7 @@ extension-pkg-whitelist = "pydantic" [tool.mypy] files = [ - "opal", + "opal_security", #"test", # auto-generated tests "tests", # hand-written tests ] @@ -73,7 +73,7 @@ disallow_any_generics = true [[tool.mypy.overrides]] module = [ - "opal.configuration", + "opal_security.configuration", ] warn_unused_ignores = true strict_equality = true diff --git a/setup.py b/setup.py index be388ab..ea6ce87 100644 --- a/setup.py +++ b/setup.py @@ -21,8 +21,7 @@ # # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -NAME = "opal" -VERSION = "1.0.0" +NAME = "opal-security" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", @@ -33,7 +32,6 @@ setup( name=NAME, - version=VERSION, description="Opal API", author="Opal Team", author_email="hello@opal.dev", @@ -42,9 +40,11 @@ install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + use_scm_version=True, + setup_requires=['setuptools_scm'], long_description_content_type='text/markdown', long_description="""\ Your Home For Developer Resources. """, # noqa: E501 - package_data={"opal": ["py.typed"]}, + package_data={"opal_security": ["py.typed"]}, ) diff --git a/test/test_access.py b/test/test_access.py index b8caeed..9ed6fc0 100644 --- a/test/test_access.py +++ b/test/test_access.py @@ -15,7 +15,7 @@ import unittest -from opal.models.access import Access +from opal_security.models.access import Access class TestAccess(unittest.TestCase): """Access unit test stubs""" diff --git a/test/test_access_list.py b/test/test_access_list.py index 7895c15..653134a 100644 --- a/test/test_access_list.py +++ b/test/test_access_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.access_list import AccessList +from opal_security.models.access_list import AccessList class TestAccessList(unittest.TestCase): """AccessList unit test stubs""" diff --git a/test/test_add_group_resource_request.py b/test/test_add_group_resource_request.py index 46a903b..fcad5c0 100644 --- a/test/test_add_group_resource_request.py +++ b/test/test_add_group_resource_request.py @@ -15,7 +15,7 @@ import unittest -from opal.models.add_group_resource_request import AddGroupResourceRequest +from opal_security.models.add_group_resource_request import AddGroupResourceRequest class TestAddGroupResourceRequest(unittest.TestCase): """AddGroupResourceRequest unit test stubs""" diff --git a/test/test_add_group_user_request.py b/test/test_add_group_user_request.py index 0bdceea..9f4a3ca 100644 --- a/test/test_add_group_user_request.py +++ b/test/test_add_group_user_request.py @@ -15,7 +15,7 @@ import unittest -from opal.models.add_group_user_request import AddGroupUserRequest +from opal_security.models.add_group_user_request import AddGroupUserRequest class TestAddGroupUserRequest(unittest.TestCase): """AddGroupUserRequest unit test stubs""" diff --git a/test/test_add_resource_nhi_request.py b/test/test_add_resource_nhi_request.py index 9457713..c419a28 100644 --- a/test/test_add_resource_nhi_request.py +++ b/test/test_add_resource_nhi_request.py @@ -15,7 +15,7 @@ import unittest -from opal.models.add_resource_nhi_request import AddResourceNhiRequest +from opal_security.models.add_resource_nhi_request import AddResourceNhiRequest class TestAddResourceNhiRequest(unittest.TestCase): """AddResourceNhiRequest unit test stubs""" diff --git a/test/test_add_resource_user_request.py b/test/test_add_resource_user_request.py index 1bec0c5..a3597bc 100644 --- a/test/test_add_resource_user_request.py +++ b/test/test_add_resource_user_request.py @@ -15,7 +15,7 @@ import unittest -from opal.models.add_resource_user_request import AddResourceUserRequest +from opal_security.models.add_resource_user_request import AddResourceUserRequest class TestAddResourceUserRequest(unittest.TestCase): """AddResourceUserRequest unit test stubs""" diff --git a/test/test_app.py b/test/test_app.py index 72d1d84..10fcc08 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -15,7 +15,7 @@ import unittest -from opal.models.app import App +from opal_security.models.app import App class TestApp(unittest.TestCase): """App unit test stubs""" diff --git a/test/test_app_type_enum.py b/test/test_app_type_enum.py index 2ada9b6..9f1e158 100644 --- a/test/test_app_type_enum.py +++ b/test/test_app_type_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.app_type_enum import AppTypeEnum +from opal_security.models.app_type_enum import AppTypeEnum class TestAppTypeEnum(unittest.TestCase): """AppTypeEnum unit test stubs""" diff --git a/test/test_apps_api.py b/test/test_apps_api.py index 8be79b8..9695c85 100644 --- a/test/test_apps_api.py +++ b/test/test_apps_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.apps_api import AppsApi +from opal_security.api.apps_api import AppsApi class TestAppsApi(unittest.TestCase): diff --git a/test/test_apps_list.py b/test/test_apps_list.py index 5bbf597..8fd2939 100644 --- a/test/test_apps_list.py +++ b/test/test_apps_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.apps_list import AppsList +from opal_security.models.apps_list import AppsList class TestAppsList(unittest.TestCase): """AppsList unit test stubs""" diff --git a/test/test_aws_permission_set_metadata.py b/test/test_aws_permission_set_metadata.py index 058016f..e1067ff 100644 --- a/test/test_aws_permission_set_metadata.py +++ b/test/test_aws_permission_set_metadata.py @@ -15,7 +15,7 @@ import unittest -from opal.models.aws_permission_set_metadata import AwsPermissionSetMetadata +from opal_security.models.aws_permission_set_metadata import AwsPermissionSetMetadata class TestAwsPermissionSetMetadata(unittest.TestCase): """AwsPermissionSetMetadata unit test stubs""" diff --git a/test/test_aws_permission_set_metadata_aws_permission_set.py b/test/test_aws_permission_set_metadata_aws_permission_set.py index 87455aa..910a790 100644 --- a/test/test_aws_permission_set_metadata_aws_permission_set.py +++ b/test/test_aws_permission_set_metadata_aws_permission_set.py @@ -15,7 +15,7 @@ import unittest -from opal.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet +from opal_security.models.aws_permission_set_metadata_aws_permission_set import AwsPermissionSetMetadataAwsPermissionSet class TestAwsPermissionSetMetadataAwsPermissionSet(unittest.TestCase): """AwsPermissionSetMetadataAwsPermissionSet unit test stubs""" diff --git a/test/test_condition.py b/test/test_condition.py index 19b9004..4cd3303 100644 --- a/test/test_condition.py +++ b/test/test_condition.py @@ -15,7 +15,7 @@ import unittest -from opal.models.condition import Condition +from opal_security.models.condition import Condition class TestCondition(unittest.TestCase): """Condition unit test stubs""" diff --git a/test/test_configuration_template.py b/test/test_configuration_template.py index 52f567c..8420af7 100644 --- a/test/test_configuration_template.py +++ b/test/test_configuration_template.py @@ -15,7 +15,7 @@ import unittest -from opal.models.configuration_template import ConfigurationTemplate +from opal_security.models.configuration_template import ConfigurationTemplate class TestConfigurationTemplate(unittest.TestCase): """ConfigurationTemplate unit test stubs""" diff --git a/test/test_configuration_templates_api.py b/test/test_configuration_templates_api.py index 01beb45..c2bd64f 100644 --- a/test/test_configuration_templates_api.py +++ b/test/test_configuration_templates_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.configuration_templates_api import ConfigurationTemplatesApi +from opal_security.api.configuration_templates_api import ConfigurationTemplatesApi class TestConfigurationTemplatesApi(unittest.TestCase): diff --git a/test/test_create_configuration_template_info.py b/test/test_create_configuration_template_info.py index 0e5e0f0..04c3055 100644 --- a/test/test_create_configuration_template_info.py +++ b/test/test_create_configuration_template_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_configuration_template_info import CreateConfigurationTemplateInfo +from opal_security.models.create_configuration_template_info import CreateConfigurationTemplateInfo class TestCreateConfigurationTemplateInfo(unittest.TestCase): """CreateConfigurationTemplateInfo unit test stubs""" diff --git a/test/test_create_group_binding_info.py b/test/test_create_group_binding_info.py index ea06b5d..5bc8366 100644 --- a/test/test_create_group_binding_info.py +++ b/test/test_create_group_binding_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_group_binding_info import CreateGroupBindingInfo +from opal_security.models.create_group_binding_info import CreateGroupBindingInfo class TestCreateGroupBindingInfo(unittest.TestCase): """CreateGroupBindingInfo unit test stubs""" diff --git a/test/test_create_group_binding_info_groups_inner.py b/test/test_create_group_binding_info_groups_inner.py index a26898a..0aa63f8 100644 --- a/test/test_create_group_binding_info_groups_inner.py +++ b/test/test_create_group_binding_info_groups_inner.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner +from opal_security.models.create_group_binding_info_groups_inner import CreateGroupBindingInfoGroupsInner class TestCreateGroupBindingInfoGroupsInner(unittest.TestCase): """CreateGroupBindingInfoGroupsInner unit test stubs""" diff --git a/test/test_create_group_info.py b/test/test_create_group_info.py index a4342e8..dd26369 100644 --- a/test/test_create_group_info.py +++ b/test/test_create_group_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_group_info import CreateGroupInfo +from opal_security.models.create_group_info import CreateGroupInfo class TestCreateGroupInfo(unittest.TestCase): """CreateGroupInfo unit test stubs""" diff --git a/test/test_create_message_channel_info.py b/test/test_create_message_channel_info.py index 32d5c43..ddbf395 100644 --- a/test/test_create_message_channel_info.py +++ b/test/test_create_message_channel_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_message_channel_info import CreateMessageChannelInfo +from opal_security.models.create_message_channel_info import CreateMessageChannelInfo class TestCreateMessageChannelInfo(unittest.TestCase): """CreateMessageChannelInfo unit test stubs""" diff --git a/test/test_create_on_call_schedule_info.py b/test/test_create_on_call_schedule_info.py index 2157525..b26d49a 100644 --- a/test/test_create_on_call_schedule_info.py +++ b/test/test_create_on_call_schedule_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_on_call_schedule_info import CreateOnCallScheduleInfo +from opal_security.models.create_on_call_schedule_info import CreateOnCallScheduleInfo class TestCreateOnCallScheduleInfo(unittest.TestCase): """CreateOnCallScheduleInfo unit test stubs""" diff --git a/test/test_create_owner_info.py b/test/test_create_owner_info.py index e1e3820..6f7e684 100644 --- a/test/test_create_owner_info.py +++ b/test/test_create_owner_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_owner_info import CreateOwnerInfo +from opal_security.models.create_owner_info import CreateOwnerInfo class TestCreateOwnerInfo(unittest.TestCase): """CreateOwnerInfo unit test stubs""" diff --git a/test/test_create_request200_response.py b/test/test_create_request200_response.py index df05e8d..3215188 100644 --- a/test/test_create_request200_response.py +++ b/test/test_create_request200_response.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_request200_response import CreateRequest200Response +from opal_security.models.create_request200_response import CreateRequest200Response class TestCreateRequest200Response(unittest.TestCase): """CreateRequest200Response unit test stubs""" diff --git a/test/test_create_request_configuration_info_list.py b/test/test_create_request_configuration_info_list.py index 16d4381..3668bcf 100644 --- a/test/test_create_request_configuration_info_list.py +++ b/test/test_create_request_configuration_info_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList +from opal_security.models.create_request_configuration_info_list import CreateRequestConfigurationInfoList class TestCreateRequestConfigurationInfoList(unittest.TestCase): """CreateRequestConfigurationInfoList unit test stubs""" diff --git a/test/test_create_request_info.py b/test/test_create_request_info.py index 4b598d8..ce0f51a 100644 --- a/test/test_create_request_info.py +++ b/test/test_create_request_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_request_info import CreateRequestInfo +from opal_security.models.create_request_info import CreateRequestInfo class TestCreateRequestInfo(unittest.TestCase): """CreateRequestInfo unit test stubs""" diff --git a/test/test_create_request_info_custom_metadata_inner.py b/test/test_create_request_info_custom_metadata_inner.py index aad20c0..cc087d9 100644 --- a/test/test_create_request_info_custom_metadata_inner.py +++ b/test/test_create_request_info_custom_metadata_inner.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner +from opal_security.models.create_request_info_custom_metadata_inner import CreateRequestInfoCustomMetadataInner class TestCreateRequestInfoCustomMetadataInner(unittest.TestCase): """CreateRequestInfoCustomMetadataInner unit test stubs""" diff --git a/test/test_create_request_info_groups_inner.py b/test/test_create_request_info_groups_inner.py index 7308c20..22c1a76 100644 --- a/test/test_create_request_info_groups_inner.py +++ b/test/test_create_request_info_groups_inner.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner +from opal_security.models.create_request_info_groups_inner import CreateRequestInfoGroupsInner class TestCreateRequestInfoGroupsInner(unittest.TestCase): """CreateRequestInfoGroupsInner unit test stubs""" diff --git a/test/test_create_request_info_resources_inner.py b/test/test_create_request_info_resources_inner.py index 5d45de8..450d3f7 100644 --- a/test/test_create_request_info_resources_inner.py +++ b/test/test_create_request_info_resources_inner.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner +from opal_security.models.create_request_info_resources_inner import CreateRequestInfoResourcesInner class TestCreateRequestInfoResourcesInner(unittest.TestCase): """CreateRequestInfoResourcesInner unit test stubs""" diff --git a/test/test_create_request_info_support_ticket.py b/test/test_create_request_info_support_ticket.py index 69e561d..9c1dab9 100644 --- a/test/test_create_request_info_support_ticket.py +++ b/test/test_create_request_info_support_ticket.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket +from opal_security.models.create_request_info_support_ticket import CreateRequestInfoSupportTicket class TestCreateRequestInfoSupportTicket(unittest.TestCase): """CreateRequestInfoSupportTicket unit test stubs""" diff --git a/test/test_create_resource_info.py b/test/test_create_resource_info.py index 15af456..ee82081 100644 --- a/test/test_create_resource_info.py +++ b/test/test_create_resource_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_resource_info import CreateResourceInfo +from opal_security.models.create_resource_info import CreateResourceInfo class TestCreateResourceInfo(unittest.TestCase): """CreateResourceInfo unit test stubs""" diff --git a/test/test_create_tag_info.py b/test/test_create_tag_info.py index ee00ef5..b44e38e 100644 --- a/test/test_create_tag_info.py +++ b/test/test_create_tag_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_tag_info import CreateTagInfo +from opal_security.models.create_tag_info import CreateTagInfo class TestCreateTagInfo(unittest.TestCase): """CreateTagInfo unit test stubs""" diff --git a/test/test_create_uar_info.py b/test/test_create_uar_info.py index 0ea4415..d2bc1d0 100644 --- a/test/test_create_uar_info.py +++ b/test/test_create_uar_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.create_uar_info import CreateUARInfo +from opal_security.models.create_uar_info import CreateUARInfo class TestCreateUARInfo(unittest.TestCase): """CreateUARInfo unit test stubs""" diff --git a/test/test_entity_type_enum.py b/test/test_entity_type_enum.py index 66caaed..8fc42ad 100644 --- a/test/test_entity_type_enum.py +++ b/test/test_entity_type_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.entity_type_enum import EntityTypeEnum +import opal_security +from opal_security.models.entity_type_enum import EntityTypeEnum class TestEntityTypeEnum(unittest.TestCase): diff --git a/test/test_event.py b/test/test_event.py index 2d4f137..7f8043a 100644 --- a/test/test_event.py +++ b/test/test_event.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.event import Event +import opal_security +from opal_security.models.event import Event class TestEvent(unittest.TestCase): diff --git a/test/test_events_api.py b/test/test_events_api.py index 89256a3..1ded6e9 100644 --- a/test/test_events_api.py +++ b/test/test_events_api.py @@ -11,8 +11,8 @@ import unittest -import opal -from opal.api.events_api import EventsApi # noqa: E501 +import opal_security +from opal_security.api.events_api import EventsApi # noqa: E501 class TestEventsApi(unittest.TestCase): diff --git a/test/test_group.py b/test/test_group.py index bfd2ca9..60f6ce1 100644 --- a/test/test_group.py +++ b/test/test_group.py @@ -12,14 +12,12 @@ import sys import unittest -import opal -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 +import opal_security +from opal_security.models.group_type_enum import GroupTypeEnum +from opal_security.models.visibility_type_enum import VisibilityTypeEnum globals()['GroupTypeEnum'] = GroupTypeEnum -globals()['VisibilityEnum'] = VisibilityEnum -from opal.model.group import Group +globals()['VisibilityTypeEnum'] = VisibilityTypeEnum +from opal_security.models.group import Group class TestGroup(unittest.TestCase): diff --git a/test/test_group_access_level.py b/test/test_group_access_level.py index 53ebdc4..b3a31fa 100644 --- a/test/test_group_access_level.py +++ b/test/test_group_access_level.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_access_level import GroupAccessLevel +from opal_security.models.group_access_level import GroupAccessLevel class TestGroupAccessLevel(unittest.TestCase): """GroupAccessLevel unit test stubs""" diff --git a/test/test_group_binding.py b/test/test_group_binding.py index cf82aba..a20f6fe 100644 --- a/test/test_group_binding.py +++ b/test/test_group_binding.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_binding import GroupBinding +from opal_security.models.group_binding import GroupBinding class TestGroupBinding(unittest.TestCase): """GroupBinding unit test stubs""" diff --git a/test/test_group_binding_group.py b/test/test_group_binding_group.py index 33df83b..d702258 100644 --- a/test/test_group_binding_group.py +++ b/test/test_group_binding_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_binding_group import GroupBindingGroup +from opal_security.models.group_binding_group import GroupBindingGroup class TestGroupBindingGroup(unittest.TestCase): """GroupBindingGroup unit test stubs""" diff --git a/test/test_group_bindings_api.py b/test/test_group_bindings_api.py index d5f4cf2..eae1485 100644 --- a/test/test_group_bindings_api.py +++ b/test/test_group_bindings_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.group_bindings_api import GroupBindingsApi +from opal_security.api.group_bindings_api import GroupBindingsApi class TestGroupBindingsApi(unittest.TestCase): diff --git a/test/test_group_function_enum.py b/test/test_group_function_enum.py deleted file mode 100644 index 1df9624..0000000 --- a/test/test_group_function_enum.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import opal -from opal.model.group_function_enum import GroupFunctionEnum - - -class TestGroupFunctionEnum(unittest.TestCase): - """GroupFunctionEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGroupFunctionEnum(self): - """Test GroupFunctionEnum""" - # FIXME: construct object with mandatory attributes with example values - # model = GroupFunctionEnum() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_group_remote_info.py b/test/test_group_remote_info.py index 9049ba0..2f92fe5 100644 --- a/test/test_group_remote_info.py +++ b/test/test_group_remote_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info import GroupRemoteInfo +from opal_security.models.group_remote_info import GroupRemoteInfo class TestGroupRemoteInfo(unittest.TestCase): """GroupRemoteInfo unit test stubs""" diff --git a/test/test_group_remote_info_active_directory_group.py b/test/test_group_remote_info_active_directory_group.py index 4a7c9c6..5ad7fec 100644 --- a/test/test_group_remote_info_active_directory_group.py +++ b/test/test_group_remote_info_active_directory_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup +from opal_security.models.group_remote_info_active_directory_group import GroupRemoteInfoActiveDirectoryGroup class TestGroupRemoteInfoActiveDirectoryGroup(unittest.TestCase): """GroupRemoteInfoActiveDirectoryGroup unit test stubs""" diff --git a/test/test_group_remote_info_azure_ad_microsoft365_group.py b/test/test_group_remote_info_azure_ad_microsoft365_group.py index 56139c5..566db53 100644 --- a/test/test_group_remote_info_azure_ad_microsoft365_group.py +++ b/test/test_group_remote_info_azure_ad_microsoft365_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group +from opal_security.models.group_remote_info_azure_ad_microsoft365_group import GroupRemoteInfoAzureAdMicrosoft365Group class TestGroupRemoteInfoAzureAdMicrosoft365Group(unittest.TestCase): """GroupRemoteInfoAzureAdMicrosoft365Group unit test stubs""" diff --git a/test/test_group_remote_info_azure_ad_security_group.py b/test/test_group_remote_info_azure_ad_security_group.py index ffc546f..64a7d02 100644 --- a/test/test_group_remote_info_azure_ad_security_group.py +++ b/test/test_group_remote_info_azure_ad_security_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup +from opal_security.models.group_remote_info_azure_ad_security_group import GroupRemoteInfoAzureAdSecurityGroup class TestGroupRemoteInfoAzureAdSecurityGroup(unittest.TestCase): """GroupRemoteInfoAzureAdSecurityGroup unit test stubs""" diff --git a/test/test_group_remote_info_duo_group.py b/test/test_group_remote_info_duo_group.py index 10802ca..7b4d80a 100644 --- a/test/test_group_remote_info_duo_group.py +++ b/test/test_group_remote_info_duo_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup +from opal_security.models.group_remote_info_duo_group import GroupRemoteInfoDuoGroup class TestGroupRemoteInfoDuoGroup(unittest.TestCase): """GroupRemoteInfoDuoGroup unit test stubs""" diff --git a/test/test_group_remote_info_github_team.py b/test/test_group_remote_info_github_team.py index 21982b8..8ba01a4 100644 --- a/test/test_group_remote_info_github_team.py +++ b/test/test_group_remote_info_github_team.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam +from opal_security.models.group_remote_info_github_team import GroupRemoteInfoGithubTeam class TestGroupRemoteInfoGithubTeam(unittest.TestCase): """GroupRemoteInfoGithubTeam unit test stubs""" diff --git a/test/test_group_remote_info_gitlab_group.py b/test/test_group_remote_info_gitlab_group.py index a3848fe..9a01854 100644 --- a/test/test_group_remote_info_gitlab_group.py +++ b/test/test_group_remote_info_gitlab_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup +from opal_security.models.group_remote_info_gitlab_group import GroupRemoteInfoGitlabGroup class TestGroupRemoteInfoGitlabGroup(unittest.TestCase): """GroupRemoteInfoGitlabGroup unit test stubs""" diff --git a/test/test_group_remote_info_google_group.py b/test/test_group_remote_info_google_group.py index c73ae85..691d5e3 100644 --- a/test/test_group_remote_info_google_group.py +++ b/test/test_group_remote_info_google_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup +from opal_security.models.group_remote_info_google_group import GroupRemoteInfoGoogleGroup class TestGroupRemoteInfoGoogleGroup(unittest.TestCase): """GroupRemoteInfoGoogleGroup unit test stubs""" diff --git a/test/test_group_remote_info_ldap_group.py b/test/test_group_remote_info_ldap_group.py index 0009b77..0df4470 100644 --- a/test/test_group_remote_info_ldap_group.py +++ b/test/test_group_remote_info_ldap_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup +from opal_security.models.group_remote_info_ldap_group import GroupRemoteInfoLdapGroup class TestGroupRemoteInfoLdapGroup(unittest.TestCase): """GroupRemoteInfoLdapGroup unit test stubs""" diff --git a/test/test_group_remote_info_okta_group.py b/test/test_group_remote_info_okta_group.py index c8c57dc..74106a4 100644 --- a/test/test_group_remote_info_okta_group.py +++ b/test/test_group_remote_info_okta_group.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup +from opal_security.models.group_remote_info_okta_group import GroupRemoteInfoOktaGroup class TestGroupRemoteInfoOktaGroup(unittest.TestCase): """GroupRemoteInfoOktaGroup unit test stubs""" diff --git a/test/test_group_resource.py b/test/test_group_resource.py index 4d0e729..642aaab 100644 --- a/test/test_group_resource.py +++ b/test/test_group_resource.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_resource import GroupResource +from opal_security.models.group_resource import GroupResource class TestGroupResource(unittest.TestCase): """GroupResource unit test stubs""" diff --git a/test/test_group_resource_list.py b/test/test_group_resource_list.py index 8074608..72d7f09 100644 --- a/test/test_group_resource_list.py +++ b/test/test_group_resource_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_resource_list import GroupResourceList +from opal_security.models.group_resource_list import GroupResourceList class TestGroupResourceList(unittest.TestCase): """GroupResourceList unit test stubs""" diff --git a/test/test_group_type_enum.py b/test/test_group_type_enum.py index 4d458a8..110fa05 100644 --- a/test/test_group_type_enum.py +++ b/test/test_group_type_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.group_type_enum import GroupTypeEnum +import opal_security +from opal_security.models.group_type_enum import GroupTypeEnum class TestGroupTypeEnum(unittest.TestCase): diff --git a/test/test_group_user.py b/test/test_group_user.py index 3a28fb1..6aa30f8 100644 --- a/test/test_group_user.py +++ b/test/test_group_user.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_user import GroupUser +from opal_security.models.group_user import GroupUser class TestGroupUser(unittest.TestCase): """GroupUser unit test stubs""" diff --git a/test/test_group_user_list.py b/test/test_group_user_list.py index b940ea0..bc321bc 100644 --- a/test/test_group_user_list.py +++ b/test/test_group_user_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.group_user_list import GroupUserList +from opal_security.models.group_user_list import GroupUserList class TestGroupUserList(unittest.TestCase): """GroupUserList unit test stubs""" diff --git a/test/test_groups_api.py b/test/test_groups_api.py index 768b2b5..5d9409e 100644 --- a/test/test_groups_api.py +++ b/test/test_groups_api.py @@ -11,8 +11,8 @@ import unittest -import opal -from opal.api.groups_api import GroupsApi # noqa: E501 +import opal_security +from opal_security.api.groups_api import GroupsApi # noqa: E501 class TestGroupsApi(unittest.TestCase): diff --git a/test/test_idp_group_mapping.py b/test/test_idp_group_mapping.py index 14150b1..fe7d838 100644 --- a/test/test_idp_group_mapping.py +++ b/test/test_idp_group_mapping.py @@ -15,7 +15,7 @@ import unittest -from opal.models.idp_group_mapping import IdpGroupMapping +from opal_security.models.idp_group_mapping import IdpGroupMapping class TestIdpGroupMapping(unittest.TestCase): """IdpGroupMapping unit test stubs""" diff --git a/test/test_idp_group_mapping_list.py b/test/test_idp_group_mapping_list.py index 85c2558..0afbf99 100644 --- a/test/test_idp_group_mapping_list.py +++ b/test/test_idp_group_mapping_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.idp_group_mapping_list import IdpGroupMappingList +from opal_security.models.idp_group_mapping_list import IdpGroupMappingList class TestIdpGroupMappingList(unittest.TestCase): """IdpGroupMappingList unit test stubs""" diff --git a/test/test_idp_group_mappings_api.py b/test/test_idp_group_mappings_api.py index 5fd9724..dbe6fc7 100644 --- a/test/test_idp_group_mappings_api.py +++ b/test/test_idp_group_mappings_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.idp_group_mappings_api import IdpGroupMappingsApi +from opal_security.api.idp_group_mappings_api import IdpGroupMappingsApi class TestIdpGroupMappingsApi(unittest.TestCase): diff --git a/test/test_message_channel.py b/test/test_message_channel.py index 0e11683..5c0c700 100644 --- a/test/test_message_channel.py +++ b/test/test_message_channel.py @@ -12,12 +12,10 @@ import sys import unittest -import opal -from opal.model.message_channel_provider_enum import MessageChannelProviderEnum -from opal.model.message_channel_type_enum import MessageChannelTypeEnum +import opal_security +from opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum globals()['MessageChannelProviderEnum'] = MessageChannelProviderEnum -globals()['MessageChannelTypeEnum'] = MessageChannelTypeEnum -from opal.model.message_channel import MessageChannel +from opal_security.models.message_channel import MessageChannel class TestMessageChannel(unittest.TestCase): diff --git a/test/test_message_channel_id_list.py b/test/test_message_channel_id_list.py index fa7c428..865bf84 100644 --- a/test/test_message_channel_id_list.py +++ b/test/test_message_channel_id_list.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.message_channel_id_list import MessageChannelIDList +import opal_security +from opal_security.models.message_channel_id_list import MessageChannelIDList class TestMessageChannelIDList(unittest.TestCase): diff --git a/test/test_message_channel_list.py b/test/test_message_channel_list.py index a3006e9..c9c3f70 100644 --- a/test/test_message_channel_list.py +++ b/test/test_message_channel_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.message_channel import MessageChannel +import opal_security +from opal_security.models.message_channel import MessageChannel globals()['MessageChannel'] = MessageChannel -from opal.model.message_channel_list import MessageChannelList +from opal_security.models.message_channel_list import MessageChannelList class TestMessageChannelList(unittest.TestCase): diff --git a/test/test_message_channel_provider_enum.py b/test/test_message_channel_provider_enum.py index 9fc4084..b5bc8d7 100644 --- a/test/test_message_channel_provider_enum.py +++ b/test/test_message_channel_provider_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.message_channel_provider_enum import MessageChannelProviderEnum +import opal_security +from opal_security.models.message_channel_provider_enum import MessageChannelProviderEnum class TestMessageChannelProviderEnum(unittest.TestCase): diff --git a/test/test_message_channel_type_enum.py b/test/test_message_channel_type_enum.py deleted file mode 100644 index 805e220..0000000 --- a/test/test_message_channel_type_enum.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import opal -from opal.model.message_channel_type_enum import MessageChannelTypeEnum - - -class TestMessageChannelTypeEnum(unittest.TestCase): - """MessageChannelTypeEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMessageChannelTypeEnum(self): - """Test MessageChannelTypeEnum""" - # FIXME: construct object with mandatory attributes with example values - # model = MessageChannelTypeEnum() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_message_channels_api.py b/test/test_message_channels_api.py index 34c1d23..3ae2092 100644 --- a/test/test_message_channels_api.py +++ b/test/test_message_channels_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.message_channels_api import MessageChannelsApi +from opal_security.api.message_channels_api import MessageChannelsApi class TestMessageChannelsApi(unittest.TestCase): diff --git a/test/test_new_admin_id_list.py b/test/test_new_admin_id_list.py deleted file mode 100644 index 06c9488..0000000 --- a/test/test_new_admin_id_list.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import opal -from opal.model.new_admin_id_list import NewAdminIDList - - -class TestNewAdminIDList(unittest.TestCase): - """NewAdminIDList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNewAdminIDList(self): - """Test NewAdminIDList""" - # FIXME: construct object with mandatory attributes with example values - # model = NewAdminIDList() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_non_human_identities_api.py b/test/test_non_human_identities_api.py index ead3aa7..7a3b324 100644 --- a/test/test_non_human_identities_api.py +++ b/test/test_non_human_identities_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.non_human_identities_api import NonHumanIdentitiesApi +from opal_security.api.non_human_identities_api import NonHumanIdentitiesApi class TestNonHumanIdentitiesApi(unittest.TestCase): diff --git a/test/test_on_call_schedule.py b/test/test_on_call_schedule.py index c751b78..71ad388 100644 --- a/test/test_on_call_schedule.py +++ b/test/test_on_call_schedule.py @@ -15,7 +15,7 @@ import unittest -from opal.models.on_call_schedule import OnCallSchedule +from opal_security.models.on_call_schedule import OnCallSchedule class TestOnCallSchedule(unittest.TestCase): """OnCallSchedule unit test stubs""" diff --git a/test/test_on_call_schedule_id_list.py b/test/test_on_call_schedule_id_list.py index 7956885..0d19a8b 100644 --- a/test/test_on_call_schedule_id_list.py +++ b/test/test_on_call_schedule_id_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.on_call_schedule_id_list import OnCallScheduleIDList +from opal_security.models.on_call_schedule_id_list import OnCallScheduleIDList class TestOnCallScheduleIDList(unittest.TestCase): """OnCallScheduleIDList unit test stubs""" diff --git a/test/test_on_call_schedule_list.py b/test/test_on_call_schedule_list.py index 8efb704..78fbe94 100644 --- a/test/test_on_call_schedule_list.py +++ b/test/test_on_call_schedule_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.on_call_schedule_list import OnCallScheduleList +from opal_security.models.on_call_schedule_list import OnCallScheduleList class TestOnCallScheduleList(unittest.TestCase): """OnCallScheduleList unit test stubs""" diff --git a/test/test_on_call_schedule_provider_enum.py b/test/test_on_call_schedule_provider_enum.py index d7e7be7..5e524e7 100644 --- a/test/test_on_call_schedule_provider_enum.py +++ b/test/test_on_call_schedule_provider_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum +from opal_security.models.on_call_schedule_provider_enum import OnCallScheduleProviderEnum class TestOnCallScheduleProviderEnum(unittest.TestCase): """OnCallScheduleProviderEnum unit test stubs""" diff --git a/test/test_on_call_schedules_api.py b/test/test_on_call_schedules_api.py index 4c53729..dc240db 100644 --- a/test/test_on_call_schedules_api.py +++ b/test/test_on_call_schedules_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.on_call_schedules_api import OnCallSchedulesApi +from opal_security.api.on_call_schedules_api import OnCallSchedulesApi class TestOnCallSchedulesApi(unittest.TestCase): diff --git a/test/test_owner.py b/test/test_owner.py index 945153b..c62de1b 100644 --- a/test/test_owner.py +++ b/test/test_owner.py @@ -15,7 +15,7 @@ import unittest -from opal.models.owner import Owner +from opal_security.models.owner import Owner class TestOwner(unittest.TestCase): """Owner unit test stubs""" diff --git a/test/test_owners_api.py b/test/test_owners_api.py index 15091bc..7f5ad51 100644 --- a/test/test_owners_api.py +++ b/test/test_owners_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.owners_api import OwnersApi +from opal_security.api.owners_api import OwnersApi class TestOwnersApi(unittest.TestCase): diff --git a/test/test_paginated_configuration_template_list.py b/test/test_paginated_configuration_template_list.py index 66eb756..42ca2df 100644 --- a/test/test_paginated_configuration_template_list.py +++ b/test/test_paginated_configuration_template_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList +from opal_security.models.paginated_configuration_template_list import PaginatedConfigurationTemplateList class TestPaginatedConfigurationTemplateList(unittest.TestCase): """PaginatedConfigurationTemplateList unit test stubs""" diff --git a/test/test_paginated_event_list.py b/test/test_paginated_event_list.py index 11924f5..df74572 100644 --- a/test/test_paginated_event_list.py +++ b/test/test_paginated_event_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.event import Event +import opal_security +from opal_security.models.event import Event globals()['Event'] = Event -from opal.model.paginated_event_list import PaginatedEventList +from opal_security.models.paginated_event_list import PaginatedEventList class TestPaginatedEventList(unittest.TestCase): diff --git a/test/test_paginated_group_bindings_list.py b/test/test_paginated_group_bindings_list.py index 66ed70e..885cf9b 100644 --- a/test/test_paginated_group_bindings_list.py +++ b/test/test_paginated_group_bindings_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.paginated_group_bindings_list import PaginatedGroupBindingsList +from opal_security.models.paginated_group_bindings_list import PaginatedGroupBindingsList class TestPaginatedGroupBindingsList(unittest.TestCase): """PaginatedGroupBindingsList unit test stubs""" diff --git a/test/test_paginated_groups_list.py b/test/test_paginated_groups_list.py index c244275..0f1a75f 100644 --- a/test/test_paginated_groups_list.py +++ b/test/test_paginated_groups_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.group import Group +import opal_security +from opal_security.models.group import Group globals()['Group'] = Group -from opal.model.paginated_groups_list import PaginatedGroupsList +from opal_security.models.paginated_groups_list import PaginatedGroupsList class TestPaginatedGroupsList(unittest.TestCase): diff --git a/test/test_paginated_owners_list.py b/test/test_paginated_owners_list.py index 5dfed98..43d2290 100644 --- a/test/test_paginated_owners_list.py +++ b/test/test_paginated_owners_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.paginated_owners_list import PaginatedOwnersList +from opal_security.models.paginated_owners_list import PaginatedOwnersList class TestPaginatedOwnersList(unittest.TestCase): """PaginatedOwnersList unit test stubs""" diff --git a/test/test_paginated_resource_user_list.py b/test/test_paginated_resource_user_list.py deleted file mode 100644 index e300d5f..0000000 --- a/test/test_paginated_resource_user_list.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import opal -from opal.model.resource_user import ResourceUser -globals()['ResourceUser'] = ResourceUser -from opal.model.paginated_resource_user_list import PaginatedResourceUserList - - -class TestPaginatedResourceUserList(unittest.TestCase): - """PaginatedResourceUserList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPaginatedResourceUserList(self): - """Test PaginatedResourceUserList""" - # FIXME: construct object with mandatory attributes with example values - # model = PaginatedResourceUserList() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_paginated_resources_list.py b/test/test_paginated_resources_list.py index f941d0e..b204cc1 100644 --- a/test/test_paginated_resources_list.py +++ b/test/test_paginated_resources_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.resource import Resource +import opal_security +from opal_security.models.resource import Resource globals()['Resource'] = Resource -from opal.model.paginated_resources_list import PaginatedResourcesList +from opal_security.models.paginated_resources_list import PaginatedResourcesList class TestPaginatedResourcesList(unittest.TestCase): diff --git a/test/test_paginated_tags_list.py b/test/test_paginated_tags_list.py index 5a506ad..d270fcc 100644 --- a/test/test_paginated_tags_list.py +++ b/test/test_paginated_tags_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.paginated_tags_list import PaginatedTagsList +from opal_security.models.paginated_tags_list import PaginatedTagsList class TestPaginatedTagsList(unittest.TestCase): """PaginatedTagsList unit test stubs""" diff --git a/test/test_paginated_uars_list.py b/test/test_paginated_uars_list.py index 065b8de..a3c1b21 100644 --- a/test/test_paginated_uars_list.py +++ b/test/test_paginated_uars_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.paginated_uars_list import PaginatedUARsList +from opal_security.models.paginated_uars_list import PaginatedUARsList class TestPaginatedUARsList(unittest.TestCase): """PaginatedUARsList unit test stubs""" diff --git a/test/test_paginated_users_list.py b/test/test_paginated_users_list.py index 4c2cf2b..0a0134d 100644 --- a/test/test_paginated_users_list.py +++ b/test/test_paginated_users_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.paginated_users_list import PaginatedUsersList +from opal_security.models.paginated_users_list import PaginatedUsersList class TestPaginatedUsersList(unittest.TestCase): """PaginatedUsersList unit test stubs""" diff --git a/test/test_request.py b/test/test_request.py index 80b5f0c..422b808 100644 --- a/test/test_request.py +++ b/test/test_request.py @@ -15,7 +15,7 @@ import unittest -from opal.models.request import Request +from opal_security.models.request import Request class TestRequest(unittest.TestCase): """Request unit test stubs""" diff --git a/test/test_request_configuration.py b/test/test_request_configuration.py index b84f31d..c5db7f4 100644 --- a/test/test_request_configuration.py +++ b/test/test_request_configuration.py @@ -15,7 +15,7 @@ import unittest -from opal.models.request_configuration import RequestConfiguration +from opal_security.models.request_configuration import RequestConfiguration class TestRequestConfiguration(unittest.TestCase): """RequestConfiguration unit test stubs""" diff --git a/test/test_request_custom_field_response.py b/test/test_request_custom_field_response.py index 8fde4c8..9648853 100644 --- a/test/test_request_custom_field_response.py +++ b/test/test_request_custom_field_response.py @@ -15,7 +15,7 @@ import unittest -from opal.models.request_custom_field_response import RequestCustomFieldResponse +from opal_security.models.request_custom_field_response import RequestCustomFieldResponse class TestRequestCustomFieldResponse(unittest.TestCase): """RequestCustomFieldResponse unit test stubs""" diff --git a/test/test_request_custom_field_response_field_value.py b/test/test_request_custom_field_response_field_value.py index 128d1c1..e58c897 100644 --- a/test/test_request_custom_field_response_field_value.py +++ b/test/test_request_custom_field_response_field_value.py @@ -15,7 +15,7 @@ import unittest -from opal.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue +from opal_security.models.request_custom_field_response_field_value import RequestCustomFieldResponseFieldValue class TestRequestCustomFieldResponseFieldValue(unittest.TestCase): """RequestCustomFieldResponseFieldValue unit test stubs""" diff --git a/test/test_request_list.py b/test/test_request_list.py index 382695a..bc82280 100644 --- a/test/test_request_list.py +++ b/test/test_request_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.request_list import RequestList +from opal_security.models.request_list import RequestList class TestRequestList(unittest.TestCase): """RequestList unit test stubs""" diff --git a/test/test_request_status_enum.py b/test/test_request_status_enum.py index 716ac99..a692450 100644 --- a/test/test_request_status_enum.py +++ b/test/test_request_status_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.request_status_enum import RequestStatusEnum +from opal_security.models.request_status_enum import RequestStatusEnum class TestRequestStatusEnum(unittest.TestCase): """RequestStatusEnum unit test stubs""" diff --git a/test/test_request_template_custom_field_type_enum.py b/test/test_request_template_custom_field_type_enum.py index edc9902..b45be43 100644 --- a/test/test_request_template_custom_field_type_enum.py +++ b/test/test_request_template_custom_field_type_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum +from opal_security.models.request_template_custom_field_type_enum import RequestTemplateCustomFieldTypeEnum class TestRequestTemplateCustomFieldTypeEnum(unittest.TestCase): """RequestTemplateCustomFieldTypeEnum unit test stubs""" diff --git a/test/test_requested_item.py b/test/test_requested_item.py index 9bfd3d8..7deac8c 100644 --- a/test/test_requested_item.py +++ b/test/test_requested_item.py @@ -15,7 +15,7 @@ import unittest -from opal.models.requested_item import RequestedItem +from opal_security.models.requested_item import RequestedItem class TestRequestedItem(unittest.TestCase): """RequestedItem unit test stubs""" diff --git a/test/test_requests_api.py b/test/test_requests_api.py index b079844..ccacc42 100644 --- a/test/test_requests_api.py +++ b/test/test_requests_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.requests_api import RequestsApi +from opal_security.api.requests_api import RequestsApi class TestRequestsApi(unittest.TestCase): diff --git a/test/test_resource.py b/test/test_resource.py index f52e12c..2d6182b 100644 --- a/test/test_resource.py +++ b/test/test_resource.py @@ -12,12 +12,12 @@ import sys import unittest -import opal -from opal.model.resource_type_enum import ResourceTypeEnum -from opal.model.visibility_enum import VisibilityEnum +import opal_security +from opal_security.models.resource_type_enum import ResourceTypeEnum +from opal_security.models.visibility_type_enum import VisibilityTypeEnum globals()['ResourceTypeEnum'] = ResourceTypeEnum -globals()['VisibilityEnum'] = VisibilityEnum -from opal.model.resource import Resource +globals()['VisibilityTypeEnum'] = VisibilityTypeEnum +from opal_security.models.resource import Resource class TestResource(unittest.TestCase): diff --git a/test/test_resource_access_level.py b/test/test_resource_access_level.py index 6d07a96..718bb79 100644 --- a/test/test_resource_access_level.py +++ b/test/test_resource_access_level.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.resource_access_level import ResourceAccessLevel +import opal_security +from opal_security.models.resource_access_level import ResourceAccessLevel class TestResourceAccessLevel(unittest.TestCase): diff --git a/test/test_resource_access_user.py b/test/test_resource_access_user.py index 753a453..7ec350f 100644 --- a/test/test_resource_access_user.py +++ b/test/test_resource_access_user.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_access_user import ResourceAccessUser +from opal_security.models.resource_access_user import ResourceAccessUser class TestResourceAccessUser(unittest.TestCase): """ResourceAccessUser unit test stubs""" diff --git a/test/test_resource_access_user_list.py b/test/test_resource_access_user_list.py index f821ee0..355d7b4 100644 --- a/test/test_resource_access_user_list.py +++ b/test/test_resource_access_user_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_access_user_list import ResourceAccessUserList +from opal_security.models.resource_access_user_list import ResourceAccessUserList class TestResourceAccessUserList(unittest.TestCase): """ResourceAccessUserList unit test stubs""" diff --git a/test/test_resource_nhi.py b/test/test_resource_nhi.py index 1397b74..2ff63e1 100644 --- a/test/test_resource_nhi.py +++ b/test/test_resource_nhi.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_nhi import ResourceNHI +from opal_security.models.resource_nhi import ResourceNHI class TestResourceNHI(unittest.TestCase): """ResourceNHI unit test stubs""" diff --git a/test/test_resource_remote_info.py b/test/test_resource_remote_info.py index d4d994e..6aec382 100644 --- a/test/test_resource_remote_info.py +++ b/test/test_resource_remote_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info import ResourceRemoteInfo +from opal_security.models.resource_remote_info import ResourceRemoteInfo class TestResourceRemoteInfo(unittest.TestCase): """ResourceRemoteInfo unit test stubs""" diff --git a/test/test_resource_remote_info_aws_account.py b/test/test_resource_remote_info_aws_account.py index 141fb42..7bc046b 100644 --- a/test/test_resource_remote_info_aws_account.py +++ b/test/test_resource_remote_info_aws_account.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount +from opal_security.models.resource_remote_info_aws_account import ResourceRemoteInfoAwsAccount class TestResourceRemoteInfoAwsAccount(unittest.TestCase): """ResourceRemoteInfoAwsAccount unit test stubs""" diff --git a/test/test_resource_remote_info_aws_ec2_instance.py b/test/test_resource_remote_info_aws_ec2_instance.py index 2d32c9a..40bdaa9 100644 --- a/test/test_resource_remote_info_aws_ec2_instance.py +++ b/test/test_resource_remote_info_aws_ec2_instance.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance +from opal_security.models.resource_remote_info_aws_ec2_instance import ResourceRemoteInfoAwsEc2Instance class TestResourceRemoteInfoAwsEc2Instance(unittest.TestCase): """ResourceRemoteInfoAwsEc2Instance unit test stubs""" diff --git a/test/test_resource_remote_info_aws_eks_cluster.py b/test/test_resource_remote_info_aws_eks_cluster.py index b97936b..fb35e11 100644 --- a/test/test_resource_remote_info_aws_eks_cluster.py +++ b/test/test_resource_remote_info_aws_eks_cluster.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster +from opal_security.models.resource_remote_info_aws_eks_cluster import ResourceRemoteInfoAwsEksCluster class TestResourceRemoteInfoAwsEksCluster(unittest.TestCase): """ResourceRemoteInfoAwsEksCluster unit test stubs""" diff --git a/test/test_resource_remote_info_aws_iam_role.py b/test/test_resource_remote_info_aws_iam_role.py index 53bb46b..bd66f0a 100644 --- a/test/test_resource_remote_info_aws_iam_role.py +++ b/test/test_resource_remote_info_aws_iam_role.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole +from opal_security.models.resource_remote_info_aws_iam_role import ResourceRemoteInfoAwsIamRole class TestResourceRemoteInfoAwsIamRole(unittest.TestCase): """ResourceRemoteInfoAwsIamRole unit test stubs""" diff --git a/test/test_resource_remote_info_aws_permission_set.py b/test/test_resource_remote_info_aws_permission_set.py index 4632eb2..56b7b87 100644 --- a/test/test_resource_remote_info_aws_permission_set.py +++ b/test/test_resource_remote_info_aws_permission_set.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet +from opal_security.models.resource_remote_info_aws_permission_set import ResourceRemoteInfoAwsPermissionSet class TestResourceRemoteInfoAwsPermissionSet(unittest.TestCase): """ResourceRemoteInfoAwsPermissionSet unit test stubs""" diff --git a/test/test_resource_remote_info_aws_rds_instance.py b/test/test_resource_remote_info_aws_rds_instance.py index b590bac..63630e7 100644 --- a/test/test_resource_remote_info_aws_rds_instance.py +++ b/test/test_resource_remote_info_aws_rds_instance.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance +from opal_security.models.resource_remote_info_aws_rds_instance import ResourceRemoteInfoAwsRdsInstance class TestResourceRemoteInfoAwsRdsInstance(unittest.TestCase): """ResourceRemoteInfoAwsRdsInstance unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_big_query_dataset.py b/test/test_resource_remote_info_gcp_big_query_dataset.py index 43cb393..700e22b 100644 --- a/test/test_resource_remote_info_gcp_big_query_dataset.py +++ b/test/test_resource_remote_info_gcp_big_query_dataset.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset +from opal_security.models.resource_remote_info_gcp_big_query_dataset import ResourceRemoteInfoGcpBigQueryDataset class TestResourceRemoteInfoGcpBigQueryDataset(unittest.TestCase): """ResourceRemoteInfoGcpBigQueryDataset unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_big_query_table.py b/test/test_resource_remote_info_gcp_big_query_table.py index 2a2e712..7e13c58 100644 --- a/test/test_resource_remote_info_gcp_big_query_table.py +++ b/test/test_resource_remote_info_gcp_big_query_table.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable +from opal_security.models.resource_remote_info_gcp_big_query_table import ResourceRemoteInfoGcpBigQueryTable class TestResourceRemoteInfoGcpBigQueryTable(unittest.TestCase): """ResourceRemoteInfoGcpBigQueryTable unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_bucket.py b/test/test_resource_remote_info_gcp_bucket.py index dda69fd..46c8f93 100644 --- a/test/test_resource_remote_info_gcp_bucket.py +++ b/test/test_resource_remote_info_gcp_bucket.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket +from opal_security.models.resource_remote_info_gcp_bucket import ResourceRemoteInfoGcpBucket class TestResourceRemoteInfoGcpBucket(unittest.TestCase): """ResourceRemoteInfoGcpBucket unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_compute_instance.py b/test/test_resource_remote_info_gcp_compute_instance.py index 34feee6..a559db3 100644 --- a/test/test_resource_remote_info_gcp_compute_instance.py +++ b/test/test_resource_remote_info_gcp_compute_instance.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance +from opal_security.models.resource_remote_info_gcp_compute_instance import ResourceRemoteInfoGcpComputeInstance class TestResourceRemoteInfoGcpComputeInstance(unittest.TestCase): """ResourceRemoteInfoGcpComputeInstance unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_folder.py b/test/test_resource_remote_info_gcp_folder.py index 09ea08c..9a8a5c4 100644 --- a/test/test_resource_remote_info_gcp_folder.py +++ b/test/test_resource_remote_info_gcp_folder.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder +from opal_security.models.resource_remote_info_gcp_folder import ResourceRemoteInfoGcpFolder class TestResourceRemoteInfoGcpFolder(unittest.TestCase): """ResourceRemoteInfoGcpFolder unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_gke_cluster.py b/test/test_resource_remote_info_gcp_gke_cluster.py index 2398661..6d9d9e4 100644 --- a/test/test_resource_remote_info_gcp_gke_cluster.py +++ b/test/test_resource_remote_info_gcp_gke_cluster.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster +from opal_security.models.resource_remote_info_gcp_gke_cluster import ResourceRemoteInfoGcpGkeCluster class TestResourceRemoteInfoGcpGkeCluster(unittest.TestCase): """ResourceRemoteInfoGcpGkeCluster unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_organization.py b/test/test_resource_remote_info_gcp_organization.py index 08858c5..06499cf 100644 --- a/test/test_resource_remote_info_gcp_organization.py +++ b/test/test_resource_remote_info_gcp_organization.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization +from opal_security.models.resource_remote_info_gcp_organization import ResourceRemoteInfoGcpOrganization class TestResourceRemoteInfoGcpOrganization(unittest.TestCase): """ResourceRemoteInfoGcpOrganization unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_project.py b/test/test_resource_remote_info_gcp_project.py index 575f78b..800ffd3 100644 --- a/test/test_resource_remote_info_gcp_project.py +++ b/test/test_resource_remote_info_gcp_project.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject +from opal_security.models.resource_remote_info_gcp_project import ResourceRemoteInfoGcpProject class TestResourceRemoteInfoGcpProject(unittest.TestCase): """ResourceRemoteInfoGcpProject unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_service_account.py b/test/test_resource_remote_info_gcp_service_account.py index 066da03..a5b4b3d 100644 --- a/test/test_resource_remote_info_gcp_service_account.py +++ b/test/test_resource_remote_info_gcp_service_account.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount +from opal_security.models.resource_remote_info_gcp_service_account import ResourceRemoteInfoGcpServiceAccount class TestResourceRemoteInfoGcpServiceAccount(unittest.TestCase): """ResourceRemoteInfoGcpServiceAccount unit test stubs""" diff --git a/test/test_resource_remote_info_gcp_sql_instance.py b/test/test_resource_remote_info_gcp_sql_instance.py index 7adead7..ae98210 100644 --- a/test/test_resource_remote_info_gcp_sql_instance.py +++ b/test/test_resource_remote_info_gcp_sql_instance.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance +from opal_security.models.resource_remote_info_gcp_sql_instance import ResourceRemoteInfoGcpSqlInstance class TestResourceRemoteInfoGcpSqlInstance(unittest.TestCase): """ResourceRemoteInfoGcpSqlInstance unit test stubs""" diff --git a/test/test_resource_remote_info_github_repo.py b/test/test_resource_remote_info_github_repo.py index f8dc285..bfeff5e 100644 --- a/test/test_resource_remote_info_github_repo.py +++ b/test/test_resource_remote_info_github_repo.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo +from opal_security.models.resource_remote_info_github_repo import ResourceRemoteInfoGithubRepo class TestResourceRemoteInfoGithubRepo(unittest.TestCase): """ResourceRemoteInfoGithubRepo unit test stubs""" diff --git a/test/test_resource_remote_info_gitlab_project.py b/test/test_resource_remote_info_gitlab_project.py index 6b0045f..38ae6ed 100644 --- a/test/test_resource_remote_info_gitlab_project.py +++ b/test/test_resource_remote_info_gitlab_project.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject +from opal_security.models.resource_remote_info_gitlab_project import ResourceRemoteInfoGitlabProject class TestResourceRemoteInfoGitlabProject(unittest.TestCase): """ResourceRemoteInfoGitlabProject unit test stubs""" diff --git a/test/test_resource_remote_info_okta_app.py b/test/test_resource_remote_info_okta_app.py index 5bb7f30..e9aff57 100644 --- a/test/test_resource_remote_info_okta_app.py +++ b/test/test_resource_remote_info_okta_app.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp +from opal_security.models.resource_remote_info_okta_app import ResourceRemoteInfoOktaApp class TestResourceRemoteInfoOktaApp(unittest.TestCase): """ResourceRemoteInfoOktaApp unit test stubs""" diff --git a/test/test_resource_remote_info_okta_custom_role.py b/test/test_resource_remote_info_okta_custom_role.py index 95951ee..6a84d6d 100644 --- a/test/test_resource_remote_info_okta_custom_role.py +++ b/test/test_resource_remote_info_okta_custom_role.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole +from opal_security.models.resource_remote_info_okta_custom_role import ResourceRemoteInfoOktaCustomRole class TestResourceRemoteInfoOktaCustomRole(unittest.TestCase): """ResourceRemoteInfoOktaCustomRole unit test stubs""" diff --git a/test/test_resource_remote_info_okta_standard_role.py b/test/test_resource_remote_info_okta_standard_role.py index fa156a3..5a14a3a 100644 --- a/test/test_resource_remote_info_okta_standard_role.py +++ b/test/test_resource_remote_info_okta_standard_role.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole +from opal_security.models.resource_remote_info_okta_standard_role import ResourceRemoteInfoOktaStandardRole class TestResourceRemoteInfoOktaStandardRole(unittest.TestCase): """ResourceRemoteInfoOktaStandardRole unit test stubs""" diff --git a/test/test_resource_remote_info_pagerduty_role.py b/test/test_resource_remote_info_pagerduty_role.py index e3f9e44..77e992f 100644 --- a/test/test_resource_remote_info_pagerduty_role.py +++ b/test/test_resource_remote_info_pagerduty_role.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole +from opal_security.models.resource_remote_info_pagerduty_role import ResourceRemoteInfoPagerdutyRole class TestResourceRemoteInfoPagerdutyRole(unittest.TestCase): """ResourceRemoteInfoPagerdutyRole unit test stubs""" diff --git a/test/test_resource_remote_info_salesforce_permission_set.py b/test/test_resource_remote_info_salesforce_permission_set.py index 4ff4882..4cb8abe 100644 --- a/test/test_resource_remote_info_salesforce_permission_set.py +++ b/test/test_resource_remote_info_salesforce_permission_set.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet +from opal_security.models.resource_remote_info_salesforce_permission_set import ResourceRemoteInfoSalesforcePermissionSet class TestResourceRemoteInfoSalesforcePermissionSet(unittest.TestCase): """ResourceRemoteInfoSalesforcePermissionSet unit test stubs""" diff --git a/test/test_resource_remote_info_salesforce_profile.py b/test/test_resource_remote_info_salesforce_profile.py index 01af6c9..33736eb 100644 --- a/test/test_resource_remote_info_salesforce_profile.py +++ b/test/test_resource_remote_info_salesforce_profile.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile +from opal_security.models.resource_remote_info_salesforce_profile import ResourceRemoteInfoSalesforceProfile class TestResourceRemoteInfoSalesforceProfile(unittest.TestCase): """ResourceRemoteInfoSalesforceProfile unit test stubs""" diff --git a/test/test_resource_remote_info_salesforce_role.py b/test/test_resource_remote_info_salesforce_role.py index 772d614..575f522 100644 --- a/test/test_resource_remote_info_salesforce_role.py +++ b/test/test_resource_remote_info_salesforce_role.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole +from opal_security.models.resource_remote_info_salesforce_role import ResourceRemoteInfoSalesforceRole class TestResourceRemoteInfoSalesforceRole(unittest.TestCase): """ResourceRemoteInfoSalesforceRole unit test stubs""" diff --git a/test/test_resource_remote_info_teleport_role.py b/test/test_resource_remote_info_teleport_role.py index 2be677f..f1cc558 100644 --- a/test/test_resource_remote_info_teleport_role.py +++ b/test/test_resource_remote_info_teleport_role.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole +from opal_security.models.resource_remote_info_teleport_role import ResourceRemoteInfoTeleportRole class TestResourceRemoteInfoTeleportRole(unittest.TestCase): """ResourceRemoteInfoTeleportRole unit test stubs""" diff --git a/test/test_resource_type_enum.py b/test/test_resource_type_enum.py index c69069a..ea85f24 100644 --- a/test/test_resource_type_enum.py +++ b/test/test_resource_type_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.resource_type_enum import ResourceTypeEnum +import opal_security +from opal_security.models.resource_type_enum import ResourceTypeEnum class TestResourceTypeEnum(unittest.TestCase): diff --git a/test/test_resource_user.py b/test/test_resource_user.py index 98fbdac..87a6036 100644 --- a/test/test_resource_user.py +++ b/test/test_resource_user.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.resource_access_level import ResourceAccessLevel +import opal_security +from opal_security.models.resource_access_level import ResourceAccessLevel globals()['ResourceAccessLevel'] = ResourceAccessLevel -from opal.model.resource_user import ResourceUser +from opal_security.models.resource_user import ResourceUser class TestResourceUser(unittest.TestCase): diff --git a/test/test_resource_user_access_status.py b/test/test_resource_user_access_status.py index 7c8a3e3..0ca048f 100644 --- a/test/test_resource_user_access_status.py +++ b/test/test_resource_user_access_status.py @@ -12,12 +12,12 @@ import sys import unittest -import opal -from opal.model.resource_access_level import ResourceAccessLevel -from opal.model.resource_user_access_status_enum import ResourceUserAccessStatusEnum +import opal_security +from opal_security.models.resource_access_level import ResourceAccessLevel +from opal_security.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum globals()['ResourceAccessLevel'] = ResourceAccessLevel globals()['ResourceUserAccessStatusEnum'] = ResourceUserAccessStatusEnum -from opal.model.resource_user_access_status import ResourceUserAccessStatus +from opal_security.models.resource_user_access_status import ResourceUserAccessStatus class TestResourceUserAccessStatus(unittest.TestCase): diff --git a/test/test_resource_user_access_status_enum.py b/test/test_resource_user_access_status_enum.py index fb8b2a8..040ad63 100644 --- a/test/test_resource_user_access_status_enum.py +++ b/test/test_resource_user_access_status_enum.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.resource_user_access_status_enum import ResourceUserAccessStatusEnum +import opal_security +from opal_security.models.resource_user_access_status_enum import ResourceUserAccessStatusEnum class TestResourceUserAccessStatusEnum(unittest.TestCase): diff --git a/test/test_resource_with_access_level.py b/test/test_resource_with_access_level.py index c9ef179..cb8fa81 100644 --- a/test/test_resource_with_access_level.py +++ b/test/test_resource_with_access_level.py @@ -15,7 +15,7 @@ import unittest -from opal.models.resource_with_access_level import ResourceWithAccessLevel +from opal_security.models.resource_with_access_level import ResourceWithAccessLevel class TestResourceWithAccessLevel(unittest.TestCase): """ResourceWithAccessLevel unit test stubs""" diff --git a/test/test_resources_api.py b/test/test_resources_api.py index 75cc4d6..05958ef 100644 --- a/test/test_resources_api.py +++ b/test/test_resources_api.py @@ -11,8 +11,8 @@ import unittest -import opal -from opal.api.resources_api import ResourcesApi # noqa: E501 +import opal_security +from opal_security.api.resources_api import ResourcesApi # noqa: E501 class TestResourcesApi(unittest.TestCase): diff --git a/test/test_reviewer_id_list.py b/test/test_reviewer_id_list.py index 628680c..99c564f 100644 --- a/test/test_reviewer_id_list.py +++ b/test/test_reviewer_id_list.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.reviewer_id_list import ReviewerIDList +import opal_security +from opal_security.models.reviewer_id_list import ReviewerIDList class TestReviewerIDList(unittest.TestCase): diff --git a/test/test_reviewer_stage.py b/test/test_reviewer_stage.py index 0d10861..7089629 100644 --- a/test/test_reviewer_stage.py +++ b/test/test_reviewer_stage.py @@ -15,7 +15,7 @@ import unittest -from opal.models.reviewer_stage import ReviewerStage +from opal_security.models.reviewer_stage import ReviewerStage class TestReviewerStage(unittest.TestCase): """ReviewerStage unit test stubs""" diff --git a/test/test_reviewer_stage_list.py b/test/test_reviewer_stage_list.py index 2bbcbe6..77ac00b 100644 --- a/test/test_reviewer_stage_list.py +++ b/test/test_reviewer_stage_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.reviewer_stage_list import ReviewerStageList +from opal_security.models.reviewer_stage_list import ReviewerStageList class TestReviewerStageList(unittest.TestCase): """ReviewerStageList unit test stubs""" diff --git a/test/test_risk_sensitivity_enum.py b/test/test_risk_sensitivity_enum.py index f88d015..09e39bf 100644 --- a/test/test_risk_sensitivity_enum.py +++ b/test/test_risk_sensitivity_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.risk_sensitivity_enum import RiskSensitivityEnum +from opal_security.models.risk_sensitivity_enum import RiskSensitivityEnum class TestRiskSensitivityEnum(unittest.TestCase): """RiskSensitivityEnum unit test stubs""" diff --git a/test/test_session.py b/test/test_session.py index 73159d9..4d70446 100644 --- a/test/test_session.py +++ b/test/test_session.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.resource_access_level import ResourceAccessLevel +import opal_security +from opal_security.models.resource_access_level import ResourceAccessLevel globals()['ResourceAccessLevel'] = ResourceAccessLevel -from opal.model.session import Session +from opal_security.models.session import Session class TestSession(unittest.TestCase): diff --git a/test/test_sessions_api.py b/test/test_sessions_api.py index 6611235..942af62 100644 --- a/test/test_sessions_api.py +++ b/test/test_sessions_api.py @@ -11,8 +11,8 @@ import unittest -import opal -from opal.api.sessions_api import SessionsApi # noqa: E501 +import opal_security +from opal_security.api.sessions_api import SessionsApi # noqa: E501 class TestSessionsApi(unittest.TestCase): diff --git a/test/test_sessions_list.py b/test/test_sessions_list.py index dc03988..4d45f32 100644 --- a/test/test_sessions_list.py +++ b/test/test_sessions_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.session import Session +import opal_security +from opal_security.models.session import Session globals()['Session'] = Session -from opal.model.sessions_list import SessionsList +from opal_security.models.sessions_list import SessionsList class TestSessionsList(unittest.TestCase): diff --git a/test/test_sub_event.py b/test/test_sub_event.py index 19510f7..7c58948 100644 --- a/test/test_sub_event.py +++ b/test/test_sub_event.py @@ -15,7 +15,7 @@ import unittest -from opal.models.sub_event import SubEvent +from opal_security.models.sub_event import SubEvent class TestSubEvent(unittest.TestCase): """SubEvent unit test stubs""" diff --git a/test/test_tag.py b/test/test_tag.py index 28d7dbe..83c8f15 100644 --- a/test/test_tag.py +++ b/test/test_tag.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.tag import Tag +import opal_security +from opal_security.models.tag import Tag class TestTag(unittest.TestCase): diff --git a/test/test_tag_filter.py b/test/test_tag_filter.py index 1df1227..89bee38 100644 --- a/test/test_tag_filter.py +++ b/test/test_tag_filter.py @@ -15,7 +15,7 @@ import unittest -from opal.models.tag_filter import TagFilter +from opal_security.models.tag_filter import TagFilter class TestTagFilter(unittest.TestCase): """TagFilter unit test stubs""" diff --git a/test/test_tags_api.py b/test/test_tags_api.py index fede494..20e5c4a 100644 --- a/test/test_tags_api.py +++ b/test/test_tags_api.py @@ -11,8 +11,8 @@ import unittest -import opal -from opal.api.tags_api import TagsApi # noqa: E501 +import opal_security +from opal_security.api.tags_api import TagsApi # noqa: E501 class TestTagsApi(unittest.TestCase): diff --git a/test/test_tags_list.py b/test/test_tags_list.py index 49a03ba..7592630 100644 --- a/test/test_tags_list.py +++ b/test/test_tags_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.tag import Tag +import opal_security +from opal_security.models.tag import Tag globals()['Tag'] = Tag -from opal.model.tags_list import TagsList +from opal_security.models.tags_list import TagsList class TestTagsList(unittest.TestCase): diff --git a/test/test_ticket_propagation_configuration.py b/test/test_ticket_propagation_configuration.py index f4f8334..15bfe95 100644 --- a/test/test_ticket_propagation_configuration.py +++ b/test/test_ticket_propagation_configuration.py @@ -15,7 +15,7 @@ import unittest -from opal.models.ticket_propagation_configuration import TicketPropagationConfiguration +from opal_security.models.ticket_propagation_configuration import TicketPropagationConfiguration class TestTicketPropagationConfiguration(unittest.TestCase): """TicketPropagationConfiguration unit test stubs""" diff --git a/test/test_ticketing_provider_enum.py b/test/test_ticketing_provider_enum.py index 8f58438..0af07cb 100644 --- a/test/test_ticketing_provider_enum.py +++ b/test/test_ticketing_provider_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.ticketing_provider_enum import TicketingProviderEnum +from opal_security.models.ticketing_provider_enum import TicketingProviderEnum class TestTicketingProviderEnum(unittest.TestCase): """TicketingProviderEnum unit test stubs""" diff --git a/test/test_uar.py b/test/test_uar.py index 6852e4b..bea933a 100644 --- a/test/test_uar.py +++ b/test/test_uar.py @@ -15,7 +15,7 @@ import unittest -from opal.models.uar import UAR +from opal_security.models.uar import UAR class TestUAR(unittest.TestCase): """UAR unit test stubs""" diff --git a/test/test_uar_reviewer_assignment_policy_enum.py b/test/test_uar_reviewer_assignment_policy_enum.py index a5e25d7..215831b 100644 --- a/test/test_uar_reviewer_assignment_policy_enum.py +++ b/test/test_uar_reviewer_assignment_policy_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum +from opal_security.models.uar_reviewer_assignment_policy_enum import UARReviewerAssignmentPolicyEnum class TestUARReviewerAssignmentPolicyEnum(unittest.TestCase): """UARReviewerAssignmentPolicyEnum unit test stubs""" diff --git a/test/test_uar_scope.py b/test/test_uar_scope.py index cb61b57..1af0dfc 100644 --- a/test/test_uar_scope.py +++ b/test/test_uar_scope.py @@ -15,7 +15,7 @@ import unittest -from opal.models.uar_scope import UARScope +from opal_security.models.uar_scope import UARScope class TestUARScope(unittest.TestCase): """UARScope unit test stubs""" diff --git a/test/test_uars_api.py b/test/test_uars_api.py index 45f75fe..5a6b867 100644 --- a/test/test_uars_api.py +++ b/test/test_uars_api.py @@ -15,7 +15,7 @@ import unittest -from opal.api.uars_api import UarsApi +from opal_security.api.uars_api import UarsApi class TestUarsApi(unittest.TestCase): diff --git a/test/test_update_configuration_template_info.py b/test/test_update_configuration_template_info.py index 919d4e0..f447ce6 100644 --- a/test/test_update_configuration_template_info.py +++ b/test/test_update_configuration_template_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_configuration_template_info import UpdateConfigurationTemplateInfo +from opal_security.models.update_configuration_template_info import UpdateConfigurationTemplateInfo class TestUpdateConfigurationTemplateInfo(unittest.TestCase): """UpdateConfigurationTemplateInfo unit test stubs""" diff --git a/test/test_update_group_binding_info.py b/test/test_update_group_binding_info.py index 8cb9f36..01ed42b 100644 --- a/test/test_update_group_binding_info.py +++ b/test/test_update_group_binding_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_group_binding_info import UpdateGroupBindingInfo +from opal_security.models.update_group_binding_info import UpdateGroupBindingInfo class TestUpdateGroupBindingInfo(unittest.TestCase): """UpdateGroupBindingInfo unit test stubs""" diff --git a/test/test_update_group_binding_info_list.py b/test/test_update_group_binding_info_list.py index 66b5588..215306f 100644 --- a/test/test_update_group_binding_info_list.py +++ b/test/test_update_group_binding_info_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_group_binding_info_list import UpdateGroupBindingInfoList +from opal_security.models.update_group_binding_info_list import UpdateGroupBindingInfoList class TestUpdateGroupBindingInfoList(unittest.TestCase): """UpdateGroupBindingInfoList unit test stubs""" diff --git a/test/test_update_group_info.py b/test/test_update_group_info.py index 5d79535..885033f 100644 --- a/test/test_update_group_info.py +++ b/test/test_update_group_info.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.visibility_enum import VisibilityEnum -globals()['VisibilityEnum'] = VisibilityEnum -from opal.model.update_group_info import UpdateGroupInfo +import opal_security +from opal_security.models.visibility_type_enum import VisibilityTypeEnum +globals()['VisibilityTypeEnum'] = VisibilityTypeEnum +from opal_security.models.update_group_info import UpdateGroupInfo class TestUpdateGroupInfo(unittest.TestCase): diff --git a/test/test_update_group_info_list.py b/test/test_update_group_info_list.py index 56e83b9..06216c1 100644 --- a/test/test_update_group_info_list.py +++ b/test/test_update_group_info_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.update_group_info import UpdateGroupInfo +import opal_security +from opal_security.models.update_group_info import UpdateGroupInfo globals()['UpdateGroupInfo'] = UpdateGroupInfo -from opal.model.update_group_info_list import UpdateGroupInfoList +from opal_security.models.update_group_info_list import UpdateGroupInfoList class TestUpdateGroupInfoList(unittest.TestCase): diff --git a/test/test_update_group_resources_info.py b/test/test_update_group_resources_info.py index 8007301..550ce64 100644 --- a/test/test_update_group_resources_info.py +++ b/test/test_update_group_resources_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_group_resources_info import UpdateGroupResourcesInfo +from opal_security.models.update_group_resources_info import UpdateGroupResourcesInfo class TestUpdateGroupResourcesInfo(unittest.TestCase): """UpdateGroupResourcesInfo unit test stubs""" diff --git a/test/test_update_idp_group_mappings_request.py b/test/test_update_idp_group_mappings_request.py index ede7a8c..cd1062c 100644 --- a/test/test_update_idp_group_mappings_request.py +++ b/test/test_update_idp_group_mappings_request.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest +from opal_security.models.update_idp_group_mappings_request import UpdateIdpGroupMappingsRequest class TestUpdateIdpGroupMappingsRequest(unittest.TestCase): """UpdateIdpGroupMappingsRequest unit test stubs""" diff --git a/test/test_update_idp_group_mappings_request_mappings_inner.py b/test/test_update_idp_group_mappings_request_mappings_inner.py index 1a2b920..8528bdd 100644 --- a/test/test_update_idp_group_mappings_request_mappings_inner.py +++ b/test/test_update_idp_group_mappings_request_mappings_inner.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner +from opal_security.models.update_idp_group_mappings_request_mappings_inner import UpdateIdpGroupMappingsRequestMappingsInner class TestUpdateIdpGroupMappingsRequestMappingsInner(unittest.TestCase): """UpdateIdpGroupMappingsRequestMappingsInner unit test stubs""" diff --git a/test/test_update_owner_info.py b/test/test_update_owner_info.py index 622f6ab..7b6009b 100644 --- a/test/test_update_owner_info.py +++ b/test/test_update_owner_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_owner_info import UpdateOwnerInfo +from opal_security.models.update_owner_info import UpdateOwnerInfo class TestUpdateOwnerInfo(unittest.TestCase): """UpdateOwnerInfo unit test stubs""" diff --git a/test/test_update_owner_info_list.py b/test/test_update_owner_info_list.py index b81aeb6..1142da9 100644 --- a/test/test_update_owner_info_list.py +++ b/test/test_update_owner_info_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.update_owner_info_list import UpdateOwnerInfoList +from opal_security.models.update_owner_info_list import UpdateOwnerInfoList class TestUpdateOwnerInfoList(unittest.TestCase): """UpdateOwnerInfoList unit test stubs""" diff --git a/test/test_update_resource_info.py b/test/test_update_resource_info.py index 0d5c4c2..861ac9c 100644 --- a/test/test_update_resource_info.py +++ b/test/test_update_resource_info.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.visibility_enum import VisibilityEnum -globals()['VisibilityEnum'] = VisibilityEnum -from opal.model.update_resource_info import UpdateResourceInfo +import opal_security +from opal_security.models.visibility_type_enum import VisibilityTypeEnum +globals()['VisibilityTypeEnum'] = VisibilityTypeEnum +from opal_security.models.update_resource_info import UpdateResourceInfo class TestUpdateResourceInfo(unittest.TestCase): diff --git a/test/test_update_resource_info_list.py b/test/test_update_resource_info_list.py index a6fb4de..e51c49f 100644 --- a/test/test_update_resource_info_list.py +++ b/test/test_update_resource_info_list.py @@ -12,10 +12,10 @@ import sys import unittest -import opal -from opal.model.update_resource_info import UpdateResourceInfo +import opal_security +from opal_security.models.update_resource_info import UpdateResourceInfo globals()['UpdateResourceInfo'] = UpdateResourceInfo -from opal.model.update_resource_info_list import UpdateResourceInfoList +from opal_security.models.update_resource_info_list import UpdateResourceInfoList class TestUpdateResourceInfoList(unittest.TestCase): diff --git a/test/test_user.py b/test/test_user.py index 69ef8df..1245370 100644 --- a/test/test_user.py +++ b/test/test_user.py @@ -12,8 +12,8 @@ import sys import unittest -import opal -from opal.model.user import User +import opal_security +from opal_security.models.user import User class TestUser(unittest.TestCase): diff --git a/test/test_user_hr_idp_status_enum.py b/test/test_user_hr_idp_status_enum.py index 2783f1e..6075229 100644 --- a/test/test_user_hr_idp_status_enum.py +++ b/test/test_user_hr_idp_status_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.user_hr_idp_status_enum import UserHrIdpStatusEnum +from opal_security.models.user_hr_idp_status_enum import UserHrIdpStatusEnum class TestUserHrIdpStatusEnum(unittest.TestCase): """UserHrIdpStatusEnum unit test stubs""" diff --git a/test/test_user_id_list.py b/test/test_user_id_list.py index f15688a..6347202 100644 --- a/test/test_user_id_list.py +++ b/test/test_user_id_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.user_id_list import UserIDList +from opal_security.models.user_id_list import UserIDList class TestUserIDList(unittest.TestCase): """UserIDList unit test stubs""" diff --git a/test/test_user_list.py b/test/test_user_list.py index fd0eeeb..3fbcc32 100644 --- a/test/test_user_list.py +++ b/test/test_user_list.py @@ -15,7 +15,7 @@ import unittest -from opal.models.user_list import UserList +from opal_security.models.user_list import UserList class TestUserList(unittest.TestCase): """UserList unit test stubs""" diff --git a/test/test_users_api.py b/test/test_users_api.py index b8ddeaf..2cc60a2 100644 --- a/test/test_users_api.py +++ b/test/test_users_api.py @@ -11,8 +11,8 @@ import unittest -import opal -from opal.api.users_api import UsersApi # noqa: E501 +import opal_security +from opal_security.api.users_api import UsersApi # noqa: E501 class TestUsersApi(unittest.TestCase): diff --git a/test/test_users_list.py b/test/test_users_list.py deleted file mode 100644 index 0e5bc4d..0000000 --- a/test/test_users_list.py +++ /dev/null @@ -1,38 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import opal -from opal.model.user import User -globals()['User'] = User -from opal.model.users_list import UsersList - - -class TestUsersList(unittest.TestCase): - """UsersList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUsersList(self): - """Test UsersList""" - # FIXME: construct object with mandatory attributes with example values - # model = UsersList() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_visibility_enum.py b/test/test_visibility_enum.py deleted file mode 100644 index 61271ed..0000000 --- a/test/test_visibility_enum.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - Opal API - - Your Home For Developer Resources. # noqa: E501 - - The version of the OpenAPI document: 1.0 - Contact: hello@opal.dev - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import opal -from opal.model.visibility_enum import VisibilityEnum - - -class TestVisibilityEnum(unittest.TestCase): - """VisibilityEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVisibilityEnum(self): - """Test VisibilityEnum""" - # FIXME: construct object with mandatory attributes with example values - # model = VisibilityEnum() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_visibility_info.py b/test/test_visibility_info.py index 4ed4282..523b16a 100644 --- a/test/test_visibility_info.py +++ b/test/test_visibility_info.py @@ -15,7 +15,7 @@ import unittest -from opal.models.visibility_info import VisibilityInfo +from opal_security.models.visibility_info import VisibilityInfo class TestVisibilityInfo(unittest.TestCase): """VisibilityInfo unit test stubs""" diff --git a/test/test_visibility_type_enum.py b/test/test_visibility_type_enum.py index 8fc3e66..94633ed 100644 --- a/test/test_visibility_type_enum.py +++ b/test/test_visibility_type_enum.py @@ -15,7 +15,7 @@ import unittest -from opal.models.visibility_type_enum import VisibilityTypeEnum +from opal_security.models.visibility_type_enum import VisibilityTypeEnum class TestVisibilityTypeEnum(unittest.TestCase): """VisibilityTypeEnum unit test stubs""" diff --git a/tox.ini b/tox.ini index 8f1b582..d7d02eb 100644 --- a/tox.ini +++ b/tox.ini @@ -6,4 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - pytest --cov=opal + pytest --cov=opal_security