diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e9830c00..c0dc406a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -4,12 +4,7 @@ .travis.yml README.md docs/ActivatePolicyTemplateRequest.md -docs/AttributesData.md docs/AwsService.md -docs/CloudId.md -docs/CloudIds.md -docs/CloudProviders.md -docs/ConfigSchema.md docs/CreatePolicyTemplatePackRequest.md docs/CreatePolicyTemplatePackResponse.md docs/CreatePolicyTemplateRequest.md @@ -20,21 +15,15 @@ docs/CreateTenantProviderResponse.md docs/CreateTenantRequest.md docs/CreateTenantResponse.md docs/CreateTenantUserRequest.md -docs/CreateTenantUserRequestRole.md docs/CreateTenantUserResponse.md -docs/CreateTenantUserResponseStatus.md docs/CreateUserRequest.md docs/CreateUserResponse.md docs/CreateUserTenantMappingRequest.md docs/CreateUserTenantMappingResponse.md -docs/DatabaseConnectionString.md docs/DeactivatePolicyTemplateRequest.md docs/DefaultApi.md -docs/DefaultPolicyConfig.md docs/DeprecatePolicyTemplateRequest.md -docs/Description.md docs/DisableTenantRequest.md -docs/Domains.md docs/GcpService.md docs/GetAllUsersRequest.md docs/GetAllUsersResponse.md @@ -55,25 +44,14 @@ docs/GetTenantsRequest.md docs/GetTenantsResponse.md docs/GetUserByIDResponse.md docs/HTTPValidationError.md -docs/Inputs.md -docs/IsParentAccount.md -docs/IsVerified.md -docs/Message.md -docs/Name.md -docs/Names.md -docs/OutputViolationSchema.md docs/PaginationFields.md docs/PaginationParams.md -docs/ParentId.md -docs/ParentId1.md -docs/ParentIds.md docs/PoliciesPolicyTemplatePacksApi.md docs/PoliciesPolicyTemplatesApi.md docs/PolicyCategory.md docs/PolicyExecutionType.md docs/PolicyTemplate.md docs/PolicyTemplateDetails.md -docs/PolicyTemplateDetailsRuleType.md docs/PolicyTemplateFilters.md docs/PolicyTemplatePack.md docs/PolicyTemplatePackDetails.md @@ -82,10 +60,7 @@ docs/PolicyTemplatePackState.md docs/PolicyTemplateServiceApi.md docs/PolicyTemplateState.md docs/PolicyTemplateUpdateFieldsMixin.md -docs/PolicyTemplateUpdateFieldsMixinDetails.md -docs/PolicyTemplateUpdateFieldsMixinExecutionType.md docs/Provider.md -docs/ProviderConfig.md docs/ResponseActivatePolicyTemplateResponse.md docs/ResponseCreatePolicyTemplatePackResponse.md docs/ResponseCreatePolicyTemplateResponse.md @@ -107,35 +82,21 @@ docs/ResponseUpdatePolicyTemplateResponse.md docs/ResponseUpdateTenantProviderResponse.md docs/ResponseUpdateTenantResponse.md docs/ResponseUpdateTenantUserResponse.md -docs/RuleDefinition.md docs/RuleType.md -docs/SearchQuery.md -docs/Services.md -docs/SourceSchema.md -docs/Sources.md -docs/States.md docs/Tenant.md docs/TenantFilters.md -docs/TenantId.md -docs/TenantIds.md docs/TenantProvider.md docs/TenantProviderAttributes.md -docs/TenantProviderFilterData.md docs/TenantProviderFilters.md docs/TenantServiceApi.md docs/TenantState.md -docs/TenantStates.md docs/TenantUserUpdateFieldsMixin.md -docs/TenantUserUpdateFieldsMixinRole.md -docs/TenantUserUpdateFieldsMixinStatus.md docs/TenantUsersApi.md docs/TenantVerifyRequest.md docs/TenantVerifyResponse.md docs/TenantsApi.md docs/TenantsTenantProviderVerifyApi.md docs/TenantsTenantsProvidersApi.md -docs/Timezone.md -docs/Title.md docs/UpdatePolicyTemplateRequest.md docs/UpdatePolicyTemplateResponse.md docs/UpdateTenantProviderRequest.md @@ -172,12 +133,7 @@ onelens_backend_client/configuration.py onelens_backend_client/exceptions.py onelens_backend_client/models/__init__.py onelens_backend_client/models/activate_policy_template_request.py -onelens_backend_client/models/attributes_data.py onelens_backend_client/models/aws_service.py -onelens_backend_client/models/cloud_id.py -onelens_backend_client/models/cloud_ids.py -onelens_backend_client/models/cloud_providers.py -onelens_backend_client/models/config_schema.py onelens_backend_client/models/create_policy_template_pack_request.py onelens_backend_client/models/create_policy_template_pack_response.py onelens_backend_client/models/create_policy_template_request.py @@ -188,20 +144,14 @@ onelens_backend_client/models/create_tenant_provider_response.py onelens_backend_client/models/create_tenant_request.py onelens_backend_client/models/create_tenant_response.py onelens_backend_client/models/create_tenant_user_request.py -onelens_backend_client/models/create_tenant_user_request_role.py onelens_backend_client/models/create_tenant_user_response.py -onelens_backend_client/models/create_tenant_user_response_status.py onelens_backend_client/models/create_user_request.py onelens_backend_client/models/create_user_response.py onelens_backend_client/models/create_user_tenant_mapping_request.py onelens_backend_client/models/create_user_tenant_mapping_response.py -onelens_backend_client/models/database_connection_string.py onelens_backend_client/models/deactivate_policy_template_request.py -onelens_backend_client/models/default_policy_config.py onelens_backend_client/models/deprecate_policy_template_request.py -onelens_backend_client/models/description.py onelens_backend_client/models/disable_tenant_request.py -onelens_backend_client/models/domains.py onelens_backend_client/models/gcp_service.py onelens_backend_client/models/get_all_users_request.py onelens_backend_client/models/get_all_users_response.py @@ -222,33 +172,19 @@ onelens_backend_client/models/get_tenants_request.py onelens_backend_client/models/get_tenants_response.py onelens_backend_client/models/get_user_by_id_response.py onelens_backend_client/models/http_validation_error.py -onelens_backend_client/models/inputs.py -onelens_backend_client/models/is_parent_account.py -onelens_backend_client/models/is_verified.py -onelens_backend_client/models/message.py -onelens_backend_client/models/name.py -onelens_backend_client/models/names.py -onelens_backend_client/models/output_violation_schema.py onelens_backend_client/models/pagination_fields.py onelens_backend_client/models/pagination_params.py -onelens_backend_client/models/parent_id.py -onelens_backend_client/models/parent_id1.py -onelens_backend_client/models/parent_ids.py onelens_backend_client/models/policy_category.py onelens_backend_client/models/policy_execution_type.py onelens_backend_client/models/policy_template.py onelens_backend_client/models/policy_template_details.py -onelens_backend_client/models/policy_template_details_rule_type.py onelens_backend_client/models/policy_template_filters.py onelens_backend_client/models/policy_template_pack.py onelens_backend_client/models/policy_template_pack_details.py onelens_backend_client/models/policy_template_pack_state.py onelens_backend_client/models/policy_template_state.py onelens_backend_client/models/policy_template_update_fields_mixin.py -onelens_backend_client/models/policy_template_update_fields_mixin_details.py -onelens_backend_client/models/policy_template_update_fields_mixin_execution_type.py onelens_backend_client/models/provider.py -onelens_backend_client/models/provider_config.py onelens_backend_client/models/response_activate_policy_template_response.py onelens_backend_client/models/response_create_policy_template_pack_response.py onelens_backend_client/models/response_create_policy_template_response.py @@ -270,30 +206,16 @@ onelens_backend_client/models/response_update_policy_template_response.py onelens_backend_client/models/response_update_tenant_provider_response.py onelens_backend_client/models/response_update_tenant_response.py onelens_backend_client/models/response_update_tenant_user_response.py -onelens_backend_client/models/rule_definition.py onelens_backend_client/models/rule_type.py -onelens_backend_client/models/search_query.py -onelens_backend_client/models/services.py -onelens_backend_client/models/source_schema.py -onelens_backend_client/models/sources.py -onelens_backend_client/models/states.py onelens_backend_client/models/tenant.py onelens_backend_client/models/tenant_filters.py -onelens_backend_client/models/tenant_id.py -onelens_backend_client/models/tenant_ids.py onelens_backend_client/models/tenant_provider.py onelens_backend_client/models/tenant_provider_attributes.py -onelens_backend_client/models/tenant_provider_filter_data.py onelens_backend_client/models/tenant_provider_filters.py onelens_backend_client/models/tenant_state.py -onelens_backend_client/models/tenant_states.py onelens_backend_client/models/tenant_user_update_fields_mixin.py -onelens_backend_client/models/tenant_user_update_fields_mixin_role.py -onelens_backend_client/models/tenant_user_update_fields_mixin_status.py onelens_backend_client/models/tenant_verify_request.py onelens_backend_client/models/tenant_verify_response.py -onelens_backend_client/models/timezone.py -onelens_backend_client/models/title.py onelens_backend_client/models/update_policy_template_request.py onelens_backend_client/models/update_policy_template_response.py onelens_backend_client/models/update_tenant_provider_request.py @@ -315,14 +237,113 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_database_connection_string.py -test/test_domains.py -test/test_name.py +test/test_activate_policy_template_request.py +test/test_aws_service.py +test/test_create_policy_template_pack_request.py +test/test_create_policy_template_pack_response.py +test/test_create_policy_template_request.py +test/test_create_policy_template_request_services_inner.py +test/test_create_policy_template_response.py +test/test_create_tenant_provider_request.py +test/test_create_tenant_provider_response.py +test/test_create_tenant_request.py +test/test_create_tenant_response.py +test/test_create_tenant_user_request.py +test/test_create_tenant_user_response.py +test/test_create_user_request.py +test/test_create_user_response.py +test/test_create_user_tenant_mapping_request.py +test/test_create_user_tenant_mapping_response.py +test/test_deactivate_policy_template_request.py +test/test_default_api.py +test/test_deprecate_policy_template_request.py +test/test_disable_tenant_request.py +test/test_gcp_service.py +test/test_get_all_users_request.py +test/test_get_all_users_response.py +test/test_get_policy_template_by_id_request.py +test/test_get_policy_template_by_id_response.py +test/test_get_policy_template_pack_by_id_request.py +test/test_get_policy_template_pack_by_id_response.py +test/test_get_policy_template_packs_request.py +test/test_get_policy_template_packs_response.py +test/test_get_policy_templates_request.py +test/test_get_policy_templates_response.py +test/test_get_tenant_by_id_request.py +test/test_get_tenant_by_id_response.py +test/test_get_tenant_provider_by_id_response.py +test/test_get_tenant_providers_request.py +test/test_get_tenant_providers_response.py +test/test_get_tenants_request.py +test/test_get_tenants_response.py +test/test_get_user_by_id_response.py +test/test_http_validation_error.py +test/test_pagination_fields.py +test/test_pagination_params.py +test/test_policies_policy_template_packs_api.py +test/test_policies_policy_templates_api.py +test/test_policy_category.py +test/test_policy_execution_type.py +test/test_policy_template.py +test/test_policy_template_details.py +test/test_policy_template_filters.py +test/test_policy_template_pack.py +test/test_policy_template_pack_details.py +test/test_policy_template_pack_service_api.py +test/test_policy_template_pack_state.py +test/test_policy_template_service_api.py +test/test_policy_template_state.py +test/test_policy_template_update_fields_mixin.py +test/test_provider.py +test/test_response_activate_policy_template_response.py +test/test_response_create_policy_template_pack_response.py +test/test_response_create_policy_template_response.py +test/test_response_create_tenant_user_response.py +test/test_response_create_user_tenant_mapping_response.py +test/test_response_deprecate_policy_template_response.py +test/test_response_disable_tenant_provider_response.py test/test_response_disable_tenant_response.py +test/test_response_get_policy_template_by_id_response.py +test/test_response_get_policy_template_pack_by_id_response.py +test/test_response_get_policy_template_packs_response.py +test/test_response_get_policy_templates_response.py test/test_response_get_tenant_by_id_response.py +test/test_response_get_tenant_provider_by_id_response.py +test/test_response_get_tenant_providers_response.py test/test_response_get_tenants_response.py +test/test_response_tenant_verify_response.py +test/test_response_update_policy_template_response.py +test/test_response_update_tenant_provider_response.py test/test_response_update_tenant_response.py +test/test_response_update_tenant_user_response.py +test/test_rule_type.py +test/test_tenant.py +test/test_tenant_filters.py +test/test_tenant_provider.py +test/test_tenant_provider_attributes.py +test/test_tenant_provider_filters.py +test/test_tenant_service_api.py +test/test_tenant_state.py +test/test_tenant_user_update_fields_mixin.py +test/test_tenant_users_api.py +test/test_tenant_verify_request.py +test/test_tenant_verify_response.py test/test_tenants_api.py -test/test_timezone.py +test/test_tenants_tenant_provider_verify_api.py +test/test_tenants_tenants_providers_api.py +test/test_update_policy_template_request.py +test/test_update_policy_template_response.py +test/test_update_tenant_provider_request.py +test/test_update_tenant_provider_response.py test/test_update_tenant_request.py +test/test_update_tenant_response.py +test/test_update_tenant_user_response.py +test/test_update_user_request.py +test/test_update_user_response.py +test/test_user_role.py +test/test_user_status.py +test/test_user_tenant_mapping_api.py +test/test_users_api.py +test/test_validation_error.py +test/test_validation_error_loc_inner.py tox.ini diff --git a/README.md b/README.md index 39997eae..e468f9af 100644 --- a/README.md +++ b/README.md @@ -133,12 +133,7 @@ Class | Method | Description ## Documentation For Models - [ActivatePolicyTemplateRequest](docs/ActivatePolicyTemplateRequest.md) - - [AttributesData](docs/AttributesData.md) - [AwsService](docs/AwsService.md) - - [CloudId](docs/CloudId.md) - - [CloudIds](docs/CloudIds.md) - - [CloudProviders](docs/CloudProviders.md) - - [ConfigSchema](docs/ConfigSchema.md) - [CreatePolicyTemplatePackRequest](docs/CreatePolicyTemplatePackRequest.md) - [CreatePolicyTemplatePackResponse](docs/CreatePolicyTemplatePackResponse.md) - [CreatePolicyTemplateRequest](docs/CreatePolicyTemplateRequest.md) @@ -149,20 +144,14 @@ Class | Method | Description - [CreateTenantRequest](docs/CreateTenantRequest.md) - [CreateTenantResponse](docs/CreateTenantResponse.md) - [CreateTenantUserRequest](docs/CreateTenantUserRequest.md) - - [CreateTenantUserRequestRole](docs/CreateTenantUserRequestRole.md) - [CreateTenantUserResponse](docs/CreateTenantUserResponse.md) - - [CreateTenantUserResponseStatus](docs/CreateTenantUserResponseStatus.md) - [CreateUserRequest](docs/CreateUserRequest.md) - [CreateUserResponse](docs/CreateUserResponse.md) - [CreateUserTenantMappingRequest](docs/CreateUserTenantMappingRequest.md) - [CreateUserTenantMappingResponse](docs/CreateUserTenantMappingResponse.md) - - [DatabaseConnectionString](docs/DatabaseConnectionString.md) - [DeactivatePolicyTemplateRequest](docs/DeactivatePolicyTemplateRequest.md) - - [DefaultPolicyConfig](docs/DefaultPolicyConfig.md) - [DeprecatePolicyTemplateRequest](docs/DeprecatePolicyTemplateRequest.md) - - [Description](docs/Description.md) - [DisableTenantRequest](docs/DisableTenantRequest.md) - - [Domains](docs/Domains.md) - [GcpService](docs/GcpService.md) - [GetAllUsersRequest](docs/GetAllUsersRequest.md) - [GetAllUsersResponse](docs/GetAllUsersResponse.md) @@ -183,33 +172,19 @@ Class | Method | Description - [GetTenantsResponse](docs/GetTenantsResponse.md) - [GetUserByIDResponse](docs/GetUserByIDResponse.md) - [HTTPValidationError](docs/HTTPValidationError.md) - - [Inputs](docs/Inputs.md) - - [IsParentAccount](docs/IsParentAccount.md) - - [IsVerified](docs/IsVerified.md) - - [Message](docs/Message.md) - - [Name](docs/Name.md) - - [Names](docs/Names.md) - - [OutputViolationSchema](docs/OutputViolationSchema.md) - [PaginationFields](docs/PaginationFields.md) - [PaginationParams](docs/PaginationParams.md) - - [ParentId](docs/ParentId.md) - - [ParentId1](docs/ParentId1.md) - - [ParentIds](docs/ParentIds.md) - [PolicyCategory](docs/PolicyCategory.md) - [PolicyExecutionType](docs/PolicyExecutionType.md) - [PolicyTemplate](docs/PolicyTemplate.md) - [PolicyTemplateDetails](docs/PolicyTemplateDetails.md) - - [PolicyTemplateDetailsRuleType](docs/PolicyTemplateDetailsRuleType.md) - [PolicyTemplateFilters](docs/PolicyTemplateFilters.md) - [PolicyTemplatePack](docs/PolicyTemplatePack.md) - [PolicyTemplatePackDetails](docs/PolicyTemplatePackDetails.md) - [PolicyTemplatePackState](docs/PolicyTemplatePackState.md) - [PolicyTemplateState](docs/PolicyTemplateState.md) - [PolicyTemplateUpdateFieldsMixin](docs/PolicyTemplateUpdateFieldsMixin.md) - - [PolicyTemplateUpdateFieldsMixinDetails](docs/PolicyTemplateUpdateFieldsMixinDetails.md) - - [PolicyTemplateUpdateFieldsMixinExecutionType](docs/PolicyTemplateUpdateFieldsMixinExecutionType.md) - [Provider](docs/Provider.md) - - [ProviderConfig](docs/ProviderConfig.md) - [ResponseActivatePolicyTemplateResponse](docs/ResponseActivatePolicyTemplateResponse.md) - [ResponseCreatePolicyTemplatePackResponse](docs/ResponseCreatePolicyTemplatePackResponse.md) - [ResponseCreatePolicyTemplateResponse](docs/ResponseCreatePolicyTemplateResponse.md) @@ -231,30 +206,16 @@ Class | Method | Description - [ResponseUpdateTenantProviderResponse](docs/ResponseUpdateTenantProviderResponse.md) - [ResponseUpdateTenantResponse](docs/ResponseUpdateTenantResponse.md) - [ResponseUpdateTenantUserResponse](docs/ResponseUpdateTenantUserResponse.md) - - [RuleDefinition](docs/RuleDefinition.md) - [RuleType](docs/RuleType.md) - - [SearchQuery](docs/SearchQuery.md) - - [Services](docs/Services.md) - - [SourceSchema](docs/SourceSchema.md) - - [Sources](docs/Sources.md) - - [States](docs/States.md) - [Tenant](docs/Tenant.md) - [TenantFilters](docs/TenantFilters.md) - - [TenantId](docs/TenantId.md) - - [TenantIds](docs/TenantIds.md) - [TenantProvider](docs/TenantProvider.md) - [TenantProviderAttributes](docs/TenantProviderAttributes.md) - - [TenantProviderFilterData](docs/TenantProviderFilterData.md) - [TenantProviderFilters](docs/TenantProviderFilters.md) - [TenantState](docs/TenantState.md) - - [TenantStates](docs/TenantStates.md) - [TenantUserUpdateFieldsMixin](docs/TenantUserUpdateFieldsMixin.md) - - [TenantUserUpdateFieldsMixinRole](docs/TenantUserUpdateFieldsMixinRole.md) - - [TenantUserUpdateFieldsMixinStatus](docs/TenantUserUpdateFieldsMixinStatus.md) - [TenantVerifyRequest](docs/TenantVerifyRequest.md) - [TenantVerifyResponse](docs/TenantVerifyResponse.md) - - [Timezone](docs/Timezone.md) - - [Title](docs/Title.md) - [UpdatePolicyTemplateRequest](docs/UpdatePolicyTemplateRequest.md) - [UpdatePolicyTemplateResponse](docs/UpdatePolicyTemplateResponse.md) - [UpdateTenantProviderRequest](docs/UpdateTenantProviderRequest.md) diff --git a/REGENERATE.md b/REGENERATE.md deleted file mode 100644 index c1f55c3d..00000000 --- a/REGENERATE.md +++ /dev/null @@ -1,26 +0,0 @@ -# Regenerate the client -1. Start the onelens-backend server. -2. Verify openapi.json is available at `http://localhost:19000/openapi.json` -3. Run the following command to regenerate the client at the root of the project. - -```sh -docker run --rm -v "${PWD}:/onelens-backend-python-client" openapitools/openapi-generator-cli generate \ - -i http://host.docker.internal:19000/openapi.json \ - -g python \ - -o /onelens-backend-python-client/ \ - -t /onelens-backend-python-client/templates/ \ - -c /onelens-backend-python-client/config.yaml --skip-validate-spec - -/Users/sid/Code/openapi-generator/run-in-docker.sh generate \ - -i http://host.docker.internal:19000/openapi.json \ - -g python \ - -o /onelens-backend-python-client/ \ - -t /onelens-backend-python-client/templates/ \ - -c /onelens-backend-python-client/config.yaml - - -``` - -docker run --rm -v "${PWD}:/onelens-backend-python-client" openapitools/openapi-generator-cli author template \ - -g python \ - -o /onelens-backend-python-client/templates/ \ No newline at end of file diff --git a/docs/AttributesData.md b/docs/AttributesData.md deleted file mode 100644 index 4643cb12..00000000 --- a/docs/AttributesData.md +++ /dev/null @@ -1,28 +0,0 @@ -# AttributesData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.attributes_data import AttributesData - -# TODO update the JSON string below -json = "{}" -# create an instance of AttributesData from a JSON string -attributes_data_instance = AttributesData.from_json(json) -# print the JSON string representation of the object -print(AttributesData.to_json()) - -# convert the object into a dict -attributes_data_dict = attributes_data_instance.to_dict() -# create an instance of AttributesData from a dict -attributes_data_form_dict = attributes_data.from_dict(attributes_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CloudId.md b/docs/CloudId.md deleted file mode 100644 index 747ac18a..00000000 --- a/docs/CloudId.md +++ /dev/null @@ -1,28 +0,0 @@ -# CloudId - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.cloud_id import CloudId - -# TODO update the JSON string below -json = "{}" -# create an instance of CloudId from a JSON string -cloud_id_instance = CloudId.from_json(json) -# print the JSON string representation of the object -print(CloudId.to_json()) - -# convert the object into a dict -cloud_id_dict = cloud_id_instance.to_dict() -# create an instance of CloudId from a dict -cloud_id_form_dict = cloud_id.from_dict(cloud_id_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CloudIds.md b/docs/CloudIds.md deleted file mode 100644 index 9787c0e1..00000000 --- a/docs/CloudIds.md +++ /dev/null @@ -1,29 +0,0 @@ -# CloudIds - -Cloud ID filter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.cloud_ids import CloudIds - -# TODO update the JSON string below -json = "{}" -# create an instance of CloudIds from a JSON string -cloud_ids_instance = CloudIds.from_json(json) -# print the JSON string representation of the object -print(CloudIds.to_json()) - -# convert the object into a dict -cloud_ids_dict = cloud_ids_instance.to_dict() -# create an instance of CloudIds from a dict -cloud_ids_form_dict = cloud_ids.from_dict(cloud_ids_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CloudProviders.md b/docs/CloudProviders.md deleted file mode 100644 index 7c58b308..00000000 --- a/docs/CloudProviders.md +++ /dev/null @@ -1,29 +0,0 @@ -# CloudProviders - -Cloud provider filter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.cloud_providers import CloudProviders - -# TODO update the JSON string below -json = "{}" -# create an instance of CloudProviders from a JSON string -cloud_providers_instance = CloudProviders.from_json(json) -# print the JSON string representation of the object -print(CloudProviders.to_json()) - -# convert the object into a dict -cloud_providers_dict = cloud_providers_instance.to_dict() -# create an instance of CloudProviders from a dict -cloud_providers_form_dict = cloud_providers.from_dict(cloud_providers_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConfigSchema.md b/docs/ConfigSchema.md deleted file mode 100644 index 8d0cce1d..00000000 --- a/docs/ConfigSchema.md +++ /dev/null @@ -1,29 +0,0 @@ -# ConfigSchema - -The schema for the policy config for this policy template. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.config_schema import ConfigSchema - -# TODO update the JSON string below -json = "{}" -# create an instance of ConfigSchema from a JSON string -config_schema_instance = ConfigSchema.from_json(json) -# print the JSON string representation of the object -print(ConfigSchema.to_json()) - -# convert the object into a dict -config_schema_dict = config_schema_instance.to_dict() -# create an instance of ConfigSchema from a dict -config_schema_form_dict = config_schema.from_dict(config_schema_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateTenantProviderRequest.md b/docs/CreateTenantProviderRequest.md index 03c6d858..1a426126 100644 --- a/docs/CreateTenantProviderRequest.md +++ b/docs/CreateTenantProviderRequest.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cloud_provider** | **str** | Cloud provider | **cloud_id** | **str** | Cloud ID | -**parent_id** | [**ParentId**](ParentId.md) | | [optional] +**parent_id** | **str** | | [optional] **provider_config** | **object** | Provider config | -**tenant_id** | [**TenantId**](TenantId.md) | | [optional] +**tenant_id** | **str** | | [optional] ## Example diff --git a/docs/CreateTenantProviderResponse.md b/docs/CreateTenantProviderResponse.md index b2dcb4d6..2f1b7367 100644 --- a/docs/CreateTenantProviderResponse.md +++ b/docs/CreateTenantProviderResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cloud_provider** | **str** | Cloud provider | **cloud_id** | **str** | Cloud ID | -**parent_id** | [**ParentId**](ParentId.md) | | [optional] +**parent_id** | **str** | | [optional] **provider_config** | **object** | provider config | **id** | **str** | Unique ID for the Tenant Provider | **is_parent_account** | **bool** | billing account | diff --git a/docs/CreateTenantUserRequest.md b/docs/CreateTenantUserRequest.md index bc8d413e..351af8ed 100644 --- a/docs/CreateTenantUserRequest.md +++ b/docs/CreateTenantUserRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ol_user_id** | **str** | Unique onelens identifier for the user | -**role** | [**CreateTenantUserRequestRole**](CreateTenantUserRequestRole.md) | | [optional] +**role** | [**UserRole**](UserRole.md) | | [optional] **sources** | **List[str]** | Different sources from where user signed up. e.g. social signup, username-password | ## Example diff --git a/docs/CreateTenantUserRequestRole.md b/docs/CreateTenantUserRequestRole.md deleted file mode 100644 index ea27a249..00000000 --- a/docs/CreateTenantUserRequestRole.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateTenantUserRequestRole - -Role of the user in the tenant - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.create_tenant_user_request_role import CreateTenantUserRequestRole - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTenantUserRequestRole from a JSON string -create_tenant_user_request_role_instance = CreateTenantUserRequestRole.from_json(json) -# print the JSON string representation of the object -print(CreateTenantUserRequestRole.to_json()) - -# convert the object into a dict -create_tenant_user_request_role_dict = create_tenant_user_request_role_instance.to_dict() -# create an instance of CreateTenantUserRequestRole from a dict -create_tenant_user_request_role_form_dict = create_tenant_user_request_role.from_dict(create_tenant_user_request_role_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateTenantUserResponse.md b/docs/CreateTenantUserResponse.md index f0a4a958..1a02fcad 100644 --- a/docs/CreateTenantUserResponse.md +++ b/docs/CreateTenantUserResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | [**CreateTenantUserResponseStatus**](CreateTenantUserResponseStatus.md) | | [optional] +**status** | [**UserStatus**](UserStatus.md) | | [optional] **ol_user_id** | **str** | Unique onelens identifier for the user | -**role** | [**CreateTenantUserRequestRole**](CreateTenantUserRequestRole.md) | | [optional] +**role** | [**UserRole**](UserRole.md) | | [optional] **sources** | **List[str]** | Different sources from where user signed up. e.g. social signup, username-password | **id** | **str** | PK in the tenant users table | diff --git a/docs/CreateTenantUserResponseStatus.md b/docs/CreateTenantUserResponseStatus.md deleted file mode 100644 index 08bfd08f..00000000 --- a/docs/CreateTenantUserResponseStatus.md +++ /dev/null @@ -1,29 +0,0 @@ -# CreateTenantUserResponseStatus - -Status of the user like ACTIVE, BLOCKED etc. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.create_tenant_user_response_status import CreateTenantUserResponseStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTenantUserResponseStatus from a JSON string -create_tenant_user_response_status_instance = CreateTenantUserResponseStatus.from_json(json) -# print the JSON string representation of the object -print(CreateTenantUserResponseStatus.to_json()) - -# convert the object into a dict -create_tenant_user_response_status_dict = create_tenant_user_response_status_instance.to_dict() -# create an instance of CreateTenantUserResponseStatus from a dict -create_tenant_user_response_status_form_dict = create_tenant_user_response_status.from_dict(create_tenant_user_response_status_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DatabaseConnectionString.md b/docs/DatabaseConnectionString.md deleted file mode 100644 index 8262ed27..00000000 --- a/docs/DatabaseConnectionString.md +++ /dev/null @@ -1,29 +0,0 @@ -# DatabaseConnectionString - -DB connection string for tenant - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.database_connection_string import DatabaseConnectionString - -# TODO update the JSON string below -json = "{}" -# create an instance of DatabaseConnectionString from a JSON string -database_connection_string_instance = DatabaseConnectionString.from_json(json) -# print the JSON string representation of the object -print(DatabaseConnectionString.to_json()) - -# convert the object into a dict -database_connection_string_dict = database_connection_string_instance.to_dict() -# create an instance of DatabaseConnectionString from a dict -database_connection_string_form_dict = database_connection_string.from_dict(database_connection_string_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DefaultPolicyConfig.md b/docs/DefaultPolicyConfig.md deleted file mode 100644 index dfca4913..00000000 --- a/docs/DefaultPolicyConfig.md +++ /dev/null @@ -1,29 +0,0 @@ -# DefaultPolicyConfig - -The default configuration for the policy. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.default_policy_config import DefaultPolicyConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of DefaultPolicyConfig from a JSON string -default_policy_config_instance = DefaultPolicyConfig.from_json(json) -# print the JSON string representation of the object -print(DefaultPolicyConfig.to_json()) - -# convert the object into a dict -default_policy_config_dict = default_policy_config_instance.to_dict() -# create an instance of DefaultPolicyConfig from a dict -default_policy_config_form_dict = default_policy_config.from_dict(default_policy_config_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Description.md b/docs/Description.md deleted file mode 100644 index f3f4e1a7..00000000 --- a/docs/Description.md +++ /dev/null @@ -1,29 +0,0 @@ -# Description - -The description of the policy template. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.description import Description - -# TODO update the JSON string below -json = "{}" -# create an instance of Description from a JSON string -description_instance = Description.from_json(json) -# print the JSON string representation of the object -print(Description.to_json()) - -# convert the object into a dict -description_dict = description_instance.to_dict() -# create an instance of Description from a dict -description_form_dict = description.from_dict(description_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Domains.md b/docs/Domains.md deleted file mode 100644 index d1cb4601..00000000 --- a/docs/Domains.md +++ /dev/null @@ -1,29 +0,0 @@ -# Domains - -List of domains - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.domains import Domains - -# TODO update the JSON string below -json = "{}" -# create an instance of Domains from a JSON string -domains_instance = Domains.from_json(json) -# print the JSON string representation of the object -print(Domains.to_json()) - -# convert the object into a dict -domains_dict = domains_instance.to_dict() -# create an instance of Domains from a dict -domains_form_dict = domains.from_dict(domains_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetTenantByIDResponse.md b/docs/GetTenantByIDResponse.md index d4da06b3..c9bd8529 100644 --- a/docs/GetTenantByIDResponse.md +++ b/docs/GetTenantByIDResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **timezone** | **str** | Timezone of the tenant | **id** | **str** | Unique identifier for the tenant | **tenant_state** | [**TenantState**](TenantState.md) | State of the tenant | -**database_connection_string** | [**DatabaseConnectionString**](DatabaseConnectionString.md) | | +**database_connection_string** | **str** | | ## Example diff --git a/docs/GetTenantProviderByIDResponse.md b/docs/GetTenantProviderByIDResponse.md index 0975d8c0..539bd413 100644 --- a/docs/GetTenantProviderByIDResponse.md +++ b/docs/GetTenantProviderByIDResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cloud_provider** | **str** | Cloud provider | **cloud_id** | **str** | Cloud ID | -**parent_id** | [**ParentId**](ParentId.md) | | [optional] +**parent_id** | **str** | | [optional] **provider_config** | **object** | provider config | **id** | **str** | Unique ID for the Tenant Provider | **is_parent_account** | **bool** | billing account | diff --git a/docs/GetTenantProvidersResponse.md b/docs/GetTenantProvidersResponse.md index 1bf8f95e..6fb56d5f 100644 --- a/docs/GetTenantProvidersResponse.md +++ b/docs/GetTenantProvidersResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tenant_provider_filter_data** | [**TenantProviderFilterData**](TenantProviderFilterData.md) | | -**attributes_data** | [**AttributesData**](AttributesData.md) | | +**tenant_provider_filter_data** | **object** | | +**attributes_data** | **object** | | ## Example diff --git a/docs/Inputs.md b/docs/Inputs.md deleted file mode 100644 index 0be93e3b..00000000 --- a/docs/Inputs.md +++ /dev/null @@ -1,29 +0,0 @@ -# Inputs - -The input dataset names for the policy. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.inputs import Inputs - -# TODO update the JSON string below -json = "{}" -# create an instance of Inputs from a JSON string -inputs_instance = Inputs.from_json(json) -# print the JSON string representation of the object -print(Inputs.to_json()) - -# convert the object into a dict -inputs_dict = inputs_instance.to_dict() -# create an instance of Inputs from a dict -inputs_form_dict = inputs.from_dict(inputs_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IsParentAccount.md b/docs/IsParentAccount.md deleted file mode 100644 index 85cd4a64..00000000 --- a/docs/IsParentAccount.md +++ /dev/null @@ -1,29 +0,0 @@ -# IsParentAccount - -Billing account filter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.is_parent_account import IsParentAccount - -# TODO update the JSON string below -json = "{}" -# create an instance of IsParentAccount from a JSON string -is_parent_account_instance = IsParentAccount.from_json(json) -# print the JSON string representation of the object -print(IsParentAccount.to_json()) - -# convert the object into a dict -is_parent_account_dict = is_parent_account_instance.to_dict() -# create an instance of IsParentAccount from a dict -is_parent_account_form_dict = is_parent_account.from_dict(is_parent_account_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/IsVerified.md b/docs/IsVerified.md deleted file mode 100644 index 73721b4d..00000000 --- a/docs/IsVerified.md +++ /dev/null @@ -1,29 +0,0 @@ -# IsVerified - -Is verified filter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.is_verified import IsVerified - -# TODO update the JSON string below -json = "{}" -# create an instance of IsVerified from a JSON string -is_verified_instance = IsVerified.from_json(json) -# print the JSON string representation of the object -print(IsVerified.to_json()) - -# convert the object into a dict -is_verified_dict = is_verified_instance.to_dict() -# create an instance of IsVerified from a dict -is_verified_form_dict = is_verified.from_dict(is_verified_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Message.md b/docs/Message.md deleted file mode 100644 index c1cbdcb8..00000000 --- a/docs/Message.md +++ /dev/null @@ -1,28 +0,0 @@ -# Message - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.message import Message - -# TODO update the JSON string below -json = "{}" -# create an instance of Message from a JSON string -message_instance = Message.from_json(json) -# print the JSON string representation of the object -print(Message.to_json()) - -# convert the object into a dict -message_dict = message_instance.to_dict() -# create an instance of Message from a dict -message_form_dict = message.from_dict(message_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Name.md b/docs/Name.md deleted file mode 100644 index 24854af9..00000000 --- a/docs/Name.md +++ /dev/null @@ -1,29 +0,0 @@ -# Name - -Name of the tenant - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.name import Name - -# TODO update the JSON string below -json = "{}" -# create an instance of Name from a JSON string -name_instance = Name.from_json(json) -# print the JSON string representation of the object -print(Name.to_json()) - -# convert the object into a dict -name_dict = name_instance.to_dict() -# create an instance of Name from a dict -name_form_dict = name.from_dict(name_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Names.md b/docs/Names.md deleted file mode 100644 index b2401f84..00000000 --- a/docs/Names.md +++ /dev/null @@ -1,28 +0,0 @@ -# Names - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.names import Names - -# TODO update the JSON string below -json = "{}" -# create an instance of Names from a JSON string -names_instance = Names.from_json(json) -# print the JSON string representation of the object -print(Names.to_json()) - -# convert the object into a dict -names_dict = names_instance.to_dict() -# create an instance of Names from a dict -names_form_dict = names.from_dict(names_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OutputViolationSchema.md b/docs/OutputViolationSchema.md deleted file mode 100644 index 1d7f3f31..00000000 --- a/docs/OutputViolationSchema.md +++ /dev/null @@ -1,29 +0,0 @@ -# OutputViolationSchema - -The schema for the output violation. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.output_violation_schema import OutputViolationSchema - -# TODO update the JSON string below -json = "{}" -# create an instance of OutputViolationSchema from a JSON string -output_violation_schema_instance = OutputViolationSchema.from_json(json) -# print the JSON string representation of the object -print(OutputViolationSchema.to_json()) - -# convert the object into a dict -output_violation_schema_dict = output_violation_schema_instance.to_dict() -# create an instance of OutputViolationSchema from a dict -output_violation_schema_form_dict = output_violation_schema.from_dict(output_violation_schema_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ParentId.md b/docs/ParentId.md deleted file mode 100644 index c95e931d..00000000 --- a/docs/ParentId.md +++ /dev/null @@ -1,29 +0,0 @@ -# ParentId - -Parent ID - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.parent_id import ParentId - -# TODO update the JSON string below -json = "{}" -# create an instance of ParentId from a JSON string -parent_id_instance = ParentId.from_json(json) -# print the JSON string representation of the object -print(ParentId.to_json()) - -# convert the object into a dict -parent_id_dict = parent_id_instance.to_dict() -# create an instance of ParentId from a dict -parent_id_form_dict = parent_id.from_dict(parent_id_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ParentId1.md b/docs/ParentId1.md deleted file mode 100644 index 617c4c03..00000000 --- a/docs/ParentId1.md +++ /dev/null @@ -1,28 +0,0 @@ -# ParentId1 - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.parent_id1 import ParentId1 - -# TODO update the JSON string below -json = "{}" -# create an instance of ParentId1 from a JSON string -parent_id1_instance = ParentId1.from_json(json) -# print the JSON string representation of the object -print(ParentId1.to_json()) - -# convert the object into a dict -parent_id1_dict = parent_id1_instance.to_dict() -# create an instance of ParentId1 from a dict -parent_id1_form_dict = parent_id1.from_dict(parent_id1_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ParentIds.md b/docs/ParentIds.md deleted file mode 100644 index 2122c19b..00000000 --- a/docs/ParentIds.md +++ /dev/null @@ -1,29 +0,0 @@ -# ParentIds - -Parent ID filter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.parent_ids import ParentIds - -# TODO update the JSON string below -json = "{}" -# create an instance of ParentIds from a JSON string -parent_ids_instance = ParentIds.from_json(json) -# print the JSON string representation of the object -print(ParentIds.to_json()) - -# convert the object into a dict -parent_ids_dict = parent_ids_instance.to_dict() -# create an instance of ParentIds from a dict -parent_ids_form_dict = parent_ids.from_dict(parent_ids_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyTemplateDetails.md b/docs/PolicyTemplateDetails.md index ea8482ff..b2a2fc74 100644 --- a/docs/PolicyTemplateDetails.md +++ b/docs/PolicyTemplateDetails.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**inputs** | [**Inputs**](Inputs.md) | | [optional] -**config_schema** | [**ConfigSchema**](ConfigSchema.md) | | [optional] -**output_violation_schema** | [**OutputViolationSchema**](OutputViolationSchema.md) | | [optional] -**rule_type** | [**PolicyTemplateDetailsRuleType**](PolicyTemplateDetailsRuleType.md) | | [optional] -**rule_definition** | [**RuleDefinition**](RuleDefinition.md) | | [optional] -**default_policy_config** | [**DefaultPolicyConfig**](DefaultPolicyConfig.md) | | [optional] +**inputs** | **object** | | [optional] +**config_schema** | **object** | | [optional] +**output_violation_schema** | **object** | | [optional] +**rule_type** | [**RuleType**](RuleType.md) | | [optional] +**rule_definition** | **str** | | [optional] +**default_policy_config** | **object** | | [optional] ## Example diff --git a/docs/PolicyTemplateDetailsRuleType.md b/docs/PolicyTemplateDetailsRuleType.md deleted file mode 100644 index 1b21ea1b..00000000 --- a/docs/PolicyTemplateDetailsRuleType.md +++ /dev/null @@ -1,29 +0,0 @@ -# PolicyTemplateDetailsRuleType - -The type of the rule, SQL etc. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.policy_template_details_rule_type import PolicyTemplateDetailsRuleType - -# TODO update the JSON string below -json = "{}" -# create an instance of PolicyTemplateDetailsRuleType from a JSON string -policy_template_details_rule_type_instance = PolicyTemplateDetailsRuleType.from_json(json) -# print the JSON string representation of the object -print(PolicyTemplateDetailsRuleType.to_json()) - -# convert the object into a dict -policy_template_details_rule_type_dict = policy_template_details_rule_type_instance.to_dict() -# create an instance of PolicyTemplateDetailsRuleType from a dict -policy_template_details_rule_type_form_dict = policy_template_details_rule_type.from_dict(policy_template_details_rule_type_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyTemplateFilters.md b/docs/PolicyTemplateFilters.md index 0a013023..dcf42ac6 100644 --- a/docs/PolicyTemplateFilters.md +++ b/docs/PolicyTemplateFilters.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**search_query** | [**SearchQuery**](SearchQuery.md) | | [optional] +**search_query** | **str** | | [optional] **parent_ptp_ids** | **List[str]** | Filter by parent policy template pack id. | [optional] [default to []] **states** | [**List[PolicyTemplateState]**](PolicyTemplateState.md) | Filter by state. Default is ACTIVE. | [optional] [default to [ACTIVE]] **categories** | [**List[PolicyCategory]**](PolicyCategory.md) | Filter by type. | [optional] [default to []] diff --git a/docs/PolicyTemplatePackDetails.md b/docs/PolicyTemplatePackDetails.md index ec969153..e63d6302 100644 --- a/docs/PolicyTemplatePackDetails.md +++ b/docs/PolicyTemplatePackDetails.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_schema** | [**SourceSchema**](SourceSchema.md) | | [optional] +**source_schema** | **object** | | [optional] ## Example diff --git a/docs/PolicyTemplateUpdateFieldsMixin.md b/docs/PolicyTemplateUpdateFieldsMixin.md index 58b788a4..1c3c0517 100644 --- a/docs/PolicyTemplateUpdateFieldsMixin.md +++ b/docs/PolicyTemplateUpdateFieldsMixin.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**description** | [**Description**](Description.md) | | [optional] -**services** | [**Services**](Services.md) | | [optional] -**execution_type** | [**PolicyTemplateUpdateFieldsMixinExecutionType**](PolicyTemplateUpdateFieldsMixinExecutionType.md) | | [optional] -**details** | [**PolicyTemplateUpdateFieldsMixinDetails**](PolicyTemplateUpdateFieldsMixinDetails.md) | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**services** | **object** | | [optional] +**execution_type** | [**PolicyExecutionType**](PolicyExecutionType.md) | | [optional] +**details** | [**PolicyTemplateDetails**](PolicyTemplateDetails.md) | | [optional] ## Example diff --git a/docs/PolicyTemplateUpdateFieldsMixinDetails.md b/docs/PolicyTemplateUpdateFieldsMixinDetails.md deleted file mode 100644 index 65fb29a4..00000000 --- a/docs/PolicyTemplateUpdateFieldsMixinDetails.md +++ /dev/null @@ -1,35 +0,0 @@ -# PolicyTemplateUpdateFieldsMixinDetails - -The details of the policy template. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**inputs** | [**Inputs**](Inputs.md) | | [optional] -**config_schema** | [**ConfigSchema**](ConfigSchema.md) | | [optional] -**output_violation_schema** | [**OutputViolationSchema**](OutputViolationSchema.md) | | [optional] -**rule_type** | [**PolicyTemplateDetailsRuleType**](PolicyTemplateDetailsRuleType.md) | | [optional] -**rule_definition** | [**RuleDefinition**](RuleDefinition.md) | | [optional] -**default_policy_config** | [**DefaultPolicyConfig**](DefaultPolicyConfig.md) | | [optional] - -## Example - -```python -from onelens_backend_client.models.policy_template_update_fields_mixin_details import PolicyTemplateUpdateFieldsMixinDetails - -# TODO update the JSON string below -json = "{}" -# create an instance of PolicyTemplateUpdateFieldsMixinDetails from a JSON string -policy_template_update_fields_mixin_details_instance = PolicyTemplateUpdateFieldsMixinDetails.from_json(json) -# print the JSON string representation of the object -print(PolicyTemplateUpdateFieldsMixinDetails.to_json()) - -# convert the object into a dict -policy_template_update_fields_mixin_details_dict = policy_template_update_fields_mixin_details_instance.to_dict() -# create an instance of PolicyTemplateUpdateFieldsMixinDetails from a dict -policy_template_update_fields_mixin_details_form_dict = policy_template_update_fields_mixin_details.from_dict(policy_template_update_fields_mixin_details_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyTemplateUpdateFieldsMixinExecutionType.md b/docs/PolicyTemplateUpdateFieldsMixinExecutionType.md deleted file mode 100644 index 208ae89f..00000000 --- a/docs/PolicyTemplateUpdateFieldsMixinExecutionType.md +++ /dev/null @@ -1,29 +0,0 @@ -# PolicyTemplateUpdateFieldsMixinExecutionType - -The execution type of the policy template. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.policy_template_update_fields_mixin_execution_type import PolicyTemplateUpdateFieldsMixinExecutionType - -# TODO update the JSON string below -json = "{}" -# create an instance of PolicyTemplateUpdateFieldsMixinExecutionType from a JSON string -policy_template_update_fields_mixin_execution_type_instance = PolicyTemplateUpdateFieldsMixinExecutionType.from_json(json) -# print the JSON string representation of the object -print(PolicyTemplateUpdateFieldsMixinExecutionType.to_json()) - -# convert the object into a dict -policy_template_update_fields_mixin_execution_type_dict = policy_template_update_fields_mixin_execution_type_instance.to_dict() -# create an instance of PolicyTemplateUpdateFieldsMixinExecutionType from a dict -policy_template_update_fields_mixin_execution_type_form_dict = policy_template_update_fields_mixin_execution_type.from_dict(policy_template_update_fields_mixin_execution_type_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProviderConfig.md b/docs/ProviderConfig.md deleted file mode 100644 index 3572875c..00000000 --- a/docs/ProviderConfig.md +++ /dev/null @@ -1,28 +0,0 @@ -# ProviderConfig - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.provider_config import ProviderConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of ProviderConfig from a JSON string -provider_config_instance = ProviderConfig.from_json(json) -# print the JSON string representation of the object -print(ProviderConfig.to_json()) - -# convert the object into a dict -provider_config_dict = provider_config_instance.to_dict() -# create an instance of ProviderConfig from a dict -provider_config_form_dict = provider_config.from_dict(provider_config_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ResponseActivatePolicyTemplateResponse.md b/docs/ResponseActivatePolicyTemplateResponse.md index 66fc4d41..766178ff 100644 --- a/docs/ResponseActivatePolicyTemplateResponse.md +++ b/docs/ResponseActivatePolicyTemplateResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | **object** | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseCreatePolicyTemplatePackResponse.md b/docs/ResponseCreatePolicyTemplatePackResponse.md index db0701db..9f9ad03b 100644 --- a/docs/ResponseCreatePolicyTemplatePackResponse.md +++ b/docs/ResponseCreatePolicyTemplatePackResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**CreatePolicyTemplatePackResponse**](CreatePolicyTemplatePackResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseCreatePolicyTemplateResponse.md b/docs/ResponseCreatePolicyTemplateResponse.md index 74655fef..bf0623fd 100644 --- a/docs/ResponseCreatePolicyTemplateResponse.md +++ b/docs/ResponseCreatePolicyTemplateResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**CreatePolicyTemplateResponse**](CreatePolicyTemplateResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseCreateTenantUserResponse.md b/docs/ResponseCreateTenantUserResponse.md index cf06b3da..c087ddca 100644 --- a/docs/ResponseCreateTenantUserResponse.md +++ b/docs/ResponseCreateTenantUserResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**CreateTenantUserResponse**](CreateTenantUserResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseCreateUserTenantMappingResponse.md b/docs/ResponseCreateUserTenantMappingResponse.md index 44c84e6c..7ead6aad 100644 --- a/docs/ResponseCreateUserTenantMappingResponse.md +++ b/docs/ResponseCreateUserTenantMappingResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**CreateUserTenantMappingResponse**](CreateUserTenantMappingResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseDeprecatePolicyTemplateResponse.md b/docs/ResponseDeprecatePolicyTemplateResponse.md index 5255cc88..d737be07 100644 --- a/docs/ResponseDeprecatePolicyTemplateResponse.md +++ b/docs/ResponseDeprecatePolicyTemplateResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | **object** | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseDisableTenantProviderResponse.md b/docs/ResponseDisableTenantProviderResponse.md index 00463d0c..7e9189d9 100644 --- a/docs/ResponseDisableTenantProviderResponse.md +++ b/docs/ResponseDisableTenantProviderResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | **object** | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseDisableTenantResponse.md b/docs/ResponseDisableTenantResponse.md index dc785b46..8033a3a8 100644 --- a/docs/ResponseDisableTenantResponse.md +++ b/docs/ResponseDisableTenantResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | **object** | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetPolicyTemplateByIDResponse.md b/docs/ResponseGetPolicyTemplateByIDResponse.md index 138b2a77..aafb7227 100644 --- a/docs/ResponseGetPolicyTemplateByIDResponse.md +++ b/docs/ResponseGetPolicyTemplateByIDResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetPolicyTemplateByIDResponse**](GetPolicyTemplateByIDResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetPolicyTemplatePackByIdResponse.md b/docs/ResponseGetPolicyTemplatePackByIdResponse.md index 79ef5bfb..0e779a04 100644 --- a/docs/ResponseGetPolicyTemplatePackByIdResponse.md +++ b/docs/ResponseGetPolicyTemplatePackByIdResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetPolicyTemplatePackByIdResponse**](GetPolicyTemplatePackByIdResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetPolicyTemplatePacksResponse.md b/docs/ResponseGetPolicyTemplatePacksResponse.md index 4ad1ab6d..9fb4fbfc 100644 --- a/docs/ResponseGetPolicyTemplatePacksResponse.md +++ b/docs/ResponseGetPolicyTemplatePacksResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetPolicyTemplatePacksResponse**](GetPolicyTemplatePacksResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetPolicyTemplatesResponse.md b/docs/ResponseGetPolicyTemplatesResponse.md index 78f75abd..515d3457 100644 --- a/docs/ResponseGetPolicyTemplatesResponse.md +++ b/docs/ResponseGetPolicyTemplatesResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetPolicyTemplatesResponse**](GetPolicyTemplatesResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetTenantByIDResponse.md b/docs/ResponseGetTenantByIDResponse.md index 43ba0406..ce257900 100644 --- a/docs/ResponseGetTenantByIDResponse.md +++ b/docs/ResponseGetTenantByIDResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetTenantByIDResponse**](GetTenantByIDResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetTenantProviderByIDResponse.md b/docs/ResponseGetTenantProviderByIDResponse.md index ac54b4d5..fcf0ba34 100644 --- a/docs/ResponseGetTenantProviderByIDResponse.md +++ b/docs/ResponseGetTenantProviderByIDResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetTenantProviderByIDResponse**](GetTenantProviderByIDResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetTenantProvidersResponse.md b/docs/ResponseGetTenantProvidersResponse.md index a395a768..13eb1715 100644 --- a/docs/ResponseGetTenantProvidersResponse.md +++ b/docs/ResponseGetTenantProvidersResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetTenantProvidersResponse**](GetTenantProvidersResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseGetTenantsResponse.md b/docs/ResponseGetTenantsResponse.md index 2c70627b..105d6815 100644 --- a/docs/ResponseGetTenantsResponse.md +++ b/docs/ResponseGetTenantsResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**GetTenantsResponse**](GetTenantsResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseTenantVerifyResponse.md b/docs/ResponseTenantVerifyResponse.md index 5b930348..7719e73b 100644 --- a/docs/ResponseTenantVerifyResponse.md +++ b/docs/ResponseTenantVerifyResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**TenantVerifyResponse**](TenantVerifyResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseUpdatePolicyTemplateResponse.md b/docs/ResponseUpdatePolicyTemplateResponse.md index ac8f2a11..30569036 100644 --- a/docs/ResponseUpdatePolicyTemplateResponse.md +++ b/docs/ResponseUpdatePolicyTemplateResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UpdatePolicyTemplateResponse**](UpdatePolicyTemplateResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseUpdateTenantProviderResponse.md b/docs/ResponseUpdateTenantProviderResponse.md index 3d2eefec..ef9370b3 100644 --- a/docs/ResponseUpdateTenantProviderResponse.md +++ b/docs/ResponseUpdateTenantProviderResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UpdateTenantProviderResponse**](UpdateTenantProviderResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseUpdateTenantResponse.md b/docs/ResponseUpdateTenantResponse.md index a8b76bad..92bf620d 100644 --- a/docs/ResponseUpdateTenantResponse.md +++ b/docs/ResponseUpdateTenantResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UpdateTenantResponse**](UpdateTenantResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/ResponseUpdateTenantUserResponse.md b/docs/ResponseUpdateTenantUserResponse.md index 38aa8dd0..b15124d6 100644 --- a/docs/ResponseUpdateTenantUserResponse.md +++ b/docs/ResponseUpdateTenantUserResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UpdateTenantUserResponse**](UpdateTenantUserResponse.md) | | -**message** | [**Message**](Message.md) | | [optional] +**message** | **str** | | [optional] ## Example diff --git a/docs/RuleDefinition.md b/docs/RuleDefinition.md deleted file mode 100644 index 86e590cc..00000000 --- a/docs/RuleDefinition.md +++ /dev/null @@ -1,29 +0,0 @@ -# RuleDefinition - -The definition of the rule. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.rule_definition import RuleDefinition - -# TODO update the JSON string below -json = "{}" -# create an instance of RuleDefinition from a JSON string -rule_definition_instance = RuleDefinition.from_json(json) -# print the JSON string representation of the object -print(RuleDefinition.to_json()) - -# convert the object into a dict -rule_definition_dict = rule_definition_instance.to_dict() -# create an instance of RuleDefinition from a dict -rule_definition_form_dict = rule_definition.from_dict(rule_definition_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SearchQuery.md b/docs/SearchQuery.md deleted file mode 100644 index dbd299ab..00000000 --- a/docs/SearchQuery.md +++ /dev/null @@ -1,29 +0,0 @@ -# SearchQuery - -Search query to filter policy templates, applies on title and description. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.search_query import SearchQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of SearchQuery from a JSON string -search_query_instance = SearchQuery.from_json(json) -# print the JSON string representation of the object -print(SearchQuery.to_json()) - -# convert the object into a dict -search_query_dict = search_query_instance.to_dict() -# create an instance of SearchQuery from a dict -search_query_form_dict = search_query.from_dict(search_query_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Services.md b/docs/Services.md deleted file mode 100644 index 2b458c84..00000000 --- a/docs/Services.md +++ /dev/null @@ -1,29 +0,0 @@ -# Services - -The list of services associated the policy template. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.services import Services - -# TODO update the JSON string below -json = "{}" -# create an instance of Services from a JSON string -services_instance = Services.from_json(json) -# print the JSON string representation of the object -print(Services.to_json()) - -# convert the object into a dict -services_dict = services_instance.to_dict() -# create an instance of Services from a dict -services_form_dict = services.from_dict(services_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SourceSchema.md b/docs/SourceSchema.md deleted file mode 100644 index e667ed21..00000000 --- a/docs/SourceSchema.md +++ /dev/null @@ -1,29 +0,0 @@ -# SourceSchema - -The schema for the source of the policy template pack. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.source_schema import SourceSchema - -# TODO update the JSON string below -json = "{}" -# create an instance of SourceSchema from a JSON string -source_schema_instance = SourceSchema.from_json(json) -# print the JSON string representation of the object -print(SourceSchema.to_json()) - -# convert the object into a dict -source_schema_dict = source_schema_instance.to_dict() -# create an instance of SourceSchema from a dict -source_schema_form_dict = source_schema.from_dict(source_schema_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Sources.md b/docs/Sources.md deleted file mode 100644 index 9f3becb7..00000000 --- a/docs/Sources.md +++ /dev/null @@ -1,29 +0,0 @@ -# Sources - -Different sources from where user signed up. e.g. social signup, username-password - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.sources import Sources - -# TODO update the JSON string below -json = "{}" -# create an instance of Sources from a JSON string -sources_instance = Sources.from_json(json) -# print the JSON string representation of the object -print(Sources.to_json()) - -# convert the object into a dict -sources_dict = sources_instance.to_dict() -# create an instance of Sources from a dict -sources_form_dict = sources.from_dict(sources_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/States.md b/docs/States.md deleted file mode 100644 index cc631960..00000000 --- a/docs/States.md +++ /dev/null @@ -1,29 +0,0 @@ -# States - -State filter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.states import States - -# TODO update the JSON string below -json = "{}" -# create an instance of States from a JSON string -states_instance = States.from_json(json) -# print the JSON string representation of the object -print(States.to_json()) - -# convert the object into a dict -states_dict = states_instance.to_dict() -# create an instance of States from a dict -states_form_dict = states.from_dict(states_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TenantFilters.md b/docs/TenantFilters.md index c50883e0..94d475b9 100644 --- a/docs/TenantFilters.md +++ b/docs/TenantFilters.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**names** | [**Names**](Names.md) | | [optional] -**tenant_states** | [**TenantStates**](TenantStates.md) | | [optional] +**names** | **object** | | [optional] +**tenant_states** | **object** | | [optional] ## Example diff --git a/docs/TenantId.md b/docs/TenantId.md deleted file mode 100644 index 1e39b3a0..00000000 --- a/docs/TenantId.md +++ /dev/null @@ -1,29 +0,0 @@ -# TenantId - -Tenant ID - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.tenant_id import TenantId - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantId from a JSON string -tenant_id_instance = TenantId.from_json(json) -# print the JSON string representation of the object -print(TenantId.to_json()) - -# convert the object into a dict -tenant_id_dict = tenant_id_instance.to_dict() -# create an instance of TenantId from a dict -tenant_id_form_dict = tenant_id.from_dict(tenant_id_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TenantIds.md b/docs/TenantIds.md deleted file mode 100644 index b423fa9e..00000000 --- a/docs/TenantIds.md +++ /dev/null @@ -1,29 +0,0 @@ -# TenantIds - -Tenant ID filter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.tenant_ids import TenantIds - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantIds from a JSON string -tenant_ids_instance = TenantIds.from_json(json) -# print the JSON string representation of the object -print(TenantIds.to_json()) - -# convert the object into a dict -tenant_ids_dict = tenant_ids_instance.to_dict() -# create an instance of TenantIds from a dict -tenant_ids_form_dict = tenant_ids.from_dict(tenant_ids_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TenantProvider.md b/docs/TenantProvider.md index 25bfc449..c5dee584 100644 --- a/docs/TenantProvider.md +++ b/docs/TenantProvider.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cloud_provider** | **str** | Cloud provider | **cloud_id** | **str** | Cloud ID | -**parent_id** | [**ParentId**](ParentId.md) | | [optional] +**parent_id** | **str** | | [optional] **provider_config** | **object** | provider config | **id** | **str** | Unique ID for the Tenant Provider | **is_parent_account** | **bool** | billing account | diff --git a/docs/TenantProviderFilterData.md b/docs/TenantProviderFilterData.md deleted file mode 100644 index 7c3644c0..00000000 --- a/docs/TenantProviderFilterData.md +++ /dev/null @@ -1,28 +0,0 @@ -# TenantProviderFilterData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.tenant_provider_filter_data import TenantProviderFilterData - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantProviderFilterData from a JSON string -tenant_provider_filter_data_instance = TenantProviderFilterData.from_json(json) -# print the JSON string representation of the object -print(TenantProviderFilterData.to_json()) - -# convert the object into a dict -tenant_provider_filter_data_dict = tenant_provider_filter_data_instance.to_dict() -# create an instance of TenantProviderFilterData from a dict -tenant_provider_filter_data_form_dict = tenant_provider_filter_data.from_dict(tenant_provider_filter_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TenantProviderFilters.md b/docs/TenantProviderFilters.md index 0cccdacd..bd558050 100644 --- a/docs/TenantProviderFilters.md +++ b/docs/TenantProviderFilters.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tenant_ids** | [**TenantIds**](TenantIds.md) | | [optional] -**cloud_ids** | [**CloudIds**](CloudIds.md) | | [optional] -**cloud_providers** | [**CloudProviders**](CloudProviders.md) | | [optional] -**parent_ids** | [**ParentIds**](ParentIds.md) | | [optional] -**is_parent_account** | [**IsParentAccount**](IsParentAccount.md) | | [optional] -**is_verified** | [**IsVerified**](IsVerified.md) | | [optional] -**states** | [**States**](States.md) | | [optional] +**tenant_ids** | **object** | | [optional] +**cloud_ids** | **object** | | [optional] +**cloud_providers** | **object** | | [optional] +**parent_ids** | **object** | | [optional] +**is_parent_account** | **bool** | | [optional] +**is_verified** | **bool** | | [optional] +**states** | **object** | | [optional] ## Example diff --git a/docs/TenantStates.md b/docs/TenantStates.md deleted file mode 100644 index 1741f95f..00000000 --- a/docs/TenantStates.md +++ /dev/null @@ -1,28 +0,0 @@ -# TenantStates - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.tenant_states import TenantStates - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantStates from a JSON string -tenant_states_instance = TenantStates.from_json(json) -# print the JSON string representation of the object -print(TenantStates.to_json()) - -# convert the object into a dict -tenant_states_dict = tenant_states_instance.to_dict() -# create an instance of TenantStates from a dict -tenant_states_form_dict = tenant_states.from_dict(tenant_states_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TenantUserUpdateFieldsMixin.md b/docs/TenantUserUpdateFieldsMixin.md index b0e178e8..20248643 100644 --- a/docs/TenantUserUpdateFieldsMixin.md +++ b/docs/TenantUserUpdateFieldsMixin.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | [**TenantUserUpdateFieldsMixinStatus**](TenantUserUpdateFieldsMixinStatus.md) | | [optional] -**role** | [**TenantUserUpdateFieldsMixinRole**](TenantUserUpdateFieldsMixinRole.md) | | [optional] -**sources** | [**Sources**](Sources.md) | | [optional] +**status** | [**UserStatus**](UserStatus.md) | | [optional] +**role** | [**UserRole**](UserRole.md) | | [optional] +**sources** | **object** | | [optional] ## Example diff --git a/docs/TenantUserUpdateFieldsMixinRole.md b/docs/TenantUserUpdateFieldsMixinRole.md deleted file mode 100644 index 5f850ed8..00000000 --- a/docs/TenantUserUpdateFieldsMixinRole.md +++ /dev/null @@ -1,29 +0,0 @@ -# TenantUserUpdateFieldsMixinRole - -Role of the user in the tenant - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.tenant_user_update_fields_mixin_role import TenantUserUpdateFieldsMixinRole - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantUserUpdateFieldsMixinRole from a JSON string -tenant_user_update_fields_mixin_role_instance = TenantUserUpdateFieldsMixinRole.from_json(json) -# print the JSON string representation of the object -print(TenantUserUpdateFieldsMixinRole.to_json()) - -# convert the object into a dict -tenant_user_update_fields_mixin_role_dict = tenant_user_update_fields_mixin_role_instance.to_dict() -# create an instance of TenantUserUpdateFieldsMixinRole from a dict -tenant_user_update_fields_mixin_role_form_dict = tenant_user_update_fields_mixin_role.from_dict(tenant_user_update_fields_mixin_role_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TenantUserUpdateFieldsMixinStatus.md b/docs/TenantUserUpdateFieldsMixinStatus.md deleted file mode 100644 index 46273c7f..00000000 --- a/docs/TenantUserUpdateFieldsMixinStatus.md +++ /dev/null @@ -1,29 +0,0 @@ -# TenantUserUpdateFieldsMixinStatus - -Status of the user like ACTIVE, BLOCKED etc. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.tenant_user_update_fields_mixin_status import TenantUserUpdateFieldsMixinStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of TenantUserUpdateFieldsMixinStatus from a JSON string -tenant_user_update_fields_mixin_status_instance = TenantUserUpdateFieldsMixinStatus.from_json(json) -# print the JSON string representation of the object -print(TenantUserUpdateFieldsMixinStatus.to_json()) - -# convert the object into a dict -tenant_user_update_fields_mixin_status_dict = tenant_user_update_fields_mixin_status_instance.to_dict() -# create an instance of TenantUserUpdateFieldsMixinStatus from a dict -tenant_user_update_fields_mixin_status_form_dict = tenant_user_update_fields_mixin_status.from_dict(tenant_user_update_fields_mixin_status_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Timezone.md b/docs/Timezone.md deleted file mode 100644 index d5e98581..00000000 --- a/docs/Timezone.md +++ /dev/null @@ -1,29 +0,0 @@ -# Timezone - -Timezone of the tenant - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.timezone import Timezone - -# TODO update the JSON string below -json = "{}" -# create an instance of Timezone from a JSON string -timezone_instance = Timezone.from_json(json) -# print the JSON string representation of the object -print(Timezone.to_json()) - -# convert the object into a dict -timezone_dict = timezone_instance.to_dict() -# create an instance of Timezone from a dict -timezone_form_dict = timezone.from_dict(timezone_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Title.md b/docs/Title.md deleted file mode 100644 index 0020b851..00000000 --- a/docs/Title.md +++ /dev/null @@ -1,29 +0,0 @@ -# Title - -The title of the policy template. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from onelens_backend_client.models.title import Title - -# TODO update the JSON string below -json = "{}" -# create an instance of Title from a JSON string -title_instance = Title.from_json(json) -# print the JSON string representation of the object -print(Title.to_json()) - -# convert the object into a dict -title_dict = title_instance.to_dict() -# create an instance of Title from a dict -title_form_dict = title.from_dict(title_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdatePolicyTemplateRequest.md b/docs/UpdatePolicyTemplateRequest.md index f1571225..f5cec4fb 100644 --- a/docs/UpdatePolicyTemplateRequest.md +++ b/docs/UpdatePolicyTemplateRequest.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | [**Title**](Title.md) | | [optional] -**description** | [**Description**](Description.md) | | [optional] -**services** | [**Services**](Services.md) | | [optional] -**execution_type** | [**PolicyTemplateUpdateFieldsMixinExecutionType**](PolicyTemplateUpdateFieldsMixinExecutionType.md) | | [optional] -**details** | [**PolicyTemplateUpdateFieldsMixinDetails**](PolicyTemplateUpdateFieldsMixinDetails.md) | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**services** | **object** | | [optional] +**execution_type** | [**PolicyExecutionType**](PolicyExecutionType.md) | | [optional] +**details** | [**PolicyTemplateDetails**](PolicyTemplateDetails.md) | | [optional] **id** | **str** | The unique identifier of the policy template. | ## Example diff --git a/docs/UpdateTenantProviderRequest.md b/docs/UpdateTenantProviderRequest.md index 546bb44f..df972c26 100644 --- a/docs/UpdateTenantProviderRequest.md +++ b/docs/UpdateTenantProviderRequest.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cloud_id** | [**CloudId**](CloudId.md) | | [optional] -**parent_id** | [**ParentId1**](ParentId1.md) | | [optional] -**provider_config** | [**ProviderConfig**](ProviderConfig.md) | | [optional] +**cloud_id** | **str** | | [optional] +**parent_id** | **str** | | [optional] +**provider_config** | **object** | | [optional] ## Example diff --git a/docs/UpdateTenantProviderResponse.md b/docs/UpdateTenantProviderResponse.md index d72e767c..bb24f543 100644 --- a/docs/UpdateTenantProviderResponse.md +++ b/docs/UpdateTenantProviderResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cloud_provider** | **str** | Cloud provider | **cloud_id** | **str** | Cloud ID | -**parent_id** | [**ParentId**](ParentId.md) | | [optional] +**parent_id** | **str** | | [optional] **provider_config** | **object** | provider config | **id** | **str** | Unique ID for the Tenant Provider | **is_parent_account** | **bool** | billing account | diff --git a/docs/UpdateTenantRequest.md b/docs/UpdateTenantRequest.md index 00ac7e6e..089f584f 100644 --- a/docs/UpdateTenantRequest.md +++ b/docs/UpdateTenantRequest.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | [**Name**](Name.md) | | [optional] -**domains** | [**Domains**](Domains.md) | | [optional] -**timezone** | [**Timezone**](Timezone.md) | | [optional] +**name** | **str** | | [optional] +**domains** | **object** | | [optional] +**timezone** | **str** | | [optional] ## Example diff --git a/docs/UpdateTenantUserResponse.md b/docs/UpdateTenantUserResponse.md index 800d0d24..9f61e9ce 100644 --- a/docs/UpdateTenantUserResponse.md +++ b/docs/UpdateTenantUserResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | [**CreateTenantUserResponseStatus**](CreateTenantUserResponseStatus.md) | | [optional] +**status** | [**UserStatus**](UserStatus.md) | | [optional] **ol_user_id** | **str** | Unique onelens identifier for the user | -**role** | [**CreateTenantUserRequestRole**](CreateTenantUserRequestRole.md) | | [optional] +**role** | [**UserRole**](UserRole.md) | | [optional] **sources** | **List[str]** | Different sources from where user signed up. e.g. social signup, username-password | **id** | **str** | PK in the tenant users table | diff --git a/onelens_backend_client/__init__.py b/onelens_backend_client/__init__.py index 9a10546a..db6d9080 100644 --- a/onelens_backend_client/__init__.py +++ b/onelens_backend_client/__init__.py @@ -43,12 +43,7 @@ # import models into sdk package from onelens_backend_client.models.activate_policy_template_request import ActivatePolicyTemplateRequest -from onelens_backend_client.models.attributes_data import AttributesData from onelens_backend_client.models.aws_service import AwsService -from onelens_backend_client.models.cloud_id import CloudId -from onelens_backend_client.models.cloud_ids import CloudIds -from onelens_backend_client.models.cloud_providers import CloudProviders -from onelens_backend_client.models.config_schema import ConfigSchema from onelens_backend_client.models.create_policy_template_pack_request import CreatePolicyTemplatePackRequest from onelens_backend_client.models.create_policy_template_pack_response import CreatePolicyTemplatePackResponse from onelens_backend_client.models.create_policy_template_request import CreatePolicyTemplateRequest @@ -59,20 +54,14 @@ from onelens_backend_client.models.create_tenant_request import CreateTenantRequest from onelens_backend_client.models.create_tenant_response import CreateTenantResponse from onelens_backend_client.models.create_tenant_user_request import CreateTenantUserRequest -from onelens_backend_client.models.create_tenant_user_request_role import CreateTenantUserRequestRole from onelens_backend_client.models.create_tenant_user_response import CreateTenantUserResponse -from onelens_backend_client.models.create_tenant_user_response_status import CreateTenantUserResponseStatus from onelens_backend_client.models.create_user_request import CreateUserRequest from onelens_backend_client.models.create_user_response import CreateUserResponse from onelens_backend_client.models.create_user_tenant_mapping_request import CreateUserTenantMappingRequest from onelens_backend_client.models.create_user_tenant_mapping_response import CreateUserTenantMappingResponse -from onelens_backend_client.models.database_connection_string import DatabaseConnectionString from onelens_backend_client.models.deactivate_policy_template_request import DeactivatePolicyTemplateRequest -from onelens_backend_client.models.default_policy_config import DefaultPolicyConfig from onelens_backend_client.models.deprecate_policy_template_request import DeprecatePolicyTemplateRequest -from onelens_backend_client.models.description import Description from onelens_backend_client.models.disable_tenant_request import DisableTenantRequest -from onelens_backend_client.models.domains import Domains from onelens_backend_client.models.gcp_service import GcpService from onelens_backend_client.models.get_all_users_request import GetAllUsersRequest from onelens_backend_client.models.get_all_users_response import GetAllUsersResponse @@ -93,33 +82,19 @@ from onelens_backend_client.models.get_tenants_response import GetTenantsResponse from onelens_backend_client.models.get_user_by_id_response import GetUserByIDResponse from onelens_backend_client.models.http_validation_error import HTTPValidationError -from onelens_backend_client.models.inputs import Inputs -from onelens_backend_client.models.is_parent_account import IsParentAccount -from onelens_backend_client.models.is_verified import IsVerified -from onelens_backend_client.models.message import Message -from onelens_backend_client.models.name import Name -from onelens_backend_client.models.names import Names -from onelens_backend_client.models.output_violation_schema import OutputViolationSchema from onelens_backend_client.models.pagination_fields import PaginationFields from onelens_backend_client.models.pagination_params import PaginationParams -from onelens_backend_client.models.parent_id import ParentId -from onelens_backend_client.models.parent_id1 import ParentId1 -from onelens_backend_client.models.parent_ids import ParentIds from onelens_backend_client.models.policy_category import PolicyCategory from onelens_backend_client.models.policy_execution_type import PolicyExecutionType from onelens_backend_client.models.policy_template import PolicyTemplate from onelens_backend_client.models.policy_template_details import PolicyTemplateDetails -from onelens_backend_client.models.policy_template_details_rule_type import PolicyTemplateDetailsRuleType from onelens_backend_client.models.policy_template_filters import PolicyTemplateFilters from onelens_backend_client.models.policy_template_pack import PolicyTemplatePack from onelens_backend_client.models.policy_template_pack_details import PolicyTemplatePackDetails from onelens_backend_client.models.policy_template_pack_state import PolicyTemplatePackState from onelens_backend_client.models.policy_template_state import PolicyTemplateState from onelens_backend_client.models.policy_template_update_fields_mixin import PolicyTemplateUpdateFieldsMixin -from onelens_backend_client.models.policy_template_update_fields_mixin_details import PolicyTemplateUpdateFieldsMixinDetails -from onelens_backend_client.models.policy_template_update_fields_mixin_execution_type import PolicyTemplateUpdateFieldsMixinExecutionType from onelens_backend_client.models.provider import Provider -from onelens_backend_client.models.provider_config import ProviderConfig from onelens_backend_client.models.response_activate_policy_template_response import ResponseActivatePolicyTemplateResponse from onelens_backend_client.models.response_create_policy_template_pack_response import ResponseCreatePolicyTemplatePackResponse from onelens_backend_client.models.response_create_policy_template_response import ResponseCreatePolicyTemplateResponse @@ -141,30 +116,16 @@ from onelens_backend_client.models.response_update_tenant_provider_response import ResponseUpdateTenantProviderResponse from onelens_backend_client.models.response_update_tenant_response import ResponseUpdateTenantResponse from onelens_backend_client.models.response_update_tenant_user_response import ResponseUpdateTenantUserResponse -from onelens_backend_client.models.rule_definition import RuleDefinition from onelens_backend_client.models.rule_type import RuleType -from onelens_backend_client.models.search_query import SearchQuery -from onelens_backend_client.models.services import Services -from onelens_backend_client.models.source_schema import SourceSchema -from onelens_backend_client.models.sources import Sources -from onelens_backend_client.models.states import States from onelens_backend_client.models.tenant import Tenant from onelens_backend_client.models.tenant_filters import TenantFilters -from onelens_backend_client.models.tenant_id import TenantId -from onelens_backend_client.models.tenant_ids import TenantIds from onelens_backend_client.models.tenant_provider import TenantProvider from onelens_backend_client.models.tenant_provider_attributes import TenantProviderAttributes -from onelens_backend_client.models.tenant_provider_filter_data import TenantProviderFilterData from onelens_backend_client.models.tenant_provider_filters import TenantProviderFilters from onelens_backend_client.models.tenant_state import TenantState -from onelens_backend_client.models.tenant_states import TenantStates from onelens_backend_client.models.tenant_user_update_fields_mixin import TenantUserUpdateFieldsMixin -from onelens_backend_client.models.tenant_user_update_fields_mixin_role import TenantUserUpdateFieldsMixinRole -from onelens_backend_client.models.tenant_user_update_fields_mixin_status import TenantUserUpdateFieldsMixinStatus from onelens_backend_client.models.tenant_verify_request import TenantVerifyRequest from onelens_backend_client.models.tenant_verify_response import TenantVerifyResponse -from onelens_backend_client.models.timezone import Timezone -from onelens_backend_client.models.title import Title from onelens_backend_client.models.update_policy_template_request import UpdatePolicyTemplateRequest from onelens_backend_client.models.update_policy_template_response import UpdatePolicyTemplateResponse from onelens_backend_client.models.update_tenant_provider_request import UpdateTenantProviderRequest diff --git a/onelens_backend_client/api/default_api.py b/onelens_backend_client/api/default_api.py index 2fdebb50..1ed6cebf 100644 --- a/onelens_backend_client/api/default_api.py +++ b/onelens_backend_client/api/default_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import Any from onelens_backend_client.api_client import ApiClient, RequestSerialized from onelens_backend_client.api_response import ApiResponse diff --git a/onelens_backend_client/api/policy_template_service_api.py b/onelens_backend_client/api/policy_template_service_api.py index 490b596f..6e68637b 100644 --- a/onelens_backend_client/api/policy_template_service_api.py +++ b/onelens_backend_client/api/policy_template_service_api.py @@ -16,6 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import Any, Dict from onelens_backend_client.models.activate_policy_template_request import ActivatePolicyTemplateRequest from onelens_backend_client.models.create_policy_template_request import CreatePolicyTemplateRequest from onelens_backend_client.models.create_policy_template_response import CreatePolicyTemplateResponse diff --git a/onelens_backend_client/api/tenant_service_api.py b/onelens_backend_client/api/tenant_service_api.py index 72f91e89..2dc26a73 100644 --- a/onelens_backend_client/api/tenant_service_api.py +++ b/onelens_backend_client/api/tenant_service_api.py @@ -17,6 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictStr +from typing import Any, Dict from onelens_backend_client.models.create_tenant_request import CreateTenantRequest from onelens_backend_client.models.create_tenant_response import CreateTenantResponse from onelens_backend_client.models.disable_tenant_request import DisableTenantRequest diff --git a/onelens_backend_client/api/users_api.py b/onelens_backend_client/api/users_api.py index 9a3b4ade..f6bfab01 100644 --- a/onelens_backend_client/api/users_api.py +++ b/onelens_backend_client/api/users_api.py @@ -17,6 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictStr +from typing import Any from onelens_backend_client.models.create_user_request import CreateUserRequest from onelens_backend_client.models.create_user_response import CreateUserResponse from onelens_backend_client.models.get_all_users_request import GetAllUsersRequest diff --git a/onelens_backend_client/models/__init__.py b/onelens_backend_client/models/__init__.py index ea3cf22e..e2e356b9 100644 --- a/onelens_backend_client/models/__init__.py +++ b/onelens_backend_client/models/__init__.py @@ -15,12 +15,7 @@ # import models into model package from onelens_backend_client.models.activate_policy_template_request import ActivatePolicyTemplateRequest -from onelens_backend_client.models.attributes_data import AttributesData from onelens_backend_client.models.aws_service import AwsService -from onelens_backend_client.models.cloud_id import CloudId -from onelens_backend_client.models.cloud_ids import CloudIds -from onelens_backend_client.models.cloud_providers import CloudProviders -from onelens_backend_client.models.config_schema import ConfigSchema from onelens_backend_client.models.create_policy_template_pack_request import CreatePolicyTemplatePackRequest from onelens_backend_client.models.create_policy_template_pack_response import CreatePolicyTemplatePackResponse from onelens_backend_client.models.create_policy_template_request import CreatePolicyTemplateRequest @@ -31,20 +26,14 @@ from onelens_backend_client.models.create_tenant_request import CreateTenantRequest from onelens_backend_client.models.create_tenant_response import CreateTenantResponse from onelens_backend_client.models.create_tenant_user_request import CreateTenantUserRequest -from onelens_backend_client.models.create_tenant_user_request_role import CreateTenantUserRequestRole from onelens_backend_client.models.create_tenant_user_response import CreateTenantUserResponse -from onelens_backend_client.models.create_tenant_user_response_status import CreateTenantUserResponseStatus from onelens_backend_client.models.create_user_request import CreateUserRequest from onelens_backend_client.models.create_user_response import CreateUserResponse from onelens_backend_client.models.create_user_tenant_mapping_request import CreateUserTenantMappingRequest from onelens_backend_client.models.create_user_tenant_mapping_response import CreateUserTenantMappingResponse -from onelens_backend_client.models.database_connection_string import DatabaseConnectionString from onelens_backend_client.models.deactivate_policy_template_request import DeactivatePolicyTemplateRequest -from onelens_backend_client.models.default_policy_config import DefaultPolicyConfig from onelens_backend_client.models.deprecate_policy_template_request import DeprecatePolicyTemplateRequest -from onelens_backend_client.models.description import Description from onelens_backend_client.models.disable_tenant_request import DisableTenantRequest -from onelens_backend_client.models.domains import Domains from onelens_backend_client.models.gcp_service import GcpService from onelens_backend_client.models.get_all_users_request import GetAllUsersRequest from onelens_backend_client.models.get_all_users_response import GetAllUsersResponse @@ -65,33 +54,19 @@ from onelens_backend_client.models.get_tenants_response import GetTenantsResponse from onelens_backend_client.models.get_user_by_id_response import GetUserByIDResponse from onelens_backend_client.models.http_validation_error import HTTPValidationError -from onelens_backend_client.models.inputs import Inputs -from onelens_backend_client.models.is_parent_account import IsParentAccount -from onelens_backend_client.models.is_verified import IsVerified -from onelens_backend_client.models.message import Message -from onelens_backend_client.models.name import Name -from onelens_backend_client.models.names import Names -from onelens_backend_client.models.output_violation_schema import OutputViolationSchema from onelens_backend_client.models.pagination_fields import PaginationFields from onelens_backend_client.models.pagination_params import PaginationParams -from onelens_backend_client.models.parent_id import ParentId -from onelens_backend_client.models.parent_id1 import ParentId1 -from onelens_backend_client.models.parent_ids import ParentIds from onelens_backend_client.models.policy_category import PolicyCategory from onelens_backend_client.models.policy_execution_type import PolicyExecutionType from onelens_backend_client.models.policy_template import PolicyTemplate from onelens_backend_client.models.policy_template_details import PolicyTemplateDetails -from onelens_backend_client.models.policy_template_details_rule_type import PolicyTemplateDetailsRuleType from onelens_backend_client.models.policy_template_filters import PolicyTemplateFilters from onelens_backend_client.models.policy_template_pack import PolicyTemplatePack from onelens_backend_client.models.policy_template_pack_details import PolicyTemplatePackDetails from onelens_backend_client.models.policy_template_pack_state import PolicyTemplatePackState from onelens_backend_client.models.policy_template_state import PolicyTemplateState from onelens_backend_client.models.policy_template_update_fields_mixin import PolicyTemplateUpdateFieldsMixin -from onelens_backend_client.models.policy_template_update_fields_mixin_details import PolicyTemplateUpdateFieldsMixinDetails -from onelens_backend_client.models.policy_template_update_fields_mixin_execution_type import PolicyTemplateUpdateFieldsMixinExecutionType from onelens_backend_client.models.provider import Provider -from onelens_backend_client.models.provider_config import ProviderConfig from onelens_backend_client.models.response_activate_policy_template_response import ResponseActivatePolicyTemplateResponse from onelens_backend_client.models.response_create_policy_template_pack_response import ResponseCreatePolicyTemplatePackResponse from onelens_backend_client.models.response_create_policy_template_response import ResponseCreatePolicyTemplateResponse @@ -113,30 +88,16 @@ from onelens_backend_client.models.response_update_tenant_provider_response import ResponseUpdateTenantProviderResponse from onelens_backend_client.models.response_update_tenant_response import ResponseUpdateTenantResponse from onelens_backend_client.models.response_update_tenant_user_response import ResponseUpdateTenantUserResponse -from onelens_backend_client.models.rule_definition import RuleDefinition from onelens_backend_client.models.rule_type import RuleType -from onelens_backend_client.models.search_query import SearchQuery -from onelens_backend_client.models.services import Services -from onelens_backend_client.models.source_schema import SourceSchema -from onelens_backend_client.models.sources import Sources -from onelens_backend_client.models.states import States from onelens_backend_client.models.tenant import Tenant from onelens_backend_client.models.tenant_filters import TenantFilters -from onelens_backend_client.models.tenant_id import TenantId -from onelens_backend_client.models.tenant_ids import TenantIds from onelens_backend_client.models.tenant_provider import TenantProvider from onelens_backend_client.models.tenant_provider_attributes import TenantProviderAttributes -from onelens_backend_client.models.tenant_provider_filter_data import TenantProviderFilterData from onelens_backend_client.models.tenant_provider_filters import TenantProviderFilters from onelens_backend_client.models.tenant_state import TenantState -from onelens_backend_client.models.tenant_states import TenantStates from onelens_backend_client.models.tenant_user_update_fields_mixin import TenantUserUpdateFieldsMixin -from onelens_backend_client.models.tenant_user_update_fields_mixin_role import TenantUserUpdateFieldsMixinRole -from onelens_backend_client.models.tenant_user_update_fields_mixin_status import TenantUserUpdateFieldsMixinStatus from onelens_backend_client.models.tenant_verify_request import TenantVerifyRequest from onelens_backend_client.models.tenant_verify_response import TenantVerifyResponse -from onelens_backend_client.models.timezone import Timezone -from onelens_backend_client.models.title import Title from onelens_backend_client.models.update_policy_template_request import UpdatePolicyTemplateRequest from onelens_backend_client.models.update_policy_template_response import UpdatePolicyTemplateResponse from onelens_backend_client.models.update_tenant_provider_request import UpdateTenantProviderRequest diff --git a/onelens_backend_client/models/attributes_data.py b/onelens_backend_client/models/attributes_data.py deleted file mode 100644 index db7c469d..00000000 --- a/onelens_backend_client/models/attributes_data.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -ATTRIBUTESDATA_ANY_OF_SCHEMAS = ["object"] - -class AttributesData(BaseModel): - """ - AttributesData - """ - - # data type: object - anyof_schema_1_validator: Optional[Dict[str, Any]] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = AttributesData.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in AttributesData with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into AttributesData with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/cloud_id.py b/onelens_backend_client/models/cloud_id.py deleted file mode 100644 index cd1ec159..00000000 --- a/onelens_backend_client/models/cloud_id.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -CLOUDID_ANY_OF_SCHEMAS = ["object", "str"] - -class CloudId(BaseModel): - """ - CloudId - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = CloudId.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in CloudId with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into CloudId with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/cloud_ids.py b/onelens_backend_client/models/cloud_ids.py deleted file mode 100644 index a60c2ab6..00000000 --- a/onelens_backend_client/models/cloud_ids.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -CLOUDIDS_ANY_OF_SCHEMAS = ["object"] - -class CloudIds(BaseModel): - """ - Cloud ID filter - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = CloudIds.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in CloudIds with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into CloudIds with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/cloud_providers.py b/onelens_backend_client/models/cloud_providers.py deleted file mode 100644 index 1859e92a..00000000 --- a/onelens_backend_client/models/cloud_providers.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -CLOUDPROVIDERS_ANY_OF_SCHEMAS = ["object"] - -class CloudProviders(BaseModel): - """ - Cloud provider filter - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = CloudProviders.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in CloudProviders with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into CloudProviders with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/config_schema.py b/onelens_backend_client/models/config_schema.py deleted file mode 100644 index f341c2e3..00000000 --- a/onelens_backend_client/models/config_schema.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -CONFIGSCHEMA_ANY_OF_SCHEMAS = ["object"] - -class ConfigSchema(BaseModel): - """ - The schema for the policy config for this policy template. - """ - - # data type: object - anyof_schema_1_validator: Optional[Dict[str, Any]] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = ConfigSchema.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in ConfigSchema with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into ConfigSchema with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/create_tenant_provider_request.py b/onelens_backend_client/models/create_tenant_provider_request.py index 22c66636..c6f4570e 100644 --- a/onelens_backend_client/models/create_tenant_provider_request.py +++ b/onelens_backend_client/models/create_tenant_provider_request.py @@ -19,8 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.parent_id import ParentId -from onelens_backend_client.models.tenant_id import TenantId from typing import Optional, Set from typing_extensions import Self @@ -30,9 +28,9 @@ class CreateTenantProviderRequest(BaseModel): """ # noqa: E501 cloud_provider: StrictStr = Field(description="Cloud provider") cloud_id: StrictStr = Field(description="Cloud ID") - parent_id: Optional[ParentId] = None + parent_id: Optional[StrictStr] = None provider_config: Dict[str, Any] = Field(description="Provider config") - tenant_id: Optional[TenantId] = None + tenant_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["cloud_provider", "cloud_id", "parent_id", "provider_config", "tenant_id"] model_config = ConfigDict( @@ -74,12 +72,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of parent_id - if self.parent_id: - _dict['parent_id'] = self.parent_id.to_dict() - # override the default output from pydantic by calling `to_dict()` of tenant_id - if self.tenant_id: - _dict['tenant_id'] = self.tenant_id.to_dict() + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + # set to None if tenant_id (nullable) is None + # and model_fields_set contains the field + if self.tenant_id is None and "tenant_id" in self.model_fields_set: + _dict['tenant_id'] = None + return _dict @classmethod @@ -94,9 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "cloud_provider": obj.get("cloud_provider"), "cloud_id": obj.get("cloud_id"), - "parent_id": ParentId.from_dict(obj["parent_id"]) if obj.get("parent_id") is not None else None, + "parent_id": obj.get("parent_id"), "provider_config": obj.get("provider_config"), - "tenant_id": TenantId.from_dict(obj["tenant_id"]) if obj.get("tenant_id") is not None else None + "tenant_id": obj.get("tenant_id") }) return _obj diff --git a/onelens_backend_client/models/create_tenant_provider_response.py b/onelens_backend_client/models/create_tenant_provider_response.py index e5ebeab1..deae461c 100644 --- a/onelens_backend_client/models/create_tenant_provider_response.py +++ b/onelens_backend_client/models/create_tenant_provider_response.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.parent_id import ParentId from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class CreateTenantProviderResponse(BaseModel): """ # noqa: E501 cloud_provider: StrictStr = Field(description="Cloud provider") cloud_id: StrictStr = Field(description="Cloud ID") - parent_id: Optional[ParentId] = None + parent_id: Optional[StrictStr] = None provider_config: Dict[str, Any] = Field(description="provider config") id: StrictStr = Field(description="Unique ID for the Tenant Provider") is_parent_account: StrictBool = Field(description="billing account") @@ -76,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of parent_id - if self.parent_id: - _dict['parent_id'] = self.parent_id.to_dict() + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + return _dict @classmethod @@ -93,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "cloud_provider": obj.get("cloud_provider"), "cloud_id": obj.get("cloud_id"), - "parent_id": ParentId.from_dict(obj["parent_id"]) if obj.get("parent_id") is not None else None, + "parent_id": obj.get("parent_id"), "provider_config": obj.get("provider_config"), "id": obj.get("id"), "is_parent_account": obj.get("is_parent_account"), diff --git a/onelens_backend_client/models/create_tenant_user_request.py b/onelens_backend_client/models/create_tenant_user_request.py index 47df4458..4af71871 100644 --- a/onelens_backend_client/models/create_tenant_user_request.py +++ b/onelens_backend_client/models/create_tenant_user_request.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.create_tenant_user_request_role import CreateTenantUserRequestRole +from onelens_backend_client.models.user_role import UserRole from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class CreateTenantUserRequest(BaseModel): CreateTenantUserRequest """ # noqa: E501 ol_user_id: StrictStr = Field(description="Unique onelens identifier for the user") - role: Optional[CreateTenantUserRequestRole] = None + role: Optional[UserRole] = None sources: List[StrictStr] = Field(description="Different sources from where user signed up. e.g. social signup, username-password") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["ol_user_id", "role", "sources"] @@ -74,14 +74,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of role - if self.role: - _dict['role'] = self.role.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if role (nullable) is None + # and model_fields_set contains the field + if self.role is None and "role" in self.model_fields_set: + _dict['role'] = None + return _dict @classmethod @@ -95,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "ol_user_id": obj.get("ol_user_id"), - "role": CreateTenantUserRequestRole.from_dict(obj["role"]) if obj.get("role") is not None else None, + "role": obj.get("role"), "sources": obj.get("sources") }) # store additional fields in additional_properties diff --git a/onelens_backend_client/models/create_tenant_user_request_role.py b/onelens_backend_client/models/create_tenant_user_request_role.py deleted file mode 100644 index fcfa2b40..00000000 --- a/onelens_backend_client/models/create_tenant_user_request_role.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from onelens_backend_client.models.user_role import UserRole -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -CREATETENANTUSERREQUESTROLE_ANY_OF_SCHEMAS = ["UserRole", "object"] - -class CreateTenantUserRequestRole(BaseModel): - """ - Role of the user in the tenant - """ - - # data type: UserRole - anyof_schema_1_validator: Optional[UserRole] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[UserRole, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "UserRole", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = CreateTenantUserRequestRole.model_construct() - error_messages = [] - # validate data type: UserRole - if not isinstance(v, UserRole): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserRole`") - else: - return v - - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in CreateTenantUserRequestRole with anyOf schemas: UserRole, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[UserRole] = None - try: - instance.actual_instance = UserRole.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into CreateTenantUserRequestRole with anyOf schemas: UserRole, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], UserRole, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/create_tenant_user_response.py b/onelens_backend_client/models/create_tenant_user_response.py index 89c02410..b7f397f1 100644 --- a/onelens_backend_client/models/create_tenant_user_response.py +++ b/onelens_backend_client/models/create_tenant_user_response.py @@ -19,8 +19,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.create_tenant_user_request_role import CreateTenantUserRequestRole -from onelens_backend_client.models.create_tenant_user_response_status import CreateTenantUserResponseStatus +from onelens_backend_client.models.user_role import UserRole +from onelens_backend_client.models.user_status import UserStatus from typing import Optional, Set from typing_extensions import Self @@ -28,9 +28,9 @@ class CreateTenantUserResponse(BaseModel): """ CreateTenantUserResponse """ # noqa: E501 - status: Optional[CreateTenantUserResponseStatus] = None + status: Optional[UserStatus] = None ol_user_id: StrictStr = Field(description="Unique onelens identifier for the user") - role: Optional[CreateTenantUserRequestRole] = None + role: Optional[UserRole] = None sources: List[StrictStr] = Field(description="Different sources from where user signed up. e.g. social signup, username-password") id: StrictStr = Field(description="PK in the tenant users table") additional_properties: Dict[str, Any] = {} @@ -77,17 +77,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of status - if self.status: - _dict['status'] = self.status.to_dict() - # override the default output from pydantic by calling `to_dict()` of role - if self.role: - _dict['role'] = self.role.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if role (nullable) is None + # and model_fields_set contains the field + if self.role is None and "role" in self.model_fields_set: + _dict['role'] = None + return _dict @classmethod @@ -100,9 +104,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": CreateTenantUserResponseStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "status": obj.get("status"), "ol_user_id": obj.get("ol_user_id"), - "role": CreateTenantUserRequestRole.from_dict(obj["role"]) if obj.get("role") is not None else None, + "role": obj.get("role"), "sources": obj.get("sources"), "id": obj.get("id") }) diff --git a/onelens_backend_client/models/create_tenant_user_response_status.py b/onelens_backend_client/models/create_tenant_user_response_status.py deleted file mode 100644 index 8fa05a97..00000000 --- a/onelens_backend_client/models/create_tenant_user_response_status.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from onelens_backend_client.models.user_status import UserStatus -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -CREATETENANTUSERRESPONSESTATUS_ANY_OF_SCHEMAS = ["UserStatus", "object"] - -class CreateTenantUserResponseStatus(BaseModel): - """ - Status of the user like ACTIVE, BLOCKED etc. - """ - - # data type: UserStatus - anyof_schema_1_validator: Optional[UserStatus] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[UserStatus, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "UserStatus", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = CreateTenantUserResponseStatus.model_construct() - error_messages = [] - # validate data type: UserStatus - if not isinstance(v, UserStatus): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserStatus`") - else: - return v - - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in CreateTenantUserResponseStatus with anyOf schemas: UserStatus, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[UserStatus] = None - try: - instance.actual_instance = UserStatus.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into CreateTenantUserResponseStatus with anyOf schemas: UserStatus, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], UserStatus, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/database_connection_string.py b/onelens_backend_client/models/database_connection_string.py deleted file mode 100644 index ceca1c81..00000000 --- a/onelens_backend_client/models/database_connection_string.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -DATABASECONNECTIONSTRING_ANY_OF_SCHEMAS = ["object", "str"] - -class DatabaseConnectionString(BaseModel): - """ - DB connection string for tenant - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = DatabaseConnectionString.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in DatabaseConnectionString with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into DatabaseConnectionString with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/default_policy_config.py b/onelens_backend_client/models/default_policy_config.py deleted file mode 100644 index 48a37451..00000000 --- a/onelens_backend_client/models/default_policy_config.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -DEFAULTPOLICYCONFIG_ANY_OF_SCHEMAS = ["object"] - -class DefaultPolicyConfig(BaseModel): - """ - The default configuration for the policy. - """ - - # data type: object - anyof_schema_1_validator: Optional[Dict[str, Any]] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = DefaultPolicyConfig.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in DefaultPolicyConfig with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into DefaultPolicyConfig with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/description.py b/onelens_backend_client/models/description.py deleted file mode 100644 index 6f5a0966..00000000 --- a/onelens_backend_client/models/description.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -DESCRIPTION_ANY_OF_SCHEMAS = ["object", "str"] - -class Description(BaseModel): - """ - The description of the policy template. - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Description.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Description with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Description with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/domains.py b/onelens_backend_client/models/domains.py deleted file mode 100644 index fd18d7ee..00000000 --- a/onelens_backend_client/models/domains.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -DOMAINS_ANY_OF_SCHEMAS = ["object"] - -class Domains(BaseModel): - """ - List of domains - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Domains.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Domains with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Domains with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/get_tenant_by_id_response.py b/onelens_backend_client/models/get_tenant_by_id_response.py index a560abb9..ae0ebdb9 100644 --- a/onelens_backend_client/models/get_tenant_by_id_response.py +++ b/onelens_backend_client/models/get_tenant_by_id_response.py @@ -18,9 +18,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from onelens_backend_client.models.database_connection_string import DatabaseConnectionString from onelens_backend_client.models.tenant_state import TenantState from typing import Optional, Set from typing_extensions import Self @@ -34,7 +33,7 @@ class GetTenantByIDResponse(BaseModel): timezone: StrictStr = Field(description="Timezone of the tenant") id: StrictStr = Field(description="Unique identifier for the tenant") tenant_state: TenantState = Field(description="State of the tenant") - database_connection_string: DatabaseConnectionString + database_connection_string: Optional[StrictStr] __properties: ClassVar[List[str]] = ["name", "domains", "timezone", "id", "tenant_state", "database_connection_string"] model_config = ConfigDict( @@ -76,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of database_connection_string - if self.database_connection_string: - _dict['database_connection_string'] = self.database_connection_string.to_dict() + # set to None if database_connection_string (nullable) is None + # and model_fields_set contains the field + if self.database_connection_string is None and "database_connection_string" in self.model_fields_set: + _dict['database_connection_string'] = None + return _dict @classmethod @@ -96,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "timezone": obj.get("timezone"), "id": obj.get("id"), "tenant_state": obj.get("tenant_state"), - "database_connection_string": DatabaseConnectionString.from_dict(obj["database_connection_string"]) if obj.get("database_connection_string") is not None else None + "database_connection_string": obj.get("database_connection_string") }) return _obj diff --git a/onelens_backend_client/models/get_tenant_provider_by_id_response.py b/onelens_backend_client/models/get_tenant_provider_by_id_response.py index d3e021fd..242fe7da 100644 --- a/onelens_backend_client/models/get_tenant_provider_by_id_response.py +++ b/onelens_backend_client/models/get_tenant_provider_by_id_response.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.parent_id import ParentId from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class GetTenantProviderByIDResponse(BaseModel): """ # noqa: E501 cloud_provider: StrictStr = Field(description="Cloud provider") cloud_id: StrictStr = Field(description="Cloud ID") - parent_id: Optional[ParentId] = None + parent_id: Optional[StrictStr] = None provider_config: Dict[str, Any] = Field(description="provider config") id: StrictStr = Field(description="Unique ID for the Tenant Provider") is_parent_account: StrictBool = Field(description="billing account") @@ -76,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of parent_id - if self.parent_id: - _dict['parent_id'] = self.parent_id.to_dict() + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + return _dict @classmethod @@ -93,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "cloud_provider": obj.get("cloud_provider"), "cloud_id": obj.get("cloud_id"), - "parent_id": ParentId.from_dict(obj["parent_id"]) if obj.get("parent_id") is not None else None, + "parent_id": obj.get("parent_id"), "provider_config": obj.get("provider_config"), "id": obj.get("id"), "is_parent_account": obj.get("is_parent_account"), diff --git a/onelens_backend_client/models/get_tenant_providers_response.py b/onelens_backend_client/models/get_tenant_providers_response.py index 9931e52c..332db0ee 100644 --- a/onelens_backend_client/models/get_tenant_providers_response.py +++ b/onelens_backend_client/models/get_tenant_providers_response.py @@ -18,9 +18,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from onelens_backend_client.models.attributes_data import AttributesData -from onelens_backend_client.models.tenant_provider_filter_data import TenantProviderFilterData +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,8 +26,8 @@ class GetTenantProvidersResponse(BaseModel): """ GetTenantProvidersResponse """ # noqa: E501 - tenant_provider_filter_data: TenantProviderFilterData - attributes_data: AttributesData + tenant_provider_filter_data: Optional[Any] + attributes_data: Optional[Dict[str, Any]] __properties: ClassVar[List[str]] = ["tenant_provider_filter_data", "attributes_data"] model_config = ConfigDict( @@ -71,12 +69,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of tenant_provider_filter_data - if self.tenant_provider_filter_data: - _dict['tenant_provider_filter_data'] = self.tenant_provider_filter_data.to_dict() - # override the default output from pydantic by calling `to_dict()` of attributes_data - if self.attributes_data: - _dict['attributes_data'] = self.attributes_data.to_dict() + # set to None if tenant_provider_filter_data (nullable) is None + # and model_fields_set contains the field + if self.tenant_provider_filter_data is None and "tenant_provider_filter_data" in self.model_fields_set: + _dict['tenant_provider_filter_data'] = None + + # set to None if attributes_data (nullable) is None + # and model_fields_set contains the field + if self.attributes_data is None and "attributes_data" in self.model_fields_set: + _dict['attributes_data'] = None + return _dict @classmethod @@ -89,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tenant_provider_filter_data": TenantProviderFilterData.from_dict(obj["tenant_provider_filter_data"]) if obj.get("tenant_provider_filter_data") is not None else None, - "attributes_data": AttributesData.from_dict(obj["attributes_data"]) if obj.get("attributes_data") is not None else None + "tenant_provider_filter_data": obj.get("tenant_provider_filter_data"), + "attributes_data": obj.get("attributes_data") }) return _obj diff --git a/onelens_backend_client/models/inputs.py b/onelens_backend_client/models/inputs.py deleted file mode 100644 index b6df5509..00000000 --- a/onelens_backend_client/models/inputs.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -INPUTS_ANY_OF_SCHEMAS = ["object"] - -class Inputs(BaseModel): - """ - The input dataset names for the policy. - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Inputs.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Inputs with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Inputs with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/is_parent_account.py b/onelens_backend_client/models/is_parent_account.py deleted file mode 100644 index eb70a629..00000000 --- a/onelens_backend_client/models/is_parent_account.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -ISPARENTACCOUNT_ANY_OF_SCHEMAS = ["bool", "object"] - -class IsParentAccount(BaseModel): - """ - Billing account filter - """ - - # data type: bool - anyof_schema_1_validator: Optional[StrictBool] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[bool, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "bool", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = IsParentAccount.model_construct() - error_messages = [] - # validate data type: bool - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in IsParentAccount with anyOf schemas: bool, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into bool - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into IsParentAccount with anyOf schemas: bool, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], bool, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/is_verified.py b/onelens_backend_client/models/is_verified.py deleted file mode 100644 index b0d3792d..00000000 --- a/onelens_backend_client/models/is_verified.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -ISVERIFIED_ANY_OF_SCHEMAS = ["bool", "object"] - -class IsVerified(BaseModel): - """ - Is verified filter - """ - - # data type: bool - anyof_schema_1_validator: Optional[StrictBool] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[bool, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "bool", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = IsVerified.model_construct() - error_messages = [] - # validate data type: bool - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in IsVerified with anyOf schemas: bool, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into bool - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into IsVerified with anyOf schemas: bool, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], bool, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/message.py b/onelens_backend_client/models/message.py deleted file mode 100644 index 2e8b4831..00000000 --- a/onelens_backend_client/models/message.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -MESSAGE_ANY_OF_SCHEMAS = ["object", "str"] - -class Message(BaseModel): - """ - Message - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Message.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Message with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Message with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/name.py b/onelens_backend_client/models/name.py deleted file mode 100644 index 4ae3a415..00000000 --- a/onelens_backend_client/models/name.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -NAME_ANY_OF_SCHEMAS = ["object", "str"] - -class Name(BaseModel): - """ - Name of the tenant - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Name.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Name with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Name with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/names.py b/onelens_backend_client/models/names.py deleted file mode 100644 index 508ccf92..00000000 --- a/onelens_backend_client/models/names.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -NAMES_ANY_OF_SCHEMAS = ["object"] - -class Names(BaseModel): - """ - Names - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Names.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Names with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Names with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/output_violation_schema.py b/onelens_backend_client/models/output_violation_schema.py deleted file mode 100644 index fc4f29b4..00000000 --- a/onelens_backend_client/models/output_violation_schema.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -OUTPUTVIOLATIONSCHEMA_ANY_OF_SCHEMAS = ["object"] - -class OutputViolationSchema(BaseModel): - """ - The schema for the output violation. - """ - - # data type: object - anyof_schema_1_validator: Optional[Dict[str, Any]] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = OutputViolationSchema.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in OutputViolationSchema with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into OutputViolationSchema with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/parent_id.py b/onelens_backend_client/models/parent_id.py deleted file mode 100644 index 2cadd9e6..00000000 --- a/onelens_backend_client/models/parent_id.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -PARENTID_ANY_OF_SCHEMAS = ["object", "str"] - -class ParentId(BaseModel): - """ - Parent ID - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = ParentId.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in ParentId with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into ParentId with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/parent_id1.py b/onelens_backend_client/models/parent_id1.py deleted file mode 100644 index 29fd969b..00000000 --- a/onelens_backend_client/models/parent_id1.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -PARENTID1_ANY_OF_SCHEMAS = ["object", "str"] - -class ParentId1(BaseModel): - """ - ParentId1 - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = ParentId1.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in ParentId1 with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into ParentId1 with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/parent_ids.py b/onelens_backend_client/models/parent_ids.py deleted file mode 100644 index 4fb02a7f..00000000 --- a/onelens_backend_client/models/parent_ids.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -PARENTIDS_ANY_OF_SCHEMAS = ["object"] - -class ParentIds(BaseModel): - """ - Parent ID filter - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = ParentIds.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in ParentIds with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into ParentIds with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/policy_template_details.py b/onelens_backend_client/models/policy_template_details.py index ba27dfc8..34e91fdb 100644 --- a/onelens_backend_client/models/policy_template_details.py +++ b/onelens_backend_client/models/policy_template_details.py @@ -17,14 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.config_schema import ConfigSchema -from onelens_backend_client.models.default_policy_config import DefaultPolicyConfig -from onelens_backend_client.models.inputs import Inputs -from onelens_backend_client.models.output_violation_schema import OutputViolationSchema -from onelens_backend_client.models.policy_template_details_rule_type import PolicyTemplateDetailsRuleType -from onelens_backend_client.models.rule_definition import RuleDefinition +from onelens_backend_client.models.rule_type import RuleType from typing import Optional, Set from typing_extensions import Self @@ -32,12 +27,12 @@ class PolicyTemplateDetails(BaseModel): """ PolicyTemplateDetails """ # noqa: E501 - inputs: Optional[Inputs] = None - config_schema: Optional[ConfigSchema] = None - output_violation_schema: Optional[OutputViolationSchema] = None - rule_type: Optional[PolicyTemplateDetailsRuleType] = None - rule_definition: Optional[RuleDefinition] = None - default_policy_config: Optional[DefaultPolicyConfig] = None + inputs: Optional[Any] = None + config_schema: Optional[Dict[str, Any]] = None + output_violation_schema: Optional[Dict[str, Any]] = None + rule_type: Optional[RuleType] = None + rule_definition: Optional[StrictStr] = None + default_policy_config: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["inputs", "config_schema", "output_violation_schema", "rule_type", "rule_definition", "default_policy_config"] model_config = ConfigDict( @@ -79,24 +74,36 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of inputs - if self.inputs: - _dict['inputs'] = self.inputs.to_dict() - # override the default output from pydantic by calling `to_dict()` of config_schema - if self.config_schema: - _dict['config_schema'] = self.config_schema.to_dict() - # override the default output from pydantic by calling `to_dict()` of output_violation_schema - if self.output_violation_schema: - _dict['output_violation_schema'] = self.output_violation_schema.to_dict() - # override the default output from pydantic by calling `to_dict()` of rule_type - if self.rule_type: - _dict['rule_type'] = self.rule_type.to_dict() - # override the default output from pydantic by calling `to_dict()` of rule_definition - if self.rule_definition: - _dict['rule_definition'] = self.rule_definition.to_dict() - # override the default output from pydantic by calling `to_dict()` of default_policy_config - if self.default_policy_config: - _dict['default_policy_config'] = self.default_policy_config.to_dict() + # set to None if inputs (nullable) is None + # and model_fields_set contains the field + if self.inputs is None and "inputs" in self.model_fields_set: + _dict['inputs'] = None + + # set to None if config_schema (nullable) is None + # and model_fields_set contains the field + if self.config_schema is None and "config_schema" in self.model_fields_set: + _dict['config_schema'] = None + + # set to None if output_violation_schema (nullable) is None + # and model_fields_set contains the field + if self.output_violation_schema is None and "output_violation_schema" in self.model_fields_set: + _dict['output_violation_schema'] = None + + # set to None if rule_type (nullable) is None + # and model_fields_set contains the field + if self.rule_type is None and "rule_type" in self.model_fields_set: + _dict['rule_type'] = None + + # set to None if rule_definition (nullable) is None + # and model_fields_set contains the field + if self.rule_definition is None and "rule_definition" in self.model_fields_set: + _dict['rule_definition'] = None + + # set to None if default_policy_config (nullable) is None + # and model_fields_set contains the field + if self.default_policy_config is None and "default_policy_config" in self.model_fields_set: + _dict['default_policy_config'] = None + return _dict @classmethod @@ -109,12 +116,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "inputs": Inputs.from_dict(obj["inputs"]) if obj.get("inputs") is not None else None, - "config_schema": ConfigSchema.from_dict(obj["config_schema"]) if obj.get("config_schema") is not None else None, - "output_violation_schema": OutputViolationSchema.from_dict(obj["output_violation_schema"]) if obj.get("output_violation_schema") is not None else None, - "rule_type": PolicyTemplateDetailsRuleType.from_dict(obj["rule_type"]) if obj.get("rule_type") is not None else None, - "rule_definition": RuleDefinition.from_dict(obj["rule_definition"]) if obj.get("rule_definition") is not None else None, - "default_policy_config": DefaultPolicyConfig.from_dict(obj["default_policy_config"]) if obj.get("default_policy_config") is not None else None + "inputs": obj.get("inputs"), + "config_schema": obj.get("config_schema"), + "output_violation_schema": obj.get("output_violation_schema"), + "rule_type": obj.get("rule_type"), + "rule_definition": obj.get("rule_definition"), + "default_policy_config": obj.get("default_policy_config") }) return _obj diff --git a/onelens_backend_client/models/policy_template_details_rule_type.py b/onelens_backend_client/models/policy_template_details_rule_type.py deleted file mode 100644 index c1fe8413..00000000 --- a/onelens_backend_client/models/policy_template_details_rule_type.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from onelens_backend_client.models.rule_type import RuleType -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -POLICYTEMPLATEDETAILSRULETYPE_ANY_OF_SCHEMAS = ["RuleType", "object"] - -class PolicyTemplateDetailsRuleType(BaseModel): - """ - The type of the rule, SQL etc. - """ - - # data type: RuleType - anyof_schema_1_validator: Optional[RuleType] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[RuleType, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "RuleType", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = PolicyTemplateDetailsRuleType.model_construct() - error_messages = [] - # validate data type: RuleType - if not isinstance(v, RuleType): - error_messages.append(f"Error! Input type `{type(v)}` is not `RuleType`") - else: - return v - - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in PolicyTemplateDetailsRuleType with anyOf schemas: RuleType, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[RuleType] = None - try: - instance.actual_instance = RuleType.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into PolicyTemplateDetailsRuleType with anyOf schemas: RuleType, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], RuleType, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/policy_template_filters.py b/onelens_backend_client/models/policy_template_filters.py index 334b8ad7..ba057ff6 100644 --- a/onelens_backend_client/models/policy_template_filters.py +++ b/onelens_backend_client/models/policy_template_filters.py @@ -24,7 +24,6 @@ from onelens_backend_client.models.policy_execution_type import PolicyExecutionType from onelens_backend_client.models.policy_template_state import PolicyTemplateState from onelens_backend_client.models.provider import Provider -from onelens_backend_client.models.search_query import SearchQuery from typing import Optional, Set from typing_extensions import Self @@ -32,7 +31,7 @@ class PolicyTemplateFilters(BaseModel): """ PolicyTemplateFilters """ # noqa: E501 - search_query: Optional[SearchQuery] = None + search_query: Optional[StrictStr] = None parent_ptp_ids: Optional[List[StrictStr]] = Field(default=None, description="Filter by parent policy template pack id.") states: Optional[List[PolicyTemplateState]] = Field(default=None, description="Filter by state. Default is ACTIVE.") categories: Optional[List[PolicyCategory]] = Field(default=None, description="Filter by type.") @@ -80,9 +79,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of search_query - if self.search_query: - _dict['search_query'] = self.search_query.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in services (list) _items = [] if self.services: @@ -90,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['services'] = _items + # set to None if search_query (nullable) is None + # and model_fields_set contains the field + if self.search_query is None and "search_query" in self.model_fields_set: + _dict['search_query'] = None + return _dict @classmethod @@ -102,7 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "search_query": SearchQuery.from_dict(obj["search_query"]) if obj.get("search_query") is not None else None, + "search_query": obj.get("search_query"), "parent_ptp_ids": obj.get("parent_ptp_ids"), "states": obj.get("states"), "categories": obj.get("categories"), diff --git a/onelens_backend_client/models/policy_template_pack_details.py b/onelens_backend_client/models/policy_template_pack_details.py index 3977369d..80701e71 100644 --- a/onelens_backend_client/models/policy_template_pack_details.py +++ b/onelens_backend_client/models/policy_template_pack_details.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.source_schema import SourceSchema from typing import Optional, Set from typing_extensions import Self @@ -27,7 +26,7 @@ class PolicyTemplatePackDetails(BaseModel): """ PolicyTemplatePackDetails """ # noqa: E501 - source_schema: Optional[SourceSchema] = None + source_schema: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["source_schema"] model_config = ConfigDict( @@ -69,9 +68,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of source_schema - if self.source_schema: - _dict['source_schema'] = self.source_schema.to_dict() + # set to None if source_schema (nullable) is None + # and model_fields_set contains the field + if self.source_schema is None and "source_schema" in self.model_fields_set: + _dict['source_schema'] = None + return _dict @classmethod @@ -84,7 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "source_schema": SourceSchema.from_dict(obj["source_schema"]) if obj.get("source_schema") is not None else None + "source_schema": obj.get("source_schema") }) return _obj diff --git a/onelens_backend_client/models/policy_template_update_fields_mixin.py b/onelens_backend_client/models/policy_template_update_fields_mixin.py index 9fadb158..cc0423c4 100644 --- a/onelens_backend_client/models/policy_template_update_fields_mixin.py +++ b/onelens_backend_client/models/policy_template_update_fields_mixin.py @@ -17,13 +17,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.description import Description -from onelens_backend_client.models.policy_template_update_fields_mixin_details import PolicyTemplateUpdateFieldsMixinDetails -from onelens_backend_client.models.policy_template_update_fields_mixin_execution_type import PolicyTemplateUpdateFieldsMixinExecutionType -from onelens_backend_client.models.services import Services -from onelens_backend_client.models.title import Title +from onelens_backend_client.models.policy_execution_type import PolicyExecutionType +from onelens_backend_client.models.policy_template_details import PolicyTemplateDetails from typing import Optional, Set from typing_extensions import Self @@ -31,11 +28,11 @@ class PolicyTemplateUpdateFieldsMixin(BaseModel): """ PolicyTemplateUpdateFieldsMixin """ # noqa: E501 - title: Optional[Title] = None - description: Optional[Description] = None - services: Optional[Services] = None - execution_type: Optional[PolicyTemplateUpdateFieldsMixinExecutionType] = None - details: Optional[PolicyTemplateUpdateFieldsMixinDetails] = None + title: Optional[StrictStr] = None + description: Optional[StrictStr] = None + services: Optional[Any] = None + execution_type: Optional[PolicyExecutionType] = None + details: Optional[PolicyTemplateDetails] = None __properties: ClassVar[List[str]] = ["title", "description", "services", "execution_type", "details"] model_config = ConfigDict( @@ -77,21 +74,34 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of title - if self.title: - _dict['title'] = self.title.to_dict() - # override the default output from pydantic by calling `to_dict()` of description - if self.description: - _dict['description'] = self.description.to_dict() - # override the default output from pydantic by calling `to_dict()` of services - if self.services: - _dict['services'] = self.services.to_dict() - # override the default output from pydantic by calling `to_dict()` of execution_type - if self.execution_type: - _dict['execution_type'] = self.execution_type.to_dict() # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if services (nullable) is None + # and model_fields_set contains the field + if self.services is None and "services" in self.model_fields_set: + _dict['services'] = None + + # set to None if execution_type (nullable) is None + # and model_fields_set contains the field + if self.execution_type is None and "execution_type" in self.model_fields_set: + _dict['execution_type'] = None + + # set to None if details (nullable) is None + # and model_fields_set contains the field + if self.details is None and "details" in self.model_fields_set: + _dict['details'] = None + return _dict @classmethod @@ -104,11 +114,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "title": Title.from_dict(obj["title"]) if obj.get("title") is not None else None, - "description": Description.from_dict(obj["description"]) if obj.get("description") is not None else None, - "services": Services.from_dict(obj["services"]) if obj.get("services") is not None else None, - "execution_type": PolicyTemplateUpdateFieldsMixinExecutionType.from_dict(obj["execution_type"]) if obj.get("execution_type") is not None else None, - "details": PolicyTemplateUpdateFieldsMixinDetails.from_dict(obj["details"]) if obj.get("details") is not None else None + "title": obj.get("title"), + "description": obj.get("description"), + "services": obj.get("services"), + "execution_type": obj.get("execution_type"), + "details": PolicyTemplateDetails.from_dict(obj["details"]) if obj.get("details") is not None else None }) return _obj diff --git a/onelens_backend_client/models/policy_template_update_fields_mixin_details.py b/onelens_backend_client/models/policy_template_update_fields_mixin_details.py deleted file mode 100644 index 49092349..00000000 --- a/onelens_backend_client/models/policy_template_update_fields_mixin_details.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from onelens_backend_client.models.policy_template_details import PolicyTemplateDetails -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -POLICYTEMPLATEUPDATEFIELDSMIXINDETAILS_ANY_OF_SCHEMAS = ["PolicyTemplateDetails", "object"] - -class PolicyTemplateUpdateFieldsMixinDetails(BaseModel): - """ - The details of the policy template. - """ - - # data type: PolicyTemplateDetails - anyof_schema_1_validator: Optional[PolicyTemplateDetails] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[PolicyTemplateDetails, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "PolicyTemplateDetails", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = PolicyTemplateUpdateFieldsMixinDetails.model_construct() - error_messages = [] - # validate data type: PolicyTemplateDetails - if not isinstance(v, PolicyTemplateDetails): - error_messages.append(f"Error! Input type `{type(v)}` is not `PolicyTemplateDetails`") - else: - return v - - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in PolicyTemplateUpdateFieldsMixinDetails with anyOf schemas: PolicyTemplateDetails, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[PolicyTemplateDetails] = None - try: - instance.actual_instance = PolicyTemplateDetails.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into PolicyTemplateUpdateFieldsMixinDetails with anyOf schemas: PolicyTemplateDetails, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], PolicyTemplateDetails, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/policy_template_update_fields_mixin_execution_type.py b/onelens_backend_client/models/policy_template_update_fields_mixin_execution_type.py deleted file mode 100644 index 527e2d92..00000000 --- a/onelens_backend_client/models/policy_template_update_fields_mixin_execution_type.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from onelens_backend_client.models.policy_execution_type import PolicyExecutionType -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -POLICYTEMPLATEUPDATEFIELDSMIXINEXECUTIONTYPE_ANY_OF_SCHEMAS = ["PolicyExecutionType", "object"] - -class PolicyTemplateUpdateFieldsMixinExecutionType(BaseModel): - """ - The execution type of the policy template. - """ - - # data type: PolicyExecutionType - anyof_schema_1_validator: Optional[PolicyExecutionType] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[PolicyExecutionType, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "PolicyExecutionType", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = PolicyTemplateUpdateFieldsMixinExecutionType.model_construct() - error_messages = [] - # validate data type: PolicyExecutionType - if not isinstance(v, PolicyExecutionType): - error_messages.append(f"Error! Input type `{type(v)}` is not `PolicyExecutionType`") - else: - return v - - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in PolicyTemplateUpdateFieldsMixinExecutionType with anyOf schemas: PolicyExecutionType, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[PolicyExecutionType] = None - try: - instance.actual_instance = PolicyExecutionType.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into PolicyTemplateUpdateFieldsMixinExecutionType with anyOf schemas: PolicyExecutionType, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], PolicyExecutionType, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/provider_config.py b/onelens_backend_client/models/provider_config.py deleted file mode 100644 index f28d98f4..00000000 --- a/onelens_backend_client/models/provider_config.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -PROVIDERCONFIG_ANY_OF_SCHEMAS = ["object"] - -class ProviderConfig(BaseModel): - """ - ProviderConfig - """ - - # data type: object - anyof_schema_1_validator: Optional[Dict[str, Any]] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = ProviderConfig.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in ProviderConfig with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into ProviderConfig with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/response_activate_policy_template_response.py b/onelens_backend_client/models/response_activate_policy_template_response.py index 120e00a5..3505e820 100644 --- a/onelens_backend_client/models/response_activate_policy_template_response.py +++ b/onelens_backend_client/models/response_activate_policy_template_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -28,7 +27,7 @@ class ResponseActivatePolicyTemplateResponse(BaseModel): ResponseActivatePolicyTemplateResponse """ # noqa: E501 data: Dict[str, Any] - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -70,9 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -86,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": obj.get("data"), - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_create_policy_template_pack_response.py b/onelens_backend_client/models/response_create_policy_template_pack_response.py index f05736e4..c7c53f8e 100644 --- a/onelens_backend_client/models/response_create_policy_template_pack_response.py +++ b/onelens_backend_client/models/response_create_policy_template_pack_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.create_policy_template_pack_response import CreatePolicyTemplatePackResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseCreatePolicyTemplatePackResponse(BaseModel): ResponseCreatePolicyTemplatePackResponse """ # noqa: E501 data: CreatePolicyTemplatePackResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": CreatePolicyTemplatePackResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_create_policy_template_response.py b/onelens_backend_client/models/response_create_policy_template_response.py index cc7b975f..7572db61 100644 --- a/onelens_backend_client/models/response_create_policy_template_response.py +++ b/onelens_backend_client/models/response_create_policy_template_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.create_policy_template_response import CreatePolicyTemplateResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseCreatePolicyTemplateResponse(BaseModel): ResponseCreatePolicyTemplateResponse """ # noqa: E501 data: CreatePolicyTemplateResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": CreatePolicyTemplateResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_create_tenant_user_response.py b/onelens_backend_client/models/response_create_tenant_user_response.py index f7951cce..4b7a1c59 100644 --- a/onelens_backend_client/models/response_create_tenant_user_response.py +++ b/onelens_backend_client/models/response_create_tenant_user_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.create_tenant_user_response import CreateTenantUserResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseCreateTenantUserResponse(BaseModel): ResponseCreateTenantUserResponse """ # noqa: E501 data: CreateTenantUserResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": CreateTenantUserResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_create_user_tenant_mapping_response.py b/onelens_backend_client/models/response_create_user_tenant_mapping_response.py index 9d37b931..9186f219 100644 --- a/onelens_backend_client/models/response_create_user_tenant_mapping_response.py +++ b/onelens_backend_client/models/response_create_user_tenant_mapping_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.create_user_tenant_mapping_response import CreateUserTenantMappingResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseCreateUserTenantMappingResponse(BaseModel): ResponseCreateUserTenantMappingResponse """ # noqa: E501 data: CreateUserTenantMappingResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": CreateUserTenantMappingResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_deprecate_policy_template_response.py b/onelens_backend_client/models/response_deprecate_policy_template_response.py index 2deafcd7..a55a90c5 100644 --- a/onelens_backend_client/models/response_deprecate_policy_template_response.py +++ b/onelens_backend_client/models/response_deprecate_policy_template_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -28,7 +27,7 @@ class ResponseDeprecatePolicyTemplateResponse(BaseModel): ResponseDeprecatePolicyTemplateResponse """ # noqa: E501 data: Dict[str, Any] - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -70,9 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -86,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": obj.get("data"), - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_disable_tenant_provider_response.py b/onelens_backend_client/models/response_disable_tenant_provider_response.py index e0fe23f9..4d4830c0 100644 --- a/onelens_backend_client/models/response_disable_tenant_provider_response.py +++ b/onelens_backend_client/models/response_disable_tenant_provider_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -28,7 +27,7 @@ class ResponseDisableTenantProviderResponse(BaseModel): ResponseDisableTenantProviderResponse """ # noqa: E501 data: Dict[str, Any] - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -70,9 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -86,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": obj.get("data"), - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_disable_tenant_response.py b/onelens_backend_client/models/response_disable_tenant_response.py index a49b33c3..f03d0ae5 100644 --- a/onelens_backend_client/models/response_disable_tenant_response.py +++ b/onelens_backend_client/models/response_disable_tenant_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -28,7 +27,7 @@ class ResponseDisableTenantResponse(BaseModel): ResponseDisableTenantResponse """ # noqa: E501 data: Dict[str, Any] - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -70,9 +69,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -86,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": obj.get("data"), - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_policy_template_by_id_response.py b/onelens_backend_client/models/response_get_policy_template_by_id_response.py index 90f821ae..a480dd78 100644 --- a/onelens_backend_client/models/response_get_policy_template_by_id_response.py +++ b/onelens_backend_client/models/response_get_policy_template_by_id_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_policy_template_by_id_response import GetPolicyTemplateByIDResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetPolicyTemplateByIDResponse(BaseModel): ResponseGetPolicyTemplateByIDResponse """ # noqa: E501 data: GetPolicyTemplateByIDResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetPolicyTemplateByIDResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_policy_template_pack_by_id_response.py b/onelens_backend_client/models/response_get_policy_template_pack_by_id_response.py index c7a0382f..68ea7e83 100644 --- a/onelens_backend_client/models/response_get_policy_template_pack_by_id_response.py +++ b/onelens_backend_client/models/response_get_policy_template_pack_by_id_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_policy_template_pack_by_id_response import GetPolicyTemplatePackByIdResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetPolicyTemplatePackByIdResponse(BaseModel): ResponseGetPolicyTemplatePackByIdResponse """ # noqa: E501 data: GetPolicyTemplatePackByIdResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetPolicyTemplatePackByIdResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_policy_template_packs_response.py b/onelens_backend_client/models/response_get_policy_template_packs_response.py index fcff3547..e63c2c90 100644 --- a/onelens_backend_client/models/response_get_policy_template_packs_response.py +++ b/onelens_backend_client/models/response_get_policy_template_packs_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_policy_template_packs_response import GetPolicyTemplatePacksResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetPolicyTemplatePacksResponse(BaseModel): ResponseGetPolicyTemplatePacksResponse """ # noqa: E501 data: GetPolicyTemplatePacksResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetPolicyTemplatePacksResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_policy_templates_response.py b/onelens_backend_client/models/response_get_policy_templates_response.py index 39e49222..6db662bd 100644 --- a/onelens_backend_client/models/response_get_policy_templates_response.py +++ b/onelens_backend_client/models/response_get_policy_templates_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_policy_templates_response import GetPolicyTemplatesResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetPolicyTemplatesResponse(BaseModel): ResponseGetPolicyTemplatesResponse """ # noqa: E501 data: GetPolicyTemplatesResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetPolicyTemplatesResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_tenant_by_id_response.py b/onelens_backend_client/models/response_get_tenant_by_id_response.py index 54052c5d..8f58ac0c 100644 --- a/onelens_backend_client/models/response_get_tenant_by_id_response.py +++ b/onelens_backend_client/models/response_get_tenant_by_id_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_tenant_by_id_response import GetTenantByIDResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetTenantByIDResponse(BaseModel): ResponseGetTenantByIDResponse """ # noqa: E501 data: GetTenantByIDResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetTenantByIDResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_tenant_provider_by_id_response.py b/onelens_backend_client/models/response_get_tenant_provider_by_id_response.py index 98e363d1..688dbd50 100644 --- a/onelens_backend_client/models/response_get_tenant_provider_by_id_response.py +++ b/onelens_backend_client/models/response_get_tenant_provider_by_id_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_tenant_provider_by_id_response import GetTenantProviderByIDResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetTenantProviderByIDResponse(BaseModel): ResponseGetTenantProviderByIDResponse """ # noqa: E501 data: GetTenantProviderByIDResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetTenantProviderByIDResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_tenant_providers_response.py b/onelens_backend_client/models/response_get_tenant_providers_response.py index 21512446..6f84a3db 100644 --- a/onelens_backend_client/models/response_get_tenant_providers_response.py +++ b/onelens_backend_client/models/response_get_tenant_providers_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_tenant_providers_response import GetTenantProvidersResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetTenantProvidersResponse(BaseModel): ResponseGetTenantProvidersResponse """ # noqa: E501 data: GetTenantProvidersResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetTenantProvidersResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_get_tenants_response.py b/onelens_backend_client/models/response_get_tenants_response.py index 419629df..f0efdf1c 100644 --- a/onelens_backend_client/models/response_get_tenants_response.py +++ b/onelens_backend_client/models/response_get_tenants_response.py @@ -17,10 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from onelens_backend_client.models.get_tenants_response import GetTenantsResponse -from onelens_backend_client.models.message import Message from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseGetTenantsResponse(BaseModel): ResponseGetTenantsResponse """ # noqa: E501 data: GetTenantsResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": GetTenantsResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_tenant_verify_response.py b/onelens_backend_client/models/response_tenant_verify_response.py index 65d83d8f..706d1e95 100644 --- a/onelens_backend_client/models/response_tenant_verify_response.py +++ b/onelens_backend_client/models/response_tenant_verify_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from onelens_backend_client.models.tenant_verify_response import TenantVerifyResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseTenantVerifyResponse(BaseModel): ResponseTenantVerifyResponse """ # noqa: E501 data: TenantVerifyResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": TenantVerifyResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_update_policy_template_response.py b/onelens_backend_client/models/response_update_policy_template_response.py index 4be4329a..b0a27a08 100644 --- a/onelens_backend_client/models/response_update_policy_template_response.py +++ b/onelens_backend_client/models/response_update_policy_template_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from onelens_backend_client.models.update_policy_template_response import UpdatePolicyTemplateResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseUpdatePolicyTemplateResponse(BaseModel): ResponseUpdatePolicyTemplateResponse """ # noqa: E501 data: UpdatePolicyTemplateResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": UpdatePolicyTemplateResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_update_tenant_provider_response.py b/onelens_backend_client/models/response_update_tenant_provider_response.py index 4461c8c6..d16592d3 100644 --- a/onelens_backend_client/models/response_update_tenant_provider_response.py +++ b/onelens_backend_client/models/response_update_tenant_provider_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from onelens_backend_client.models.update_tenant_provider_response import UpdateTenantProviderResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseUpdateTenantProviderResponse(BaseModel): ResponseUpdateTenantProviderResponse """ # noqa: E501 data: UpdateTenantProviderResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": UpdateTenantProviderResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_update_tenant_response.py b/onelens_backend_client/models/response_update_tenant_response.py index 8d31e04c..5be14d0d 100644 --- a/onelens_backend_client/models/response_update_tenant_response.py +++ b/onelens_backend_client/models/response_update_tenant_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from onelens_backend_client.models.update_tenant_response import UpdateTenantResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseUpdateTenantResponse(BaseModel): ResponseUpdateTenantResponse """ # noqa: E501 data: UpdateTenantResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": UpdateTenantResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/response_update_tenant_user_response.py b/onelens_backend_client/models/response_update_tenant_user_response.py index 0fa30832..4479d457 100644 --- a/onelens_backend_client/models/response_update_tenant_user_response.py +++ b/onelens_backend_client/models/response_update_tenant_user_response.py @@ -17,9 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.message import Message from onelens_backend_client.models.update_tenant_user_response import UpdateTenantUserResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class ResponseUpdateTenantUserResponse(BaseModel): ResponseUpdateTenantUserResponse """ # noqa: E501 data: UpdateTenantUserResponse - message: Optional[Message] = None + message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["data", "message"] model_config = ConfigDict( @@ -74,9 +73,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of message - if self.message: - _dict['message'] = self.message.to_dict() + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + return _dict @classmethod @@ -90,7 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data": UpdateTenantUserResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": Message.from_dict(obj["message"]) if obj.get("message") is not None else None + "message": obj.get("message") }) return _obj diff --git a/onelens_backend_client/models/rule_definition.py b/onelens_backend_client/models/rule_definition.py deleted file mode 100644 index 2dd1b516..00000000 --- a/onelens_backend_client/models/rule_definition.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -RULEDEFINITION_ANY_OF_SCHEMAS = ["object", "str"] - -class RuleDefinition(BaseModel): - """ - The definition of the rule. - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = RuleDefinition.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in RuleDefinition with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into RuleDefinition with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/search_query.py b/onelens_backend_client/models/search_query.py deleted file mode 100644 index 0b90649f..00000000 --- a/onelens_backend_client/models/search_query.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -SEARCHQUERY_ANY_OF_SCHEMAS = ["object", "str"] - -class SearchQuery(BaseModel): - """ - Search query to filter policy templates, applies on title and description. - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = SearchQuery.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in SearchQuery with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into SearchQuery with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/services.py b/onelens_backend_client/models/services.py deleted file mode 100644 index 2fabe8ba..00000000 --- a/onelens_backend_client/models/services.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -SERVICES_ANY_OF_SCHEMAS = ["object"] - -class Services(BaseModel): - """ - The list of services associated the policy template. - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Services.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Services with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Services with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/source_schema.py b/onelens_backend_client/models/source_schema.py deleted file mode 100644 index fe345472..00000000 --- a/onelens_backend_client/models/source_schema.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -SOURCESCHEMA_ANY_OF_SCHEMAS = ["object"] - -class SourceSchema(BaseModel): - """ - The schema for the source of the policy template pack. - """ - - # data type: object - anyof_schema_1_validator: Optional[Dict[str, Any]] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = SourceSchema.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in SourceSchema with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into SourceSchema with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/sources.py b/onelens_backend_client/models/sources.py deleted file mode 100644 index 81e8a703..00000000 --- a/onelens_backend_client/models/sources.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -SOURCES_ANY_OF_SCHEMAS = ["object"] - -class Sources(BaseModel): - """ - Different sources from where user signed up. e.g. social signup, username-password - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Sources.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Sources with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Sources with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/states.py b/onelens_backend_client/models/states.py deleted file mode 100644 index a1189e66..00000000 --- a/onelens_backend_client/models/states.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -STATES_ANY_OF_SCHEMAS = ["object"] - -class States(BaseModel): - """ - State filter - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = States.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in States with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into States with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/tenant_filters.py b/onelens_backend_client/models/tenant_filters.py index 82cc86b0..122cec00 100644 --- a/onelens_backend_client/models/tenant_filters.py +++ b/onelens_backend_client/models/tenant_filters.py @@ -19,8 +19,6 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.names import Names -from onelens_backend_client.models.tenant_states import TenantStates from typing import Optional, Set from typing_extensions import Self @@ -28,8 +26,8 @@ class TenantFilters(BaseModel): """ TenantFilters """ # noqa: E501 - names: Optional[Names] = None - tenant_states: Optional[TenantStates] = None + names: Optional[Any] = None + tenant_states: Optional[Any] = None __properties: ClassVar[List[str]] = ["names", "tenant_states"] model_config = ConfigDict( @@ -71,12 +69,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of names - if self.names: - _dict['names'] = self.names.to_dict() - # override the default output from pydantic by calling `to_dict()` of tenant_states - if self.tenant_states: - _dict['tenant_states'] = self.tenant_states.to_dict() + # set to None if names (nullable) is None + # and model_fields_set contains the field + if self.names is None and "names" in self.model_fields_set: + _dict['names'] = None + + # set to None if tenant_states (nullable) is None + # and model_fields_set contains the field + if self.tenant_states is None and "tenant_states" in self.model_fields_set: + _dict['tenant_states'] = None + return _dict @classmethod @@ -89,8 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "names": Names.from_dict(obj["names"]) if obj.get("names") is not None else None, - "tenant_states": TenantStates.from_dict(obj["tenant_states"]) if obj.get("tenant_states") is not None else None + "names": obj.get("names"), + "tenant_states": obj.get("tenant_states") }) return _obj diff --git a/onelens_backend_client/models/tenant_id.py b/onelens_backend_client/models/tenant_id.py deleted file mode 100644 index 8579bfce..00000000 --- a/onelens_backend_client/models/tenant_id.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TENANTID_ANY_OF_SCHEMAS = ["object", "str"] - -class TenantId(BaseModel): - """ - Tenant ID - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = TenantId.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in TenantId with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into TenantId with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/tenant_ids.py b/onelens_backend_client/models/tenant_ids.py deleted file mode 100644 index c905182d..00000000 --- a/onelens_backend_client/models/tenant_ids.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TENANTIDS_ANY_OF_SCHEMAS = ["object"] - -class TenantIds(BaseModel): - """ - Tenant ID filter - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = TenantIds.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in TenantIds with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into TenantIds with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/tenant_provider.py b/onelens_backend_client/models/tenant_provider.py index e87f0dfa..81799fe8 100644 --- a/onelens_backend_client/models/tenant_provider.py +++ b/onelens_backend_client/models/tenant_provider.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.parent_id import ParentId from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class TenantProvider(BaseModel): """ # noqa: E501 cloud_provider: StrictStr = Field(description="Cloud provider") cloud_id: StrictStr = Field(description="Cloud ID") - parent_id: Optional[ParentId] = None + parent_id: Optional[StrictStr] = None provider_config: Dict[str, Any] = Field(description="provider config") id: StrictStr = Field(description="Unique ID for the Tenant Provider") is_parent_account: StrictBool = Field(description="billing account") @@ -76,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of parent_id - if self.parent_id: - _dict['parent_id'] = self.parent_id.to_dict() + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + return _dict @classmethod @@ -93,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "cloud_provider": obj.get("cloud_provider"), "cloud_id": obj.get("cloud_id"), - "parent_id": ParentId.from_dict(obj["parent_id"]) if obj.get("parent_id") is not None else None, + "parent_id": obj.get("parent_id"), "provider_config": obj.get("provider_config"), "id": obj.get("id"), "is_parent_account": obj.get("is_parent_account"), diff --git a/onelens_backend_client/models/tenant_provider_filter_data.py b/onelens_backend_client/models/tenant_provider_filter_data.py deleted file mode 100644 index f70d6711..00000000 --- a/onelens_backend_client/models/tenant_provider_filter_data.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TENANTPROVIDERFILTERDATA_ANY_OF_SCHEMAS = ["object"] - -class TenantProviderFilterData(BaseModel): - """ - TenantProviderFilterData - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = TenantProviderFilterData.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in TenantProviderFilterData with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into TenantProviderFilterData with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/tenant_provider_filters.py b/onelens_backend_client/models/tenant_provider_filters.py index 1d1bea5d..152f85d5 100644 --- a/onelens_backend_client/models/tenant_provider_filters.py +++ b/onelens_backend_client/models/tenant_provider_filters.py @@ -17,15 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.cloud_ids import CloudIds -from onelens_backend_client.models.cloud_providers import CloudProviders -from onelens_backend_client.models.is_parent_account import IsParentAccount -from onelens_backend_client.models.is_verified import IsVerified -from onelens_backend_client.models.parent_ids import ParentIds -from onelens_backend_client.models.states import States -from onelens_backend_client.models.tenant_ids import TenantIds from typing import Optional, Set from typing_extensions import Self @@ -33,13 +26,13 @@ class TenantProviderFilters(BaseModel): """ TenantProviderFilters """ # noqa: E501 - tenant_ids: Optional[TenantIds] = None - cloud_ids: Optional[CloudIds] = None - cloud_providers: Optional[CloudProviders] = None - parent_ids: Optional[ParentIds] = None - is_parent_account: Optional[IsParentAccount] = None - is_verified: Optional[IsVerified] = None - states: Optional[States] = None + tenant_ids: Optional[Any] = None + cloud_ids: Optional[Any] = None + cloud_providers: Optional[Any] = None + parent_ids: Optional[Any] = None + is_parent_account: Optional[StrictBool] = None + is_verified: Optional[StrictBool] = None + states: Optional[Any] = None __properties: ClassVar[List[str]] = ["tenant_ids", "cloud_ids", "cloud_providers", "parent_ids", "is_parent_account", "is_verified", "states"] model_config = ConfigDict( @@ -81,27 +74,41 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of tenant_ids - if self.tenant_ids: - _dict['tenant_ids'] = self.tenant_ids.to_dict() - # override the default output from pydantic by calling `to_dict()` of cloud_ids - if self.cloud_ids: - _dict['cloud_ids'] = self.cloud_ids.to_dict() - # override the default output from pydantic by calling `to_dict()` of cloud_providers - if self.cloud_providers: - _dict['cloud_providers'] = self.cloud_providers.to_dict() - # override the default output from pydantic by calling `to_dict()` of parent_ids - if self.parent_ids: - _dict['parent_ids'] = self.parent_ids.to_dict() - # override the default output from pydantic by calling `to_dict()` of is_parent_account - if self.is_parent_account: - _dict['is_parent_account'] = self.is_parent_account.to_dict() - # override the default output from pydantic by calling `to_dict()` of is_verified - if self.is_verified: - _dict['is_verified'] = self.is_verified.to_dict() - # override the default output from pydantic by calling `to_dict()` of states - if self.states: - _dict['states'] = self.states.to_dict() + # set to None if tenant_ids (nullable) is None + # and model_fields_set contains the field + if self.tenant_ids is None and "tenant_ids" in self.model_fields_set: + _dict['tenant_ids'] = None + + # set to None if cloud_ids (nullable) is None + # and model_fields_set contains the field + if self.cloud_ids is None and "cloud_ids" in self.model_fields_set: + _dict['cloud_ids'] = None + + # set to None if cloud_providers (nullable) is None + # and model_fields_set contains the field + if self.cloud_providers is None and "cloud_providers" in self.model_fields_set: + _dict['cloud_providers'] = None + + # set to None if parent_ids (nullable) is None + # and model_fields_set contains the field + if self.parent_ids is None and "parent_ids" in self.model_fields_set: + _dict['parent_ids'] = None + + # set to None if is_parent_account (nullable) is None + # and model_fields_set contains the field + if self.is_parent_account is None and "is_parent_account" in self.model_fields_set: + _dict['is_parent_account'] = None + + # set to None if is_verified (nullable) is None + # and model_fields_set contains the field + if self.is_verified is None and "is_verified" in self.model_fields_set: + _dict['is_verified'] = None + + # set to None if states (nullable) is None + # and model_fields_set contains the field + if self.states is None and "states" in self.model_fields_set: + _dict['states'] = None + return _dict @classmethod @@ -114,13 +121,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tenant_ids": TenantIds.from_dict(obj["tenant_ids"]) if obj.get("tenant_ids") is not None else None, - "cloud_ids": CloudIds.from_dict(obj["cloud_ids"]) if obj.get("cloud_ids") is not None else None, - "cloud_providers": CloudProviders.from_dict(obj["cloud_providers"]) if obj.get("cloud_providers") is not None else None, - "parent_ids": ParentIds.from_dict(obj["parent_ids"]) if obj.get("parent_ids") is not None else None, - "is_parent_account": IsParentAccount.from_dict(obj["is_parent_account"]) if obj.get("is_parent_account") is not None else None, - "is_verified": IsVerified.from_dict(obj["is_verified"]) if obj.get("is_verified") is not None else None, - "states": States.from_dict(obj["states"]) if obj.get("states") is not None else None + "tenant_ids": obj.get("tenant_ids"), + "cloud_ids": obj.get("cloud_ids"), + "cloud_providers": obj.get("cloud_providers"), + "parent_ids": obj.get("parent_ids"), + "is_parent_account": obj.get("is_parent_account"), + "is_verified": obj.get("is_verified"), + "states": obj.get("states") }) return _obj diff --git a/onelens_backend_client/models/tenant_states.py b/onelens_backend_client/models/tenant_states.py deleted file mode 100644 index 3bbfbc33..00000000 --- a/onelens_backend_client/models/tenant_states.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TENANTSTATES_ANY_OF_SCHEMAS = ["object"] - -class TenantStates(BaseModel): - """ - TenantStates - """ - - # data type: object - anyof_schema_1_validator: Optional[Any] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = TenantStates.model_construct() - error_messages = [] - # validate data type: object - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in TenantStates with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into object - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into TenantStates with anyOf schemas: object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/tenant_user_update_fields_mixin.py b/onelens_backend_client/models/tenant_user_update_fields_mixin.py index 2552eb57..a0cef66e 100644 --- a/onelens_backend_client/models/tenant_user_update_fields_mixin.py +++ b/onelens_backend_client/models/tenant_user_update_fields_mixin.py @@ -19,9 +19,8 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.sources import Sources -from onelens_backend_client.models.tenant_user_update_fields_mixin_role import TenantUserUpdateFieldsMixinRole -from onelens_backend_client.models.tenant_user_update_fields_mixin_status import TenantUserUpdateFieldsMixinStatus +from onelens_backend_client.models.user_role import UserRole +from onelens_backend_client.models.user_status import UserStatus from typing import Optional, Set from typing_extensions import Self @@ -29,9 +28,9 @@ class TenantUserUpdateFieldsMixin(BaseModel): """ TenantUserUpdateFieldsMixin """ # noqa: E501 - status: Optional[TenantUserUpdateFieldsMixinStatus] = None - role: Optional[TenantUserUpdateFieldsMixinRole] = None - sources: Optional[Sources] = None + status: Optional[UserStatus] = None + role: Optional[UserRole] = None + sources: Optional[Any] = None __properties: ClassVar[List[str]] = ["status", "role", "sources"] model_config = ConfigDict( @@ -73,15 +72,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of status - if self.status: - _dict['status'] = self.status.to_dict() - # override the default output from pydantic by calling `to_dict()` of role - if self.role: - _dict['role'] = self.role.to_dict() - # override the default output from pydantic by calling `to_dict()` of sources - if self.sources: - _dict['sources'] = self.sources.to_dict() + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if role (nullable) is None + # and model_fields_set contains the field + if self.role is None and "role" in self.model_fields_set: + _dict['role'] = None + + # set to None if sources (nullable) is None + # and model_fields_set contains the field + if self.sources is None and "sources" in self.model_fields_set: + _dict['sources'] = None + return _dict @classmethod @@ -94,9 +99,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": TenantUserUpdateFieldsMixinStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, - "role": TenantUserUpdateFieldsMixinRole.from_dict(obj["role"]) if obj.get("role") is not None else None, - "sources": Sources.from_dict(obj["sources"]) if obj.get("sources") is not None else None + "status": obj.get("status"), + "role": obj.get("role"), + "sources": obj.get("sources") }) return _obj diff --git a/onelens_backend_client/models/tenant_user_update_fields_mixin_role.py b/onelens_backend_client/models/tenant_user_update_fields_mixin_role.py deleted file mode 100644 index 176f7de0..00000000 --- a/onelens_backend_client/models/tenant_user_update_fields_mixin_role.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from onelens_backend_client.models.user_role import UserRole -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TENANTUSERUPDATEFIELDSMIXINROLE_ANY_OF_SCHEMAS = ["UserRole", "object"] - -class TenantUserUpdateFieldsMixinRole(BaseModel): - """ - Role of the user in the tenant - """ - - # data type: UserRole - anyof_schema_1_validator: Optional[UserRole] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[UserRole, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "UserRole", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = TenantUserUpdateFieldsMixinRole.model_construct() - error_messages = [] - # validate data type: UserRole - if not isinstance(v, UserRole): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserRole`") - else: - return v - - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in TenantUserUpdateFieldsMixinRole with anyOf schemas: UserRole, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[UserRole] = None - try: - instance.actual_instance = UserRole.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into TenantUserUpdateFieldsMixinRole with anyOf schemas: UserRole, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], UserRole, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/tenant_user_update_fields_mixin_status.py b/onelens_backend_client/models/tenant_user_update_fields_mixin_status.py deleted file mode 100644 index dcc29725..00000000 --- a/onelens_backend_client/models/tenant_user_update_fields_mixin_status.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from onelens_backend_client.models.user_status import UserStatus -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TENANTUSERUPDATEFIELDSMIXINSTATUS_ANY_OF_SCHEMAS = ["UserStatus", "object"] - -class TenantUserUpdateFieldsMixinStatus(BaseModel): - """ - Status of the user like ACTIVE, BLOCKED etc. - """ - - # data type: UserStatus - anyof_schema_1_validator: Optional[UserStatus] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[UserStatus, object]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "UserStatus", "object" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = TenantUserUpdateFieldsMixinStatus.model_construct() - error_messages = [] - # validate data type: UserStatus - if not isinstance(v, UserStatus): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserStatus`") - else: - return v - - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in TenantUserUpdateFieldsMixinStatus with anyOf schemas: UserStatus, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[UserStatus] = None - try: - instance.actual_instance = UserStatus.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into TenantUserUpdateFieldsMixinStatus with anyOf schemas: UserStatus, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], UserStatus, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/timezone.py b/onelens_backend_client/models/timezone.py deleted file mode 100644 index 6de37587..00000000 --- a/onelens_backend_client/models/timezone.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TIMEZONE_ANY_OF_SCHEMAS = ["object", "str"] - -class Timezone(BaseModel): - """ - Timezone of the tenant - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Timezone.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Timezone with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Timezone with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/title.py b/onelens_backend_client/models/title.py deleted file mode 100644 index b909fcc1..00000000 --- a/onelens_backend_client/models/title.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -TITLE_ANY_OF_SCHEMAS = ["object", "str"] - -class Title(BaseModel): - """ - The title of the policy template. - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: object - anyof_schema_2_validator: Optional[Any] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[object, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "object", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = Title.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Title with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Title with anyOf schemas: object, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], object, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/onelens_backend_client/models/update_policy_template_request.py b/onelens_backend_client/models/update_policy_template_request.py index e74fa174..1249119b 100644 --- a/onelens_backend_client/models/update_policy_template_request.py +++ b/onelens_backend_client/models/update_policy_template_request.py @@ -19,11 +19,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.description import Description -from onelens_backend_client.models.policy_template_update_fields_mixin_details import PolicyTemplateUpdateFieldsMixinDetails -from onelens_backend_client.models.policy_template_update_fields_mixin_execution_type import PolicyTemplateUpdateFieldsMixinExecutionType -from onelens_backend_client.models.services import Services -from onelens_backend_client.models.title import Title +from onelens_backend_client.models.policy_execution_type import PolicyExecutionType +from onelens_backend_client.models.policy_template_details import PolicyTemplateDetails from typing import Optional, Set from typing_extensions import Self @@ -31,11 +28,11 @@ class UpdatePolicyTemplateRequest(BaseModel): """ UpdatePolicyTemplateRequest """ # noqa: E501 - title: Optional[Title] = None - description: Optional[Description] = None - services: Optional[Services] = None - execution_type: Optional[PolicyTemplateUpdateFieldsMixinExecutionType] = None - details: Optional[PolicyTemplateUpdateFieldsMixinDetails] = None + title: Optional[StrictStr] = None + description: Optional[StrictStr] = None + services: Optional[Any] = None + execution_type: Optional[PolicyExecutionType] = None + details: Optional[PolicyTemplateDetails] = None id: StrictStr = Field(description="The unique identifier of the policy template.") __properties: ClassVar[List[str]] = ["title", "description", "services", "execution_type", "details", "id"] @@ -78,21 +75,34 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of title - if self.title: - _dict['title'] = self.title.to_dict() - # override the default output from pydantic by calling `to_dict()` of description - if self.description: - _dict['description'] = self.description.to_dict() - # override the default output from pydantic by calling `to_dict()` of services - if self.services: - _dict['services'] = self.services.to_dict() - # override the default output from pydantic by calling `to_dict()` of execution_type - if self.execution_type: - _dict['execution_type'] = self.execution_type.to_dict() # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.to_dict() + # set to None if title (nullable) is None + # and model_fields_set contains the field + if self.title is None and "title" in self.model_fields_set: + _dict['title'] = None + + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + + # set to None if services (nullable) is None + # and model_fields_set contains the field + if self.services is None and "services" in self.model_fields_set: + _dict['services'] = None + + # set to None if execution_type (nullable) is None + # and model_fields_set contains the field + if self.execution_type is None and "execution_type" in self.model_fields_set: + _dict['execution_type'] = None + + # set to None if details (nullable) is None + # and model_fields_set contains the field + if self.details is None and "details" in self.model_fields_set: + _dict['details'] = None + return _dict @classmethod @@ -105,11 +115,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "title": Title.from_dict(obj["title"]) if obj.get("title") is not None else None, - "description": Description.from_dict(obj["description"]) if obj.get("description") is not None else None, - "services": Services.from_dict(obj["services"]) if obj.get("services") is not None else None, - "execution_type": PolicyTemplateUpdateFieldsMixinExecutionType.from_dict(obj["execution_type"]) if obj.get("execution_type") is not None else None, - "details": PolicyTemplateUpdateFieldsMixinDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "title": obj.get("title"), + "description": obj.get("description"), + "services": obj.get("services"), + "execution_type": obj.get("execution_type"), + "details": PolicyTemplateDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "id": obj.get("id") }) return _obj diff --git a/onelens_backend_client/models/update_tenant_provider_request.py b/onelens_backend_client/models/update_tenant_provider_request.py index b9d12ca3..5687ef7d 100644 --- a/onelens_backend_client/models/update_tenant_provider_request.py +++ b/onelens_backend_client/models/update_tenant_provider_request.py @@ -17,11 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.cloud_id import CloudId -from onelens_backend_client.models.parent_id1 import ParentId1 -from onelens_backend_client.models.provider_config import ProviderConfig from typing import Optional, Set from typing_extensions import Self @@ -29,9 +26,9 @@ class UpdateTenantProviderRequest(BaseModel): """ UpdateTenantProviderRequest """ # noqa: E501 - cloud_id: Optional[CloudId] = None - parent_id: Optional[ParentId1] = None - provider_config: Optional[ProviderConfig] = None + cloud_id: Optional[StrictStr] = None + parent_id: Optional[StrictStr] = None + provider_config: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["cloud_id", "parent_id", "provider_config"] model_config = ConfigDict( @@ -73,15 +70,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of cloud_id - if self.cloud_id: - _dict['cloud_id'] = self.cloud_id.to_dict() - # override the default output from pydantic by calling `to_dict()` of parent_id - if self.parent_id: - _dict['parent_id'] = self.parent_id.to_dict() - # override the default output from pydantic by calling `to_dict()` of provider_config - if self.provider_config: - _dict['provider_config'] = self.provider_config.to_dict() + # set to None if cloud_id (nullable) is None + # and model_fields_set contains the field + if self.cloud_id is None and "cloud_id" in self.model_fields_set: + _dict['cloud_id'] = None + + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + # set to None if provider_config (nullable) is None + # and model_fields_set contains the field + if self.provider_config is None and "provider_config" in self.model_fields_set: + _dict['provider_config'] = None + return _dict @classmethod @@ -94,9 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "cloud_id": CloudId.from_dict(obj["cloud_id"]) if obj.get("cloud_id") is not None else None, - "parent_id": ParentId1.from_dict(obj["parent_id"]) if obj.get("parent_id") is not None else None, - "provider_config": ProviderConfig.from_dict(obj["provider_config"]) if obj.get("provider_config") is not None else None + "cloud_id": obj.get("cloud_id"), + "parent_id": obj.get("parent_id"), + "provider_config": obj.get("provider_config") }) return _obj diff --git a/onelens_backend_client/models/update_tenant_provider_response.py b/onelens_backend_client/models/update_tenant_provider_response.py index 5653708a..afbe03ee 100644 --- a/onelens_backend_client/models/update_tenant_provider_response.py +++ b/onelens_backend_client/models/update_tenant_provider_response.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.parent_id import ParentId from typing import Optional, Set from typing_extensions import Self @@ -29,7 +28,7 @@ class UpdateTenantProviderResponse(BaseModel): """ # noqa: E501 cloud_provider: StrictStr = Field(description="Cloud provider") cloud_id: StrictStr = Field(description="Cloud ID") - parent_id: Optional[ParentId] = None + parent_id: Optional[StrictStr] = None provider_config: Dict[str, Any] = Field(description="provider config") id: StrictStr = Field(description="Unique ID for the Tenant Provider") is_parent_account: StrictBool = Field(description="billing account") @@ -76,9 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of parent_id - if self.parent_id: - _dict['parent_id'] = self.parent_id.to_dict() + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + return _dict @classmethod @@ -93,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "cloud_provider": obj.get("cloud_provider"), "cloud_id": obj.get("cloud_id"), - "parent_id": ParentId.from_dict(obj["parent_id"]) if obj.get("parent_id") is not None else None, + "parent_id": obj.get("parent_id"), "provider_config": obj.get("provider_config"), "id": obj.get("id"), "is_parent_account": obj.get("is_parent_account"), diff --git a/onelens_backend_client/models/update_tenant_request.py b/onelens_backend_client/models/update_tenant_request.py index d2c56e51..01030247 100644 --- a/onelens_backend_client/models/update_tenant_request.py +++ b/onelens_backend_client/models/update_tenant_request.py @@ -17,11 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.domains import Domains -from onelens_backend_client.models.name import Name -from onelens_backend_client.models.timezone import Timezone from typing import Optional, Set from typing_extensions import Self @@ -29,9 +26,9 @@ class UpdateTenantRequest(BaseModel): """ UpdateTenantRequest """ # noqa: E501 - name: Optional[Name] = None - domains: Optional[Domains] = None - timezone: Optional[Timezone] = None + name: Optional[StrictStr] = None + domains: Optional[Any] = None + timezone: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "domains", "timezone"] model_config = ConfigDict( @@ -73,15 +70,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of name - if self.name: - _dict['name'] = self.name.to_dict() - # override the default output from pydantic by calling `to_dict()` of domains - if self.domains: - _dict['domains'] = self.domains.to_dict() - # override the default output from pydantic by calling `to_dict()` of timezone - if self.timezone: - _dict['timezone'] = self.timezone.to_dict() + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if domains (nullable) is None + # and model_fields_set contains the field + if self.domains is None and "domains" in self.model_fields_set: + _dict['domains'] = None + + # set to None if timezone (nullable) is None + # and model_fields_set contains the field + if self.timezone is None and "timezone" in self.model_fields_set: + _dict['timezone'] = None + return _dict @classmethod @@ -94,9 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "name": Name.from_dict(obj["name"]) if obj.get("name") is not None else None, - "domains": Domains.from_dict(obj["domains"]) if obj.get("domains") is not None else None, - "timezone": Timezone.from_dict(obj["timezone"]) if obj.get("timezone") is not None else None + "name": obj.get("name"), + "domains": obj.get("domains"), + "timezone": obj.get("timezone") }) return _obj diff --git a/onelens_backend_client/models/update_tenant_user_response.py b/onelens_backend_client/models/update_tenant_user_response.py index 127279e7..1bafafc0 100644 --- a/onelens_backend_client/models/update_tenant_user_response.py +++ b/onelens_backend_client/models/update_tenant_user_response.py @@ -19,8 +19,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from onelens_backend_client.models.create_tenant_user_request_role import CreateTenantUserRequestRole -from onelens_backend_client.models.create_tenant_user_response_status import CreateTenantUserResponseStatus +from onelens_backend_client.models.user_role import UserRole +from onelens_backend_client.models.user_status import UserStatus from typing import Optional, Set from typing_extensions import Self @@ -28,9 +28,9 @@ class UpdateTenantUserResponse(BaseModel): """ UpdateTenantUserResponse """ # noqa: E501 - status: Optional[CreateTenantUserResponseStatus] = None + status: Optional[UserStatus] = None ol_user_id: StrictStr = Field(description="Unique onelens identifier for the user") - role: Optional[CreateTenantUserRequestRole] = None + role: Optional[UserRole] = None sources: List[StrictStr] = Field(description="Different sources from where user signed up. e.g. social signup, username-password") id: StrictStr = Field(description="PK in the tenant users table") additional_properties: Dict[str, Any] = {} @@ -77,17 +77,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of status - if self.status: - _dict['status'] = self.status.to_dict() - # override the default output from pydantic by calling `to_dict()` of role - if self.role: - _dict['role'] = self.role.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if status (nullable) is None + # and model_fields_set contains the field + if self.status is None and "status" in self.model_fields_set: + _dict['status'] = None + + # set to None if role (nullable) is None + # and model_fields_set contains the field + if self.role is None and "role" in self.model_fields_set: + _dict['role'] = None + return _dict @classmethod @@ -100,9 +104,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": CreateTenantUserResponseStatus.from_dict(obj["status"]) if obj.get("status") is not None else None, + "status": obj.get("status"), "ol_user_id": obj.get("ol_user_id"), - "role": CreateTenantUserRequestRole.from_dict(obj["role"]) if obj.get("role") is not None else None, + "role": obj.get("role"), "sources": obj.get("sources"), "id": obj.get("id") }) diff --git a/test/test_attributes_data.py b/test/test_attributes_data.py deleted file mode 100644 index 26727769..00000000 --- a/test/test_attributes_data.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.attributes_data import AttributesData - -class TestAttributesData(unittest.TestCase): - """AttributesData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AttributesData: - """Test AttributesData - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AttributesData` - """ - model = AttributesData() - if include_optional: - return AttributesData( - ) - else: - return AttributesData( - ) - """ - - def testAttributesData(self): - """Test AttributesData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_cloud_id.py b/test/test_cloud_id.py deleted file mode 100644 index 72fb2265..00000000 --- a/test/test_cloud_id.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.cloud_id import CloudId - -class TestCloudId(unittest.TestCase): - """CloudId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CloudId: - """Test CloudId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CloudId` - """ - model = CloudId() - if include_optional: - return CloudId( - ) - else: - return CloudId( - ) - """ - - def testCloudId(self): - """Test CloudId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_cloud_ids.py b/test/test_cloud_ids.py deleted file mode 100644 index 9e56bedf..00000000 --- a/test/test_cloud_ids.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.cloud_ids import CloudIds - -class TestCloudIds(unittest.TestCase): - """CloudIds unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CloudIds: - """Test CloudIds - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CloudIds` - """ - model = CloudIds() - if include_optional: - return CloudIds( - ) - else: - return CloudIds( - ) - """ - - def testCloudIds(self): - """Test CloudIds""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_cloud_providers.py b/test/test_cloud_providers.py deleted file mode 100644 index 4e30f894..00000000 --- a/test/test_cloud_providers.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.cloud_providers import CloudProviders - -class TestCloudProviders(unittest.TestCase): - """CloudProviders unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CloudProviders: - """Test CloudProviders - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CloudProviders` - """ - model = CloudProviders() - if include_optional: - return CloudProviders( - ) - else: - return CloudProviders( - ) - """ - - def testCloudProviders(self): - """Test CloudProviders""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_config_schema.py b/test/test_config_schema.py deleted file mode 100644 index 740f5113..00000000 --- a/test/test_config_schema.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.config_schema import ConfigSchema - -class TestConfigSchema(unittest.TestCase): - """ConfigSchema unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConfigSchema: - """Test ConfigSchema - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConfigSchema` - """ - model = ConfigSchema() - if include_optional: - return ConfigSchema( - ) - else: - return ConfigSchema( - ) - """ - - def testConfigSchema(self): - """Test ConfigSchema""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_policy_template_pack_request.py b/test/test_create_policy_template_pack_request.py index 5203c45a..9ffd6b78 100644 --- a/test/test_create_policy_template_pack_request.py +++ b/test/test_create_policy_template_pack_request.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> CreatePolicyTemplatePackRequest: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ) + source_schema = onelens_backend_client.models.source_schema.source_schema(), ) ) else: return CreatePolicyTemplatePackRequest( @@ -47,7 +47,7 @@ def make_instance(self, include_optional) -> CreatePolicyTemplatePackRequest: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ), + source_schema = onelens_backend_client.models.source_schema.source_schema(), ), ) """ diff --git a/test/test_create_policy_template_pack_response.py b/test/test_create_policy_template_pack_response.py index 5d933619..452ec6f4 100644 --- a/test/test_create_policy_template_pack_response.py +++ b/test/test_create_policy_template_pack_response.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> CreatePolicyTemplatePackResponse: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ), + source_schema = onelens_backend_client.models.source_schema.source_schema(), ), id = '', state = 'DRAFT' ) @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> CreatePolicyTemplatePackResponse: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ), + source_schema = onelens_backend_client.models.source_schema.source_schema(), ), id = '', state = 'DRAFT', ) diff --git a/test/test_create_policy_template_request.py b/test/test_create_policy_template_request.py index 6735e22c..67341c22 100644 --- a/test/test_create_policy_template_request.py +++ b/test/test_create_policy_template_request.py @@ -45,11 +45,11 @@ def make_instance(self, include_optional) -> CreatePolicyTemplateRequest: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ) + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ) ) else: return CreatePolicyTemplateRequest( @@ -62,11 +62,11 @@ def make_instance(self, include_optional) -> CreatePolicyTemplateRequest: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), ) """ diff --git a/test/test_create_policy_template_response.py b/test/test_create_policy_template_response.py index 47e205a1..c8011ef2 100644 --- a/test/test_create_policy_template_response.py +++ b/test/test_create_policy_template_response.py @@ -45,11 +45,11 @@ def make_instance(self, include_optional) -> CreatePolicyTemplateResponse: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', @@ -66,11 +66,11 @@ def make_instance(self, include_optional) -> CreatePolicyTemplateResponse: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', diff --git a/test/test_create_tenant_provider_request.py b/test/test_create_tenant_provider_request.py index e4d3697f..03a2ed5f 100644 --- a/test/test_create_tenant_provider_request.py +++ b/test/test_create_tenant_provider_request.py @@ -37,9 +37,9 @@ def make_instance(self, include_optional) -> CreateTenantProviderRequest: return CreateTenantProviderRequest( cloud_provider = '', cloud_id = '', - parent_id = None, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), - tenant_id = None + tenant_id = '' ) else: return CreateTenantProviderRequest( diff --git a/test/test_create_tenant_provider_response.py b/test/test_create_tenant_provider_response.py index 027b7068..d4274d0b 100644 --- a/test/test_create_tenant_provider_response.py +++ b/test/test_create_tenant_provider_response.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> CreateTenantProviderResponse: return CreateTenantProviderResponse( cloud_provider = '', cloud_id = '', - parent_id = None, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, diff --git a/test/test_create_tenant_user_request.py b/test/test_create_tenant_user_request.py index 3ea7d2c0..377b8fe5 100644 --- a/test/test_create_tenant_user_request.py +++ b/test/test_create_tenant_user_request.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> CreateTenantUserRequest: if include_optional: return CreateTenantUserRequest( ol_user_id = '', - role = None, + role = 'ADMIN', sources = [ '' ] diff --git a/test/test_create_tenant_user_request_role.py b/test/test_create_tenant_user_request_role.py deleted file mode 100644 index 4eaa1eae..00000000 --- a/test/test_create_tenant_user_request_role.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.create_tenant_user_request_role import CreateTenantUserRequestRole - -class TestCreateTenantUserRequestRole(unittest.TestCase): - """CreateTenantUserRequestRole unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateTenantUserRequestRole: - """Test CreateTenantUserRequestRole - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateTenantUserRequestRole` - """ - model = CreateTenantUserRequestRole() - if include_optional: - return CreateTenantUserRequestRole( - ) - else: - return CreateTenantUserRequestRole( - ) - """ - - def testCreateTenantUserRequestRole(self): - """Test CreateTenantUserRequestRole""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_tenant_user_response.py b/test/test_create_tenant_user_response.py index 5802dba5..9d0f8b14 100644 --- a/test/test_create_tenant_user_response.py +++ b/test/test_create_tenant_user_response.py @@ -35,9 +35,9 @@ def make_instance(self, include_optional) -> CreateTenantUserResponse: model = CreateTenantUserResponse() if include_optional: return CreateTenantUserResponse( - status = None, + status = 'ACTIVE', ol_user_id = '', - role = None, + role = 'ADMIN', sources = [ '' ], diff --git a/test/test_create_tenant_user_response_status.py b/test/test_create_tenant_user_response_status.py deleted file mode 100644 index 116afa5b..00000000 --- a/test/test_create_tenant_user_response_status.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.create_tenant_user_response_status import CreateTenantUserResponseStatus - -class TestCreateTenantUserResponseStatus(unittest.TestCase): - """CreateTenantUserResponseStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateTenantUserResponseStatus: - """Test CreateTenantUserResponseStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateTenantUserResponseStatus` - """ - model = CreateTenantUserResponseStatus() - if include_optional: - return CreateTenantUserResponseStatus( - ) - else: - return CreateTenantUserResponseStatus( - ) - """ - - def testCreateTenantUserResponseStatus(self): - """Test CreateTenantUserResponseStatus""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_database_connection_string.py b/test/test_database_connection_string.py deleted file mode 100644 index cbe76ebc..00000000 --- a/test/test_database_connection_string.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.database_connection_string import DatabaseConnectionString - -class TestDatabaseConnectionString(unittest.TestCase): - """DatabaseConnectionString unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DatabaseConnectionString: - """Test DatabaseConnectionString - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DatabaseConnectionString` - """ - model = DatabaseConnectionString() - if include_optional: - return DatabaseConnectionString( - ) - else: - return DatabaseConnectionString( - ) - """ - - def testDatabaseConnectionString(self): - """Test DatabaseConnectionString""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_default_policy_config.py b/test/test_default_policy_config.py deleted file mode 100644 index 5588669d..00000000 --- a/test/test_default_policy_config.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.default_policy_config import DefaultPolicyConfig - -class TestDefaultPolicyConfig(unittest.TestCase): - """DefaultPolicyConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DefaultPolicyConfig: - """Test DefaultPolicyConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DefaultPolicyConfig` - """ - model = DefaultPolicyConfig() - if include_optional: - return DefaultPolicyConfig( - ) - else: - return DefaultPolicyConfig( - ) - """ - - def testDefaultPolicyConfig(self): - """Test DefaultPolicyConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_description.py b/test/test_description.py deleted file mode 100644 index cb5d05bb..00000000 --- a/test/test_description.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.description import Description - -class TestDescription(unittest.TestCase): - """Description unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Description: - """Test Description - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Description` - """ - model = Description() - if include_optional: - return Description( - ) - else: - return Description( - ) - """ - - def testDescription(self): - """Test Description""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_domains.py b/test/test_domains.py deleted file mode 100644 index b729c8b6..00000000 --- a/test/test_domains.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.domains import Domains - -class TestDomains(unittest.TestCase): - """Domains unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Domains: - """Test Domains - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Domains` - """ - model = Domains() - if include_optional: - return Domains( - ) - else: - return Domains( - ) - """ - - def testDomains(self): - """Test Domains""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_get_policy_template_by_id_response.py b/test/test_get_policy_template_by_id_response.py index 2c38543d..ebc25b67 100644 --- a/test/test_get_policy_template_by_id_response.py +++ b/test/test_get_policy_template_by_id_response.py @@ -45,11 +45,11 @@ def make_instance(self, include_optional) -> GetPolicyTemplateByIDResponse: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', @@ -66,11 +66,11 @@ def make_instance(self, include_optional) -> GetPolicyTemplateByIDResponse: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', diff --git a/test/test_get_policy_template_pack_by_id_response.py b/test/test_get_policy_template_pack_by_id_response.py index d47efbb1..0ff20916 100644 --- a/test/test_get_policy_template_pack_by_id_response.py +++ b/test/test_get_policy_template_pack_by_id_response.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> GetPolicyTemplatePackByIdResponse: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ), + source_schema = onelens_backend_client.models.source_schema.source_schema(), ), id = '', state = 'DRAFT' ) @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> GetPolicyTemplatePackByIdResponse: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ), + source_schema = onelens_backend_client.models.source_schema.source_schema(), ), id = '', state = 'DRAFT', ) diff --git a/test/test_get_policy_templates_request.py b/test/test_get_policy_templates_request.py index d1d8fe12..d10115f6 100644 --- a/test/test_get_policy_templates_request.py +++ b/test/test_get_policy_templates_request.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> GetPolicyTemplatesRequest: page = 56, page_size = 56, ), filters = onelens_backend_client.models.policy_template_filters.PolicyTemplateFilters( - search_query = null, + search_query = '', parent_ptp_ids = [ '' ], diff --git a/test/test_get_tenant_by_id_response.py b/test/test_get_tenant_by_id_response.py index 6d8ebe82..78c4d6c5 100644 --- a/test/test_get_tenant_by_id_response.py +++ b/test/test_get_tenant_by_id_response.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> GetTenantByIDResponse: ], timezone = '', id = '', - tenant_state = 'ACTIVE' + tenant_state = 'ACTIVE', + database_connection_string = '' ) else: return GetTenantByIDResponse( @@ -52,6 +53,7 @@ def make_instance(self, include_optional) -> GetTenantByIDResponse: timezone = '', id = '', tenant_state = 'ACTIVE', + database_connection_string = '', ) """ diff --git a/test/test_get_tenant_provider_by_id_response.py b/test/test_get_tenant_provider_by_id_response.py index cee37b1e..f1a5771b 100644 --- a/test/test_get_tenant_provider_by_id_response.py +++ b/test/test_get_tenant_provider_by_id_response.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> GetTenantProviderByIDResponse: return GetTenantProviderByIDResponse( cloud_provider = '', cloud_id = '', - parent_id = None, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, diff --git a/test/test_get_tenant_providers_request.py b/test/test_get_tenant_providers_request.py index f714c5a7..f84a652d 100644 --- a/test/test_get_tenant_providers_request.py +++ b/test/test_get_tenant_providers_request.py @@ -40,8 +40,8 @@ def make_instance(self, include_optional) -> GetTenantProvidersRequest: cloud_ids = null, cloud_providers = null, parent_ids = null, - is_parent_account = null, - is_verified = null, + is_parent_account = True, + is_verified = True, states = null, ), attributes = [ 'role_arn' diff --git a/test/test_inputs.py b/test/test_inputs.py deleted file mode 100644 index 0b37953c..00000000 --- a/test/test_inputs.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.inputs import Inputs - -class TestInputs(unittest.TestCase): - """Inputs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Inputs: - """Test Inputs - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Inputs` - """ - model = Inputs() - if include_optional: - return Inputs( - ) - else: - return Inputs( - ) - """ - - def testInputs(self): - """Test Inputs""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_is_parent_account.py b/test/test_is_parent_account.py deleted file mode 100644 index e82009d4..00000000 --- a/test/test_is_parent_account.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.is_parent_account import IsParentAccount - -class TestIsParentAccount(unittest.TestCase): - """IsParentAccount unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> IsParentAccount: - """Test IsParentAccount - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `IsParentAccount` - """ - model = IsParentAccount() - if include_optional: - return IsParentAccount( - ) - else: - return IsParentAccount( - ) - """ - - def testIsParentAccount(self): - """Test IsParentAccount""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_is_verified.py b/test/test_is_verified.py deleted file mode 100644 index 73edad24..00000000 --- a/test/test_is_verified.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.is_verified import IsVerified - -class TestIsVerified(unittest.TestCase): - """IsVerified unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> IsVerified: - """Test IsVerified - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `IsVerified` - """ - model = IsVerified() - if include_optional: - return IsVerified( - ) - else: - return IsVerified( - ) - """ - - def testIsVerified(self): - """Test IsVerified""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_message.py b/test/test_message.py deleted file mode 100644 index 530f699e..00000000 --- a/test/test_message.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.message import Message - -class TestMessage(unittest.TestCase): - """Message unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Message: - """Test Message - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Message` - """ - model = Message() - if include_optional: - return Message( - ) - else: - return Message( - ) - """ - - def testMessage(self): - """Test Message""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_name.py b/test/test_name.py deleted file mode 100644 index 58e9ec7c..00000000 --- a/test/test_name.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.name import Name - -class TestName(unittest.TestCase): - """Name unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Name: - """Test Name - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Name` - """ - model = Name() - if include_optional: - return Name( - ) - else: - return Name( - ) - """ - - def testName(self): - """Test Name""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_names.py b/test/test_names.py deleted file mode 100644 index d425e4ad..00000000 --- a/test/test_names.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.names import Names - -class TestNames(unittest.TestCase): - """Names unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Names: - """Test Names - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Names` - """ - model = Names() - if include_optional: - return Names( - ) - else: - return Names( - ) - """ - - def testNames(self): - """Test Names""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_output_violation_schema.py b/test/test_output_violation_schema.py deleted file mode 100644 index 75e0a8b8..00000000 --- a/test/test_output_violation_schema.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.output_violation_schema import OutputViolationSchema - -class TestOutputViolationSchema(unittest.TestCase): - """OutputViolationSchema unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OutputViolationSchema: - """Test OutputViolationSchema - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OutputViolationSchema` - """ - model = OutputViolationSchema() - if include_optional: - return OutputViolationSchema( - ) - else: - return OutputViolationSchema( - ) - """ - - def testOutputViolationSchema(self): - """Test OutputViolationSchema""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_parent_id.py b/test/test_parent_id.py deleted file mode 100644 index 28aa9454..00000000 --- a/test/test_parent_id.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.parent_id import ParentId - -class TestParentId(unittest.TestCase): - """ParentId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ParentId: - """Test ParentId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ParentId` - """ - model = ParentId() - if include_optional: - return ParentId( - ) - else: - return ParentId( - ) - """ - - def testParentId(self): - """Test ParentId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_parent_id1.py b/test/test_parent_id1.py deleted file mode 100644 index 2dddf023..00000000 --- a/test/test_parent_id1.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.parent_id1 import ParentId1 - -class TestParentId1(unittest.TestCase): - """ParentId1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ParentId1: - """Test ParentId1 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ParentId1` - """ - model = ParentId1() - if include_optional: - return ParentId1( - ) - else: - return ParentId1( - ) - """ - - def testParentId1(self): - """Test ParentId1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_parent_ids.py b/test/test_parent_ids.py deleted file mode 100644 index f822b0f4..00000000 --- a/test/test_parent_ids.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.parent_ids import ParentIds - -class TestParentIds(unittest.TestCase): - """ParentIds unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ParentIds: - """Test ParentIds - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ParentIds` - """ - model = ParentIds() - if include_optional: - return ParentIds( - ) - else: - return ParentIds( - ) - """ - - def testParentIds(self): - """Test ParentIds""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_policy_template.py b/test/test_policy_template.py index ac3e6bec..6ca54c5e 100644 --- a/test/test_policy_template.py +++ b/test/test_policy_template.py @@ -45,11 +45,11 @@ def make_instance(self, include_optional) -> PolicyTemplate: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', @@ -66,11 +66,11 @@ def make_instance(self, include_optional) -> PolicyTemplate: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', diff --git a/test/test_policy_template_details.py b/test/test_policy_template_details.py index 4521c57e..650e0cda 100644 --- a/test/test_policy_template_details.py +++ b/test/test_policy_template_details.py @@ -36,11 +36,11 @@ def make_instance(self, include_optional) -> PolicyTemplateDetails: if include_optional: return PolicyTemplateDetails( inputs = None, - config_schema = None, - output_violation_schema = None, - rule_type = None, - rule_definition = None, - default_policy_config = None + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config() ) else: return PolicyTemplateDetails( diff --git a/test/test_policy_template_details_rule_type.py b/test/test_policy_template_details_rule_type.py deleted file mode 100644 index fbedd33e..00000000 --- a/test/test_policy_template_details_rule_type.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.policy_template_details_rule_type import PolicyTemplateDetailsRuleType - -class TestPolicyTemplateDetailsRuleType(unittest.TestCase): - """PolicyTemplateDetailsRuleType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PolicyTemplateDetailsRuleType: - """Test PolicyTemplateDetailsRuleType - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PolicyTemplateDetailsRuleType` - """ - model = PolicyTemplateDetailsRuleType() - if include_optional: - return PolicyTemplateDetailsRuleType( - ) - else: - return PolicyTemplateDetailsRuleType( - ) - """ - - def testPolicyTemplateDetailsRuleType(self): - """Test PolicyTemplateDetailsRuleType""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_policy_template_filters.py b/test/test_policy_template_filters.py index b816f264..f33e492b 100644 --- a/test/test_policy_template_filters.py +++ b/test/test_policy_template_filters.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> PolicyTemplateFilters: model = PolicyTemplateFilters() if include_optional: return PolicyTemplateFilters( - search_query = None, + search_query = '', parent_ptp_ids = [ '' ], diff --git a/test/test_policy_template_pack.py b/test/test_policy_template_pack.py index bbb0c37a..e66b76eb 100644 --- a/test/test_policy_template_pack.py +++ b/test/test_policy_template_pack.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> PolicyTemplatePack: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ), + source_schema = onelens_backend_client.models.source_schema.source_schema(), ), id = '', state = 'DRAFT' ) @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> PolicyTemplatePack: category = 'COST_SAVING', provider = 'AWS', details = onelens_backend_client.models.policy_template_pack_details.PolicyTemplatePackDetails( - source_schema = null, ), + source_schema = onelens_backend_client.models.source_schema.source_schema(), ), id = '', state = 'DRAFT', ) diff --git a/test/test_policy_template_pack_details.py b/test/test_policy_template_pack_details.py index 8f237361..b638c7e3 100644 --- a/test/test_policy_template_pack_details.py +++ b/test/test_policy_template_pack_details.py @@ -35,7 +35,7 @@ def make_instance(self, include_optional) -> PolicyTemplatePackDetails: model = PolicyTemplatePackDetails() if include_optional: return PolicyTemplatePackDetails( - source_schema = None + source_schema = onelens_backend_client.models.source_schema.source_schema() ) else: return PolicyTemplatePackDetails( diff --git a/test/test_policy_template_update_fields_mixin.py b/test/test_policy_template_update_fields_mixin.py index 1efddec7..f7020559 100644 --- a/test/test_policy_template_update_fields_mixin.py +++ b/test/test_policy_template_update_fields_mixin.py @@ -35,11 +35,17 @@ def make_instance(self, include_optional) -> PolicyTemplateUpdateFieldsMixin: model = PolicyTemplateUpdateFieldsMixin() if include_optional: return PolicyTemplateUpdateFieldsMixin( - title = None, - description = None, + title = '', + description = '', services = None, - execution_type = None, - details = None + execution_type = 'DETECTIVE', + details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( + inputs = null, + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ) ) else: return PolicyTemplateUpdateFieldsMixin( diff --git a/test/test_policy_template_update_fields_mixin_details.py b/test/test_policy_template_update_fields_mixin_details.py deleted file mode 100644 index 93c26e36..00000000 --- a/test/test_policy_template_update_fields_mixin_details.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.policy_template_update_fields_mixin_details import PolicyTemplateUpdateFieldsMixinDetails - -class TestPolicyTemplateUpdateFieldsMixinDetails(unittest.TestCase): - """PolicyTemplateUpdateFieldsMixinDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PolicyTemplateUpdateFieldsMixinDetails: - """Test PolicyTemplateUpdateFieldsMixinDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PolicyTemplateUpdateFieldsMixinDetails` - """ - model = PolicyTemplateUpdateFieldsMixinDetails() - if include_optional: - return PolicyTemplateUpdateFieldsMixinDetails( - inputs = None, - config_schema = None, - output_violation_schema = None, - rule_type = None, - rule_definition = None, - default_policy_config = None - ) - else: - return PolicyTemplateUpdateFieldsMixinDetails( - ) - """ - - def testPolicyTemplateUpdateFieldsMixinDetails(self): - """Test PolicyTemplateUpdateFieldsMixinDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_policy_template_update_fields_mixin_execution_type.py b/test/test_policy_template_update_fields_mixin_execution_type.py deleted file mode 100644 index 6a59248e..00000000 --- a/test/test_policy_template_update_fields_mixin_execution_type.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.policy_template_update_fields_mixin_execution_type import PolicyTemplateUpdateFieldsMixinExecutionType - -class TestPolicyTemplateUpdateFieldsMixinExecutionType(unittest.TestCase): - """PolicyTemplateUpdateFieldsMixinExecutionType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PolicyTemplateUpdateFieldsMixinExecutionType: - """Test PolicyTemplateUpdateFieldsMixinExecutionType - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PolicyTemplateUpdateFieldsMixinExecutionType` - """ - model = PolicyTemplateUpdateFieldsMixinExecutionType() - if include_optional: - return PolicyTemplateUpdateFieldsMixinExecutionType( - ) - else: - return PolicyTemplateUpdateFieldsMixinExecutionType( - ) - """ - - def testPolicyTemplateUpdateFieldsMixinExecutionType(self): - """Test PolicyTemplateUpdateFieldsMixinExecutionType""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_provider_config.py b/test/test_provider_config.py deleted file mode 100644 index 7cae85b3..00000000 --- a/test/test_provider_config.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.provider_config import ProviderConfig - -class TestProviderConfig(unittest.TestCase): - """ProviderConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ProviderConfig: - """Test ProviderConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ProviderConfig` - """ - model = ProviderConfig() - if include_optional: - return ProviderConfig( - ) - else: - return ProviderConfig( - ) - """ - - def testProviderConfig(self): - """Test ProviderConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_response_activate_policy_template_response.py b/test/test_response_activate_policy_template_response.py index c70b2fbe..cd7d4677 100644 --- a/test/test_response_activate_policy_template_response.py +++ b/test/test_response_activate_policy_template_response.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ResponseActivatePolicyTemplateRespo if include_optional: return ResponseActivatePolicyTemplateResponse( data = onelens_backend_client.models.activate_policy_template_response.ActivatePolicyTemplateResponse(), - message = None + message = '' ) else: return ResponseActivatePolicyTemplateResponse( diff --git a/test/test_response_create_policy_template_pack_response.py b/test/test_response_create_policy_template_pack_response.py index 787bfe81..738557e9 100644 --- a/test/test_response_create_policy_template_pack_response.py +++ b/test/test_response_create_policy_template_pack_response.py @@ -42,7 +42,7 @@ def make_instance(self, include_optional) -> ResponseCreatePolicyTemplatePackRes details = null, id = '', state = null, ), - message = None + message = '' ) else: return ResponseCreatePolicyTemplatePackResponse( diff --git a/test/test_response_create_policy_template_response.py b/test/test_response_create_policy_template_response.py index 7529d9d6..af9c4174 100644 --- a/test/test_response_create_policy_template_response.py +++ b/test/test_response_create_policy_template_response.py @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> ResponseCreatePolicyTemplateRespons state = null, category = null, provider = null, ), - message = None + message = '' ) else: return ResponseCreatePolicyTemplateResponse( diff --git a/test/test_response_create_tenant_user_response.py b/test/test_response_create_tenant_user_response.py index b537097f..caf5bfc7 100644 --- a/test/test_response_create_tenant_user_response.py +++ b/test/test_response_create_tenant_user_response.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ResponseCreateTenantUserResponse: if include_optional: return ResponseCreateTenantUserResponse( data = { }, - message = None + message = '' ) else: return ResponseCreateTenantUserResponse( diff --git a/test/test_response_create_user_tenant_mapping_response.py b/test/test_response_create_user_tenant_mapping_response.py index 9020846d..b0cc7503 100644 --- a/test/test_response_create_user_tenant_mapping_response.py +++ b/test/test_response_create_user_tenant_mapping_response.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> ResponseCreateUserTenantMappingResp data = onelens_backend_client.models.create_user_tenant_mapping_response.CreateUserTenantMappingResponse( user_id = '', tenant_id = '', ), - message = None + message = '' ) else: return ResponseCreateUserTenantMappingResponse( diff --git a/test/test_response_deprecate_policy_template_response.py b/test/test_response_deprecate_policy_template_response.py index 60d4e4e5..09ce6a80 100644 --- a/test/test_response_deprecate_policy_template_response.py +++ b/test/test_response_deprecate_policy_template_response.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ResponseDeprecatePolicyTemplateResp if include_optional: return ResponseDeprecatePolicyTemplateResponse( data = onelens_backend_client.models.deprecate_policy_template_response.DeprecatePolicyTemplateResponse(), - message = None + message = '' ) else: return ResponseDeprecatePolicyTemplateResponse( diff --git a/test/test_response_disable_tenant_provider_response.py b/test/test_response_disable_tenant_provider_response.py index 8ee23670..9a7481b8 100644 --- a/test/test_response_disable_tenant_provider_response.py +++ b/test/test_response_disable_tenant_provider_response.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ResponseDisableTenantProviderRespon if include_optional: return ResponseDisableTenantProviderResponse( data = onelens_backend_client.models.disable_tenant_provider_response.DisableTenantProviderResponse(), - message = None + message = '' ) else: return ResponseDisableTenantProviderResponse( diff --git a/test/test_response_disable_tenant_response.py b/test/test_response_disable_tenant_response.py index c40d5d25..3f186d58 100644 --- a/test/test_response_disable_tenant_response.py +++ b/test/test_response_disable_tenant_response.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ResponseDisableTenantResponse: if include_optional: return ResponseDisableTenantResponse( data = onelens_backend_client.models.disable_tenant_response.DisableTenantResponse(), - message = None + message = '' ) else: return ResponseDisableTenantResponse( diff --git a/test/test_response_get_policy_template_by_id_response.py b/test/test_response_get_policy_template_by_id_response.py index a63aacd4..85382410 100644 --- a/test/test_response_get_policy_template_by_id_response.py +++ b/test/test_response_get_policy_template_by_id_response.py @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> ResponseGetPolicyTemplateByIDRespon state = null, category = null, provider = null, ), - message = None + message = '' ) else: return ResponseGetPolicyTemplateByIDResponse( diff --git a/test/test_response_get_policy_template_pack_by_id_response.py b/test/test_response_get_policy_template_pack_by_id_response.py index e13773d9..dd4e2a44 100644 --- a/test/test_response_get_policy_template_pack_by_id_response.py +++ b/test/test_response_get_policy_template_pack_by_id_response.py @@ -42,7 +42,7 @@ def make_instance(self, include_optional) -> ResponseGetPolicyTemplatePackByIdRe details = null, id = '', state = null, ), - message = None + message = '' ) else: return ResponseGetPolicyTemplatePackByIdResponse( diff --git a/test/test_response_get_policy_template_packs_response.py b/test/test_response_get_policy_template_packs_response.py index f1c6b6f9..431d68b3 100644 --- a/test/test_response_get_policy_template_packs_response.py +++ b/test/test_response_get_policy_template_packs_response.py @@ -46,7 +46,7 @@ def make_instance(self, include_optional) -> ResponseGetPolicyTemplatePacksRespo id = '', state = null, ) ], ), - message = None + message = '' ) else: return ResponseGetPolicyTemplatePacksResponse( diff --git a/test/test_response_get_policy_templates_response.py b/test/test_response_get_policy_templates_response.py index 8a72138d..1bfefe3b 100644 --- a/test/test_response_get_policy_templates_response.py +++ b/test/test_response_get_policy_templates_response.py @@ -53,7 +53,7 @@ def make_instance(self, include_optional) -> ResponseGetPolicyTemplatesResponse: category = null, provider = null, ) ], ), - message = None + message = '' ) else: return ResponseGetPolicyTemplatesResponse( diff --git a/test/test_response_get_tenant_by_id_response.py b/test/test_response_get_tenant_by_id_response.py index 58062707..c28d7d98 100644 --- a/test/test_response_get_tenant_by_id_response.py +++ b/test/test_response_get_tenant_by_id_response.py @@ -43,8 +43,8 @@ def make_instance(self, include_optional) -> ResponseGetTenantByIDResponse: timezone = '', id = '', tenant_state = null, - database_connection_string = null, ), - message = None + database_connection_string = '', ), + message = '' ) else: return ResponseGetTenantByIDResponse( @@ -56,7 +56,7 @@ def make_instance(self, include_optional) -> ResponseGetTenantByIDResponse: timezone = '', id = '', tenant_state = null, - database_connection_string = null, ), + database_connection_string = '', ), ) """ diff --git a/test/test_response_get_tenant_provider_by_id_response.py b/test/test_response_get_tenant_provider_by_id_response.py index 0704f403..4fe8d39a 100644 --- a/test/test_response_get_tenant_provider_by_id_response.py +++ b/test/test_response_get_tenant_provider_by_id_response.py @@ -38,20 +38,20 @@ def make_instance(self, include_optional) -> ResponseGetTenantProviderByIDRespon data = onelens_backend_client.models.get_tenant_provider_by_id_response.GetTenantProviderByIDResponse( cloud_provider = '', cloud_id = '', - parent_id = null, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, is_verified = True, state = '', ), - message = None + message = '' ) else: return ResponseGetTenantProviderByIDResponse( data = onelens_backend_client.models.get_tenant_provider_by_id_response.GetTenantProviderByIDResponse( cloud_provider = '', cloud_id = '', - parent_id = null, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, diff --git a/test/test_response_get_tenant_providers_response.py b/test/test_response_get_tenant_providers_response.py index 858e666e..5c9ef935 100644 --- a/test/test_response_get_tenant_providers_response.py +++ b/test/test_response_get_tenant_providers_response.py @@ -37,14 +37,14 @@ def make_instance(self, include_optional) -> ResponseGetTenantProvidersResponse: return ResponseGetTenantProvidersResponse( data = onelens_backend_client.models.get_tenant_providers_response.GetTenantProvidersResponse( tenant_provider_filter_data = null, - attributes_data = null, ), - message = None + attributes_data = onelens_backend_client.models.attributes_data.attributes_data(), ), + message = '' ) else: return ResponseGetTenantProvidersResponse( data = onelens_backend_client.models.get_tenant_providers_response.GetTenantProvidersResponse( tenant_provider_filter_data = null, - attributes_data = null, ), + attributes_data = onelens_backend_client.models.attributes_data.attributes_data(), ), ) """ diff --git a/test/test_response_get_tenants_response.py b/test/test_response_get_tenants_response.py index 07845d89..1d02c817 100644 --- a/test/test_response_get_tenants_response.py +++ b/test/test_response_get_tenants_response.py @@ -46,7 +46,7 @@ def make_instance(self, include_optional) -> ResponseGetTenantsResponse: id = '', tenant_state = null, ) ], ), - message = None + message = '' ) else: return ResponseGetTenantsResponse( diff --git a/test/test_response_tenant_verify_response.py b/test/test_response_tenant_verify_response.py index c4bacd7c..2af40bca 100644 --- a/test/test_response_tenant_verify_response.py +++ b/test/test_response_tenant_verify_response.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> ResponseTenantVerifyResponse: data = onelens_backend_client.models.tenant_verify_response.TenantVerifyResponse( verified = True, accounts = onelens_backend_client.models.accounts.Accounts(), ), - message = None + message = '' ) else: return ResponseTenantVerifyResponse( diff --git a/test/test_response_update_policy_template_response.py b/test/test_response_update_policy_template_response.py index 2b822fa4..5ba3e62d 100644 --- a/test/test_response_update_policy_template_response.py +++ b/test/test_response_update_policy_template_response.py @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> ResponseUpdatePolicyTemplateRespons state = null, category = null, provider = null, ), - message = None + message = '' ) else: return ResponseUpdatePolicyTemplateResponse( diff --git a/test/test_response_update_tenant_provider_response.py b/test/test_response_update_tenant_provider_response.py index 553d27a2..fa65d58f 100644 --- a/test/test_response_update_tenant_provider_response.py +++ b/test/test_response_update_tenant_provider_response.py @@ -38,20 +38,20 @@ def make_instance(self, include_optional) -> ResponseUpdateTenantProviderRespons data = onelens_backend_client.models.update_tenant_provider_response.UpdateTenantProviderResponse( cloud_provider = '', cloud_id = '', - parent_id = null, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, is_verified = True, state = '', ), - message = None + message = '' ) else: return ResponseUpdateTenantProviderResponse( data = onelens_backend_client.models.update_tenant_provider_response.UpdateTenantProviderResponse( cloud_provider = '', cloud_id = '', - parent_id = null, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, diff --git a/test/test_response_update_tenant_response.py b/test/test_response_update_tenant_response.py index 3280b901..06629c05 100644 --- a/test/test_response_update_tenant_response.py +++ b/test/test_response_update_tenant_response.py @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> ResponseUpdateTenantResponse: timezone = '', id = '', tenant_state = null, ), - message = None + message = '' ) else: return ResponseUpdateTenantResponse( diff --git a/test/test_response_update_tenant_user_response.py b/test/test_response_update_tenant_user_response.py index bc1827f4..a4de0700 100644 --- a/test/test_response_update_tenant_user_response.py +++ b/test/test_response_update_tenant_user_response.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> ResponseUpdateTenantUserResponse: if include_optional: return ResponseUpdateTenantUserResponse( data = { }, - message = None + message = '' ) else: return ResponseUpdateTenantUserResponse( diff --git a/test/test_rule_definition.py b/test/test_rule_definition.py deleted file mode 100644 index 2c5ca1fa..00000000 --- a/test/test_rule_definition.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.rule_definition import RuleDefinition - -class TestRuleDefinition(unittest.TestCase): - """RuleDefinition unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuleDefinition: - """Test RuleDefinition - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuleDefinition` - """ - model = RuleDefinition() - if include_optional: - return RuleDefinition( - ) - else: - return RuleDefinition( - ) - """ - - def testRuleDefinition(self): - """Test RuleDefinition""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_search_query.py b/test/test_search_query.py deleted file mode 100644 index 570d7679..00000000 --- a/test/test_search_query.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.search_query import SearchQuery - -class TestSearchQuery(unittest.TestCase): - """SearchQuery unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SearchQuery: - """Test SearchQuery - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SearchQuery` - """ - model = SearchQuery() - if include_optional: - return SearchQuery( - ) - else: - return SearchQuery( - ) - """ - - def testSearchQuery(self): - """Test SearchQuery""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_services.py b/test/test_services.py deleted file mode 100644 index 41b16c11..00000000 --- a/test/test_services.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.services import Services - -class TestServices(unittest.TestCase): - """Services unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Services: - """Test Services - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Services` - """ - model = Services() - if include_optional: - return Services( - ) - else: - return Services( - ) - """ - - def testServices(self): - """Test Services""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_source_schema.py b/test/test_source_schema.py deleted file mode 100644 index 651e38e9..00000000 --- a/test/test_source_schema.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.source_schema import SourceSchema - -class TestSourceSchema(unittest.TestCase): - """SourceSchema unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SourceSchema: - """Test SourceSchema - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SourceSchema` - """ - model = SourceSchema() - if include_optional: - return SourceSchema( - ) - else: - return SourceSchema( - ) - """ - - def testSourceSchema(self): - """Test SourceSchema""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_sources.py b/test/test_sources.py deleted file mode 100644 index 83b11a03..00000000 --- a/test/test_sources.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.sources import Sources - -class TestSources(unittest.TestCase): - """Sources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Sources: - """Test Sources - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Sources` - """ - model = Sources() - if include_optional: - return Sources( - ) - else: - return Sources( - ) - """ - - def testSources(self): - """Test Sources""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_states.py b/test/test_states.py deleted file mode 100644 index e30f05d0..00000000 --- a/test/test_states.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.states import States - -class TestStates(unittest.TestCase): - """States unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> States: - """Test States - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `States` - """ - model = States() - if include_optional: - return States( - ) - else: - return States( - ) - """ - - def testStates(self): - """Test States""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tenant_id.py b/test/test_tenant_id.py deleted file mode 100644 index 848457f6..00000000 --- a/test/test_tenant_id.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.tenant_id import TenantId - -class TestTenantId(unittest.TestCase): - """TenantId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TenantId: - """Test TenantId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TenantId` - """ - model = TenantId() - if include_optional: - return TenantId( - ) - else: - return TenantId( - ) - """ - - def testTenantId(self): - """Test TenantId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tenant_ids.py b/test/test_tenant_ids.py deleted file mode 100644 index e2975ce3..00000000 --- a/test/test_tenant_ids.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.tenant_ids import TenantIds - -class TestTenantIds(unittest.TestCase): - """TenantIds unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TenantIds: - """Test TenantIds - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TenantIds` - """ - model = TenantIds() - if include_optional: - return TenantIds( - ) - else: - return TenantIds( - ) - """ - - def testTenantIds(self): - """Test TenantIds""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tenant_provider.py b/test/test_tenant_provider.py index b35bf948..4f77142b 100644 --- a/test/test_tenant_provider.py +++ b/test/test_tenant_provider.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> TenantProvider: return TenantProvider( cloud_provider = '', cloud_id = '', - parent_id = None, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, diff --git a/test/test_tenant_provider_filter_data.py b/test/test_tenant_provider_filter_data.py deleted file mode 100644 index 03136944..00000000 --- a/test/test_tenant_provider_filter_data.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.tenant_provider_filter_data import TenantProviderFilterData - -class TestTenantProviderFilterData(unittest.TestCase): - """TenantProviderFilterData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TenantProviderFilterData: - """Test TenantProviderFilterData - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TenantProviderFilterData` - """ - model = TenantProviderFilterData() - if include_optional: - return TenantProviderFilterData( - ) - else: - return TenantProviderFilterData( - ) - """ - - def testTenantProviderFilterData(self): - """Test TenantProviderFilterData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tenant_provider_filters.py b/test/test_tenant_provider_filters.py index 9500ef0c..0eb2e4d3 100644 --- a/test/test_tenant_provider_filters.py +++ b/test/test_tenant_provider_filters.py @@ -39,8 +39,8 @@ def make_instance(self, include_optional) -> TenantProviderFilters: cloud_ids = None, cloud_providers = None, parent_ids = None, - is_parent_account = None, - is_verified = None, + is_parent_account = True, + is_verified = True, states = None ) else: diff --git a/test/test_tenant_states.py b/test/test_tenant_states.py deleted file mode 100644 index 73e90ca3..00000000 --- a/test/test_tenant_states.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.tenant_states import TenantStates - -class TestTenantStates(unittest.TestCase): - """TenantStates unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TenantStates: - """Test TenantStates - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TenantStates` - """ - model = TenantStates() - if include_optional: - return TenantStates( - ) - else: - return TenantStates( - ) - """ - - def testTenantStates(self): - """Test TenantStates""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tenant_user_update_fields_mixin.py b/test/test_tenant_user_update_fields_mixin.py index c9570a8a..b9448a4b 100644 --- a/test/test_tenant_user_update_fields_mixin.py +++ b/test/test_tenant_user_update_fields_mixin.py @@ -35,8 +35,8 @@ def make_instance(self, include_optional) -> TenantUserUpdateFieldsMixin: model = TenantUserUpdateFieldsMixin() if include_optional: return TenantUserUpdateFieldsMixin( - status = None, - role = None, + status = 'ACTIVE', + role = 'ADMIN', sources = None ) else: diff --git a/test/test_tenant_user_update_fields_mixin_role.py b/test/test_tenant_user_update_fields_mixin_role.py deleted file mode 100644 index 0969a3b6..00000000 --- a/test/test_tenant_user_update_fields_mixin_role.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.tenant_user_update_fields_mixin_role import TenantUserUpdateFieldsMixinRole - -class TestTenantUserUpdateFieldsMixinRole(unittest.TestCase): - """TenantUserUpdateFieldsMixinRole unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TenantUserUpdateFieldsMixinRole: - """Test TenantUserUpdateFieldsMixinRole - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TenantUserUpdateFieldsMixinRole` - """ - model = TenantUserUpdateFieldsMixinRole() - if include_optional: - return TenantUserUpdateFieldsMixinRole( - ) - else: - return TenantUserUpdateFieldsMixinRole( - ) - """ - - def testTenantUserUpdateFieldsMixinRole(self): - """Test TenantUserUpdateFieldsMixinRole""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tenant_user_update_fields_mixin_status.py b/test/test_tenant_user_update_fields_mixin_status.py deleted file mode 100644 index 97add935..00000000 --- a/test/test_tenant_user_update_fields_mixin_status.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.tenant_user_update_fields_mixin_status import TenantUserUpdateFieldsMixinStatus - -class TestTenantUserUpdateFieldsMixinStatus(unittest.TestCase): - """TenantUserUpdateFieldsMixinStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TenantUserUpdateFieldsMixinStatus: - """Test TenantUserUpdateFieldsMixinStatus - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TenantUserUpdateFieldsMixinStatus` - """ - model = TenantUserUpdateFieldsMixinStatus() - if include_optional: - return TenantUserUpdateFieldsMixinStatus( - ) - else: - return TenantUserUpdateFieldsMixinStatus( - ) - """ - - def testTenantUserUpdateFieldsMixinStatus(self): - """Test TenantUserUpdateFieldsMixinStatus""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_timezone.py b/test/test_timezone.py deleted file mode 100644 index 41a03bcb..00000000 --- a/test/test_timezone.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.timezone import Timezone - -class TestTimezone(unittest.TestCase): - """Timezone unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Timezone: - """Test Timezone - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Timezone` - """ - model = Timezone() - if include_optional: - return Timezone( - ) - else: - return Timezone( - ) - """ - - def testTimezone(self): - """Test Timezone""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_title.py b/test/test_title.py deleted file mode 100644 index 6583efaa..00000000 --- a/test/test_title.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - onelens-backend - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from onelens_backend_client.models.title import Title - -class TestTitle(unittest.TestCase): - """Title unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Title: - """Test Title - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Title` - """ - model = Title() - if include_optional: - return Title( - ) - else: - return Title( - ) - """ - - def testTitle(self): - """Test Title""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_policy_template_request.py b/test/test_update_policy_template_request.py index c53fd441..b0ce1ae7 100644 --- a/test/test_update_policy_template_request.py +++ b/test/test_update_policy_template_request.py @@ -35,11 +35,17 @@ def make_instance(self, include_optional) -> UpdatePolicyTemplateRequest: model = UpdatePolicyTemplateRequest() if include_optional: return UpdatePolicyTemplateRequest( - title = None, - description = None, + title = '', + description = '', services = None, - execution_type = None, - details = None, + execution_type = 'DETECTIVE', + details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( + inputs = null, + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '' ) else: diff --git a/test/test_update_policy_template_response.py b/test/test_update_policy_template_response.py index 66ee0b34..b0d600dc 100644 --- a/test/test_update_policy_template_response.py +++ b/test/test_update_policy_template_response.py @@ -45,11 +45,11 @@ def make_instance(self, include_optional) -> UpdatePolicyTemplateResponse: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', @@ -66,11 +66,11 @@ def make_instance(self, include_optional) -> UpdatePolicyTemplateResponse: execution_type = 'DETECTIVE', details = onelens_backend_client.models.policy_template_details.PolicyTemplateDetails( inputs = null, - config_schema = null, - output_violation_schema = null, - rule_type = null, - rule_definition = null, - default_policy_config = null, ), + config_schema = onelens_backend_client.models.config_schema.config_schema(), + output_violation_schema = onelens_backend_client.models.output_violation_schema.output_violation_schema(), + rule_type = 'SQL', + rule_definition = '', + default_policy_config = onelens_backend_client.models.default_policy_config.default_policy_config(), ), id = '', state = 'DRAFT', category = 'COST_SAVING', diff --git a/test/test_update_tenant_provider_request.py b/test/test_update_tenant_provider_request.py index 3a06e2f1..2471720f 100644 --- a/test/test_update_tenant_provider_request.py +++ b/test/test_update_tenant_provider_request.py @@ -35,8 +35,8 @@ def make_instance(self, include_optional) -> UpdateTenantProviderRequest: model = UpdateTenantProviderRequest() if include_optional: return UpdateTenantProviderRequest( - cloud_id = None, - parent_id = None, + cloud_id = '', + parent_id = '', provider_config = None ) else: diff --git a/test/test_update_tenant_provider_response.py b/test/test_update_tenant_provider_response.py index 3eab041c..334ec98e 100644 --- a/test/test_update_tenant_provider_response.py +++ b/test/test_update_tenant_provider_response.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> UpdateTenantProviderResponse: return UpdateTenantProviderResponse( cloud_provider = '', cloud_id = '', - parent_id = None, + parent_id = '', provider_config = onelens_backend_client.models.provider_config.Provider Config(), id = '', is_parent_account = True, diff --git a/test/test_update_tenant_request.py b/test/test_update_tenant_request.py index 9efb13fa..502d8909 100644 --- a/test/test_update_tenant_request.py +++ b/test/test_update_tenant_request.py @@ -35,9 +35,9 @@ def make_instance(self, include_optional) -> UpdateTenantRequest: model = UpdateTenantRequest() if include_optional: return UpdateTenantRequest( - name = None, + name = '', domains = None, - timezone = None + timezone = '' ) else: return UpdateTenantRequest( diff --git a/test/test_update_tenant_user_response.py b/test/test_update_tenant_user_response.py index 7c8b3605..3f693032 100644 --- a/test/test_update_tenant_user_response.py +++ b/test/test_update_tenant_user_response.py @@ -35,9 +35,9 @@ def make_instance(self, include_optional) -> UpdateTenantUserResponse: model = UpdateTenantUserResponse() if include_optional: return UpdateTenantUserResponse( - status = None, + status = 'ACTIVE', ol_user_id = '', - role = None, + role = 'ADMIN', sources = [ '' ],