diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 723a67e2..7d5d1c3b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -137,7 +137,9 @@ docs/RecommendationTicketAPIRequest.md docs/RecommendationTicketRequest.md docs/RecommendationTicketResponse.md docs/RecommendationsApi.md -docs/ResourceHierarchyMapping.md +docs/ResourceHierarchyMappingRequest.md +docs/ResourceHierarchyMappingResponse.md +docs/ResourceMappingServiceApi.md docs/ResponseActivatePolicyTemplateResponse.md docs/ResponseAddTenantPolicyExclusionsResponse.md docs/ResponseCreateDefaultHierarchyResponse.md @@ -165,10 +167,10 @@ docs/ResponseGetTenantProvidersResponse.md docs/ResponseGetTenantTicketsResponse.md docs/ResponseGetTenantsResponse.md docs/ResponseListRecommendationTicketResponse.md -docs/ResponseListResourceHierarchyMapping.md docs/ResponseNoneType.md docs/ResponseOverrideTenantAnomalyConfigResponse.md docs/ResponseOverrideTenantPolicyExclusionsResponse.md +docs/ResponseResourceHierarchyMappingResponse.md docs/ResponseSetTenantProviderStatusResponse.md docs/ResponseSetTenantStatusResponse.md docs/ResponseTenantVerifyCurBucketResponse.md @@ -262,6 +264,7 @@ onelens_backend_client/api/policy_template_pack_service_api.py onelens_backend_client/api/policy_template_service_api.py onelens_backend_client/api/recommendation_service_api.py onelens_backend_client/api/recommendations_api.py +onelens_backend_client/api/resource_mapping_service_api.py onelens_backend_client/api/tenant_anomalies_api.py onelens_backend_client/api/tenant_anomaly_service_api.py onelens_backend_client/api/tenant_hierarchy_api.py @@ -406,7 +409,8 @@ onelens_backend_client/models/query_order.py onelens_backend_client/models/recommendation_ticket_api_request.py onelens_backend_client/models/recommendation_ticket_request.py onelens_backend_client/models/recommendation_ticket_response.py -onelens_backend_client/models/resource_hierarchy_mapping.py +onelens_backend_client/models/resource_hierarchy_mapping_request.py +onelens_backend_client/models/resource_hierarchy_mapping_response.py onelens_backend_client/models/response_activate_policy_template_response.py onelens_backend_client/models/response_add_tenant_policy_exclusions_response.py onelens_backend_client/models/response_create_default_hierarchy_response.py @@ -434,10 +438,10 @@ onelens_backend_client/models/response_get_tenant_providers_response.py onelens_backend_client/models/response_get_tenant_tickets_response.py onelens_backend_client/models/response_get_tenants_response.py onelens_backend_client/models/response_list_recommendation_ticket_response.py -onelens_backend_client/models/response_list_resource_hierarchy_mapping.py onelens_backend_client/models/response_none_type.py onelens_backend_client/models/response_override_tenant_anomaly_config_response.py onelens_backend_client/models/response_override_tenant_policy_exclusions_response.py +onelens_backend_client/models/response_resource_hierarchy_mapping_response.py onelens_backend_client/models/response_set_tenant_provider_status_response.py onelens_backend_client/models/response_set_tenant_status_response.py onelens_backend_client/models/response_tenant_verify_cur_bucket_response.py @@ -509,62 +513,7 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_cost_saving.py -test/test_create_default_hierarchy_request.py -test/test_create_hierarchy_root_node_api_request.py -test/test_create_hierarchy_root_node_request.py -test/test_create_hierarchy_root_node_response.py -test/test_create_tenant_tickets_request.py -test/test_data_retriever_api.py -test/test_data_retriever_query.py -test/test_data_retriever_request.py -test/test_data_retriever_response.py -test/test_get_leaf_nodes_request.py -test/test_get_leaf_nodes_response.py -test/test_get_tenant_tickets_request.py -test/test_get_tenant_tickets_response.py -test/test_hierarchy_node_attribution_details.py -test/test_hierarchy_node_entity_dto.py -test/test_hierarchy_node_resource_filters.py -test/test_hierarchy_node_service_api.py -test/test_hierarchy_node_state.py -test/test_key.py -test/test_onelens_models_service_interfaces_tenant_metadata_commons_hierarchy_node_category1.py -test/test_policy_recommendations_api.py -test/test_query_filters.py -test/test_query_order.py -test/test_recommendation_service_api.py -test/test_recommendation_ticket_api_request.py -test/test_recommendation_ticket_request.py -test/test_recommendation_ticket_response.py -test/test_recommendations_api.py -test/test_resource_hierarchy_mapping.py -test/test_response_create_default_hierarchy_response.py -test/test_response_create_hierarchy_root_node_response.py -test/test_response_data_retriever_response.py -test/test_response_get_tenant_tickets_response.py -test/test_response_list_recommendation_ticket_response.py -test/test_response_list_resource_hierarchy_mapping.py -test/test_response_none_type.py -test/test_response_update_tenant_tickets_response.py -test/test_tenant_hierarchy_api.py -test/test_tenant_ticket.py -test/test_tenant_ticket_creation_api_request.py -test/test_tenant_ticket_creation_request.py -test/test_tenant_ticket_service_api.py -test/test_tenant_ticket_update_user_state_api_request.py -test/test_tenant_ticket_updation_api_request.py -test/test_tenant_ticket_updation_request.py -test/test_tenant_tickets_api_request.py -test/test_tenants_resource_catalog_api.py -test/test_tenants_tenant_tickets_api.py -test/test_ticket_category.py -test/test_ticket_details.py -test/test_ticket_system_state.py -test/test_ticket_user_state.py -test/test_time_dimension.py -test/test_time_dimension_compare_date_range_inner.py -test/test_update_tenant_ticket_user_state_request.py -test/test_update_tenant_tickets_request.py -test/test_value.py +test/test_resource_hierarchy_mapping_request.py +test/test_resource_hierarchy_mapping_response.py +test/test_response_resource_hierarchy_mapping_response.py tox.ini diff --git a/README.md b/README.md index 3979a604..94f36d21 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ Class | Method | Description *PolicyTemplateServiceApi* | [**update_policy_template**](docs/PolicyTemplateServiceApi.md#update_policy_template) | Updates an existing policy template. *RecommendationServiceApi* | [**bulk_create**](docs/RecommendationServiceApi.md#bulk_create) | Creates bulk recommendations. *RecommendationsApi* | [**create_root_node**](docs/RecommendationsApi.md#create_root_node) | Create Root Node +*ResourceMappingServiceApi* | [**create**](docs/ResourceMappingServiceApi.md#create) | create a resource hierarchy mapping *TenantAnomaliesApi* | [**disable_tenant_anomaly_setting**](docs/TenantAnomaliesApi.md#disable_tenant_anomaly_setting) | Disable Tenant Anomaly Setting *TenantAnomaliesApi* | [**enable_tenant_anomaly_setting**](docs/TenantAnomaliesApi.md#enable_tenant_anomaly_setting) | Enable Tenant Anomaly Setting *TenantAnomaliesApi* | [**get_tenant_anomaly_settings**](docs/TenantAnomaliesApi.md#get_tenant_anomaly_settings) | Get Tenant Anomaly Settings @@ -312,7 +313,8 @@ Class | Method | Description - [RecommendationTicketAPIRequest](docs/RecommendationTicketAPIRequest.md) - [RecommendationTicketRequest](docs/RecommendationTicketRequest.md) - [RecommendationTicketResponse](docs/RecommendationTicketResponse.md) - - [ResourceHierarchyMapping](docs/ResourceHierarchyMapping.md) + - [ResourceHierarchyMappingRequest](docs/ResourceHierarchyMappingRequest.md) + - [ResourceHierarchyMappingResponse](docs/ResourceHierarchyMappingResponse.md) - [ResponseActivatePolicyTemplateResponse](docs/ResponseActivatePolicyTemplateResponse.md) - [ResponseAddTenantPolicyExclusionsResponse](docs/ResponseAddTenantPolicyExclusionsResponse.md) - [ResponseCreateDefaultHierarchyResponse](docs/ResponseCreateDefaultHierarchyResponse.md) @@ -340,10 +342,10 @@ Class | Method | Description - [ResponseGetTenantTicketsResponse](docs/ResponseGetTenantTicketsResponse.md) - [ResponseGetTenantsResponse](docs/ResponseGetTenantsResponse.md) - [ResponseListRecommendationTicketResponse](docs/ResponseListRecommendationTicketResponse.md) - - [ResponseListResourceHierarchyMapping](docs/ResponseListResourceHierarchyMapping.md) - [ResponseNoneType](docs/ResponseNoneType.md) - [ResponseOverrideTenantAnomalyConfigResponse](docs/ResponseOverrideTenantAnomalyConfigResponse.md) - [ResponseOverrideTenantPolicyExclusionsResponse](docs/ResponseOverrideTenantPolicyExclusionsResponse.md) + - [ResponseResourceHierarchyMappingResponse](docs/ResponseResourceHierarchyMappingResponse.md) - [ResponseSetTenantProviderStatusResponse](docs/ResponseSetTenantProviderStatusResponse.md) - [ResponseSetTenantStatusResponse](docs/ResponseSetTenantStatusResponse.md) - [ResponseTenantVerifyCurBucketResponse](docs/ResponseTenantVerifyCurBucketResponse.md) diff --git a/docs/ResourceHierarchyMappingRequest.md b/docs/ResourceHierarchyMappingRequest.md new file mode 100644 index 00000000..16cb8992 --- /dev/null +++ b/docs/ResourceHierarchyMappingRequest.md @@ -0,0 +1,30 @@ +# ResourceHierarchyMappingRequest + +dto for resource hierarchy mapping request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | Tenant ID | + +## Example + +```python +from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceHierarchyMappingRequest from a JSON string +resource_hierarchy_mapping_request_instance = ResourceHierarchyMappingRequest.from_json(json) +# print the JSON string representation of the object +print(ResourceHierarchyMappingRequest.to_json()) + +# convert the object into a dict +resource_hierarchy_mapping_request_dict = resource_hierarchy_mapping_request_instance.to_dict() +# create an instance of ResourceHierarchyMappingRequest from a dict +resource_hierarchy_mapping_request_form_dict = resource_hierarchy_mapping_request.from_dict(resource_hierarchy_mapping_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceHierarchyMappingResponse.md b/docs/ResourceHierarchyMappingResponse.md new file mode 100644 index 00000000..064b0843 --- /dev/null +++ b/docs/ResourceHierarchyMappingResponse.md @@ -0,0 +1,31 @@ +# ResourceHierarchyMappingResponse + +dto for resource hierarchy mapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hierarchy_node_id** | **str** | List of hierarchy node ids for the resource mapping | +**resource_id** | **str** | List of resource ids for the resource mapping | + +## Example + +```python +from onelens_backend_client.models.resource_hierarchy_mapping_response import ResourceHierarchyMappingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ResourceHierarchyMappingResponse from a JSON string +resource_hierarchy_mapping_response_instance = ResourceHierarchyMappingResponse.from_json(json) +# print the JSON string representation of the object +print(ResourceHierarchyMappingResponse.to_json()) + +# convert the object into a dict +resource_hierarchy_mapping_response_dict = resource_hierarchy_mapping_response_instance.to_dict() +# create an instance of ResourceHierarchyMappingResponse from a dict +resource_hierarchy_mapping_response_form_dict = resource_hierarchy_mapping_response.from_dict(resource_hierarchy_mapping_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceMappingServiceApi.md b/docs/ResourceMappingServiceApi.md new file mode 100644 index 00000000..39f184fe --- /dev/null +++ b/docs/ResourceMappingServiceApi.md @@ -0,0 +1,76 @@ +# ResourceMappingServiceApi + +All URIs are relative to *http://localhost* + +Method | Description +------------- | ------------- +[**create**](ResourceMappingServiceApi.md#create) | create a resource hierarchy mapping + + +# **create** +> object create(resource_hierarchy_mapping_request) + +create a resource hierarchy mapping + +### Example + + +```python +import onelens_backend_client +from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest +from onelens_backend_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = onelens_backend_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with onelens_backend_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = onelens_backend_client.ResourceMappingServiceApi(api_client) + resource_hierarchy_mapping_request = onelens_backend_client.ResourceHierarchyMappingRequest() # ResourceHierarchyMappingRequest | + + try: + # create a resource hierarchy mapping + api_response = api_instance.create(resource_hierarchy_mapping_request) + print("The response of ResourceMappingServiceApi->create:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ResourceMappingServiceApi->create: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resource_hierarchy_mapping_request** | [**ResourceHierarchyMappingRequest**](ResourceHierarchyMappingRequest.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ResponseResourceHierarchyMappingResponse.md b/docs/ResponseResourceHierarchyMappingResponse.md new file mode 100644 index 00000000..e42f933d --- /dev/null +++ b/docs/ResponseResourceHierarchyMappingResponse.md @@ -0,0 +1,30 @@ +# ResponseResourceHierarchyMappingResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ResourceHierarchyMappingResponse**](ResourceHierarchyMappingResponse.md) | | +**message** | **str** | | [optional] + +## Example + +```python +from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ResponseResourceHierarchyMappingResponse from a JSON string +response_resource_hierarchy_mapping_response_instance = ResponseResourceHierarchyMappingResponse.from_json(json) +# print the JSON string representation of the object +print(ResponseResourceHierarchyMappingResponse.to_json()) + +# convert the object into a dict +response_resource_hierarchy_mapping_response_dict = response_resource_hierarchy_mapping_response_instance.to_dict() +# create an instance of ResponseResourceHierarchyMappingResponse from a dict +response_resource_hierarchy_mapping_response_form_dict = response_resource_hierarchy_mapping_response.from_dict(response_resource_hierarchy_mapping_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TenantsResourceCatalogApi.md b/docs/TenantsResourceCatalogApi.md index de47deda..1554f282 100644 --- a/docs/TenantsResourceCatalogApi.md +++ b/docs/TenantsResourceCatalogApi.md @@ -8,7 +8,7 @@ Method | Description # **create_root_node** -> ResponseListResourceHierarchyMapping create_root_node(tenant_id) +> ResponseResourceHierarchyMappingResponse create_root_node(tenant_id) Create Root Node @@ -19,7 +19,7 @@ An API endpoint to create resource and hierarchy mapping ```python import onelens_backend_client -from onelens_backend_client.models.response_list_resource_hierarchy_mapping import ResponseListResourceHierarchyMapping +from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse from onelens_backend_client.rest import ApiException from pprint import pprint @@ -56,7 +56,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseListResourceHierarchyMapping**](ResponseListResourceHierarchyMapping.md) +[**ResponseResourceHierarchyMappingResponse**](ResponseResourceHierarchyMappingResponse.md) ### Authorization diff --git a/onelens_backend_client/__init__.py b/onelens_backend_client/__init__.py index d23e3739..61631ae9 100644 --- a/onelens_backend_client/__init__.py +++ b/onelens_backend_client/__init__.py @@ -28,6 +28,7 @@ from onelens_backend_client.api.policy_template_service_api import PolicyTemplateServiceApi from onelens_backend_client.api.recommendation_service_api import RecommendationServiceApi from onelens_backend_client.api.recommendations_api import RecommendationsApi +from onelens_backend_client.api.resource_mapping_service_api import ResourceMappingServiceApi from onelens_backend_client.api.tenant_anomalies_api import TenantAnomaliesApi from onelens_backend_client.api.tenant_anomaly_service_api import TenantAnomalyServiceApi from onelens_backend_client.api.tenant_hierarchy_api import TenantHierarchyApi @@ -180,7 +181,8 @@ from onelens_backend_client.models.recommendation_ticket_api_request import RecommendationTicketAPIRequest from onelens_backend_client.models.recommendation_ticket_request import RecommendationTicketRequest from onelens_backend_client.models.recommendation_ticket_response import RecommendationTicketResponse -from onelens_backend_client.models.resource_hierarchy_mapping import ResourceHierarchyMapping +from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest +from onelens_backend_client.models.resource_hierarchy_mapping_response import ResourceHierarchyMappingResponse from onelens_backend_client.models.response_activate_policy_template_response import ResponseActivatePolicyTemplateResponse from onelens_backend_client.models.response_add_tenant_policy_exclusions_response import ResponseAddTenantPolicyExclusionsResponse from onelens_backend_client.models.response_create_default_hierarchy_response import ResponseCreateDefaultHierarchyResponse @@ -208,10 +210,10 @@ from onelens_backend_client.models.response_get_tenant_tickets_response import ResponseGetTenantTicketsResponse from onelens_backend_client.models.response_get_tenants_response import ResponseGetTenantsResponse from onelens_backend_client.models.response_list_recommendation_ticket_response import ResponseListRecommendationTicketResponse -from onelens_backend_client.models.response_list_resource_hierarchy_mapping import ResponseListResourceHierarchyMapping from onelens_backend_client.models.response_none_type import ResponseNoneType from onelens_backend_client.models.response_override_tenant_anomaly_config_response import ResponseOverrideTenantAnomalyConfigResponse from onelens_backend_client.models.response_override_tenant_policy_exclusions_response import ResponseOverrideTenantPolicyExclusionsResponse +from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse from onelens_backend_client.models.response_set_tenant_provider_status_response import ResponseSetTenantProviderStatusResponse from onelens_backend_client.models.response_set_tenant_status_response import ResponseSetTenantStatusResponse from onelens_backend_client.models.response_tenant_verify_cur_bucket_response import ResponseTenantVerifyCurBucketResponse diff --git a/onelens_backend_client/api/__init__.py b/onelens_backend_client/api/__init__.py index 5c57d8b5..6d0d1f20 100644 --- a/onelens_backend_client/api/__init__.py +++ b/onelens_backend_client/api/__init__.py @@ -12,6 +12,7 @@ from onelens_backend_client.api.policy_template_service_api import PolicyTemplateServiceApi from onelens_backend_client.api.recommendation_service_api import RecommendationServiceApi from onelens_backend_client.api.recommendations_api import RecommendationsApi +from onelens_backend_client.api.resource_mapping_service_api import ResourceMappingServiceApi from onelens_backend_client.api.tenant_anomalies_api import TenantAnomaliesApi from onelens_backend_client.api.tenant_anomaly_service_api import TenantAnomalyServiceApi from onelens_backend_client.api.tenant_hierarchy_api import TenantHierarchyApi diff --git a/onelens_backend_client/api/resource_mapping_service_api.py b/onelens_backend_client/api/resource_mapping_service_api.py new file mode 100644 index 00000000..aa3e57a7 --- /dev/null +++ b/onelens_backend_client/api/resource_mapping_service_api.py @@ -0,0 +1,307 @@ +# 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 warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any +from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest + +from onelens_backend_client.api_client import ApiClient, RequestSerialized +from onelens_backend_client.api_response import ApiResponse +from onelens_backend_client.rest import RESTResponseType + + +class ResourceMappingServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create( + self, + resource_hierarchy_mapping_request: ResourceHierarchyMappingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """create a resource hierarchy mapping + + + :param resource_hierarchy_mapping_request: (required) + :type resource_hierarchy_mapping_request: ResourceHierarchyMappingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + resource_hierarchy_mapping_request=resource_hierarchy_mapping_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_with_http_info( + self, + resource_hierarchy_mapping_request: ResourceHierarchyMappingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """create a resource hierarchy mapping + + + :param resource_hierarchy_mapping_request: (required) + :type resource_hierarchy_mapping_request: ResourceHierarchyMappingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + resource_hierarchy_mapping_request=resource_hierarchy_mapping_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_without_preload_content( + self, + resource_hierarchy_mapping_request: ResourceHierarchyMappingRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create a resource hierarchy mapping + + + :param resource_hierarchy_mapping_request: (required) + :type resource_hierarchy_mapping_request: ResourceHierarchyMappingRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_serialize( + resource_hierarchy_mapping_request=resource_hierarchy_mapping_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "HTTPValidationError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_serialize( + self, + resource_hierarchy_mapping_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if resource_hierarchy_mapping_request is not None: + _body_params = resource_hierarchy_mapping_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/rpc/resource_mapping_service/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/onelens_backend_client/api/tenants_resource_catalog_api.py b/onelens_backend_client/api/tenants_resource_catalog_api.py index 8534cc88..17fe4ccb 100644 --- a/onelens_backend_client/api/tenants_resource_catalog_api.py +++ b/onelens_backend_client/api/tenants_resource_catalog_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictStr -from onelens_backend_client.models.response_list_resource_hierarchy_mapping import ResponseListResourceHierarchyMapping +from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse from onelens_backend_client.api_client import ApiClient, RequestSerialized from onelens_backend_client.api_response import ApiResponse @@ -53,7 +53,7 @@ def create_root_node( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResponseListResourceHierarchyMapping: + ) -> ResponseResourceHierarchyMappingResponse: """Create Root Node An API endpoint to create resource and hierarchy mapping @@ -91,7 +91,7 @@ def create_root_node( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseListResourceHierarchyMapping", + '200': "ResponseResourceHierarchyMappingResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -121,7 +121,7 @@ def create_root_node_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResponseListResourceHierarchyMapping]: + ) -> ApiResponse[ResponseResourceHierarchyMappingResponse]: """Create Root Node An API endpoint to create resource and hierarchy mapping @@ -159,7 +159,7 @@ def create_root_node_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseListResourceHierarchyMapping", + '200': "ResponseResourceHierarchyMappingResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( @@ -227,7 +227,7 @@ def create_root_node_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseListResourceHierarchyMapping", + '200': "ResponseResourceHierarchyMappingResponse", '422': "HTTPValidationError", } response_data = self.api_client.call_api( diff --git a/onelens_backend_client/models/__init__.py b/onelens_backend_client/models/__init__.py index 920296c3..430799a8 100644 --- a/onelens_backend_client/models/__init__.py +++ b/onelens_backend_client/models/__init__.py @@ -137,7 +137,8 @@ from onelens_backend_client.models.recommendation_ticket_api_request import RecommendationTicketAPIRequest from onelens_backend_client.models.recommendation_ticket_request import RecommendationTicketRequest from onelens_backend_client.models.recommendation_ticket_response import RecommendationTicketResponse -from onelens_backend_client.models.resource_hierarchy_mapping import ResourceHierarchyMapping +from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest +from onelens_backend_client.models.resource_hierarchy_mapping_response import ResourceHierarchyMappingResponse from onelens_backend_client.models.response_activate_policy_template_response import ResponseActivatePolicyTemplateResponse from onelens_backend_client.models.response_add_tenant_policy_exclusions_response import ResponseAddTenantPolicyExclusionsResponse from onelens_backend_client.models.response_create_default_hierarchy_response import ResponseCreateDefaultHierarchyResponse @@ -165,10 +166,10 @@ from onelens_backend_client.models.response_get_tenant_tickets_response import ResponseGetTenantTicketsResponse from onelens_backend_client.models.response_get_tenants_response import ResponseGetTenantsResponse from onelens_backend_client.models.response_list_recommendation_ticket_response import ResponseListRecommendationTicketResponse -from onelens_backend_client.models.response_list_resource_hierarchy_mapping import ResponseListResourceHierarchyMapping from onelens_backend_client.models.response_none_type import ResponseNoneType from onelens_backend_client.models.response_override_tenant_anomaly_config_response import ResponseOverrideTenantAnomalyConfigResponse from onelens_backend_client.models.response_override_tenant_policy_exclusions_response import ResponseOverrideTenantPolicyExclusionsResponse +from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse from onelens_backend_client.models.response_set_tenant_provider_status_response import ResponseSetTenantProviderStatusResponse from onelens_backend_client.models.response_set_tenant_status_response import ResponseSetTenantStatusResponse from onelens_backend_client.models.response_tenant_verify_cur_bucket_response import ResponseTenantVerifyCurBucketResponse diff --git a/onelens_backend_client/models/resource_hierarchy_mapping_request.py b/onelens_backend_client/models/resource_hierarchy_mapping_request.py new file mode 100644 index 00000000..a05f5b56 --- /dev/null +++ b/onelens_backend_client/models/resource_hierarchy_mapping_request.py @@ -0,0 +1,87 @@ +# 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 +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceHierarchyMappingRequest(BaseModel): + """ + dto for resource hierarchy mapping request + """ # noqa: E501 + tenant_id: StrictStr = Field(description="Tenant ID") + __properties: ClassVar[List[str]] = ["tenant_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceHierarchyMappingRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceHierarchyMappingRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenant_id": obj.get("tenant_id") + }) + return _obj + + diff --git a/onelens_backend_client/models/resource_hierarchy_mapping_response.py b/onelens_backend_client/models/resource_hierarchy_mapping_response.py new file mode 100644 index 00000000..a9c0c586 --- /dev/null +++ b/onelens_backend_client/models/resource_hierarchy_mapping_response.py @@ -0,0 +1,89 @@ +# 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 +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResourceHierarchyMappingResponse(BaseModel): + """ + dto for resource hierarchy mapping + """ # noqa: E501 + hierarchy_node_id: StrictStr = Field(description="List of hierarchy node ids for the resource mapping") + resource_id: StrictStr = Field(description="List of resource ids for the resource mapping") + __properties: ClassVar[List[str]] = ["hierarchy_node_id", "resource_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResourceHierarchyMappingResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResourceHierarchyMappingResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hierarchy_node_id": obj.get("hierarchy_node_id"), + "resource_id": obj.get("resource_id") + }) + return _obj + + diff --git a/onelens_backend_client/models/response_resource_hierarchy_mapping_response.py b/onelens_backend_client/models/response_resource_hierarchy_mapping_response.py new file mode 100644 index 00000000..d422b7ff --- /dev/null +++ b/onelens_backend_client/models/response_resource_hierarchy_mapping_response.py @@ -0,0 +1,98 @@ +# 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 +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from onelens_backend_client.models.resource_hierarchy_mapping_response import ResourceHierarchyMappingResponse +from typing import Optional, Set +from typing_extensions import Self + +class ResponseResourceHierarchyMappingResponse(BaseModel): + """ + ResponseResourceHierarchyMappingResponse + """ # noqa: E501 + data: ResourceHierarchyMappingResponse + message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["data", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ResponseResourceHierarchyMappingResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.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 + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ResponseResourceHierarchyMappingResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": ResourceHierarchyMappingResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, + "message": obj.get("message") + }) + return _obj + + diff --git a/test/test_resource_hierarchy_mapping_request.py b/test/test_resource_hierarchy_mapping_request.py new file mode 100644 index 00000000..6099ac08 --- /dev/null +++ b/test/test_resource_hierarchy_mapping_request.py @@ -0,0 +1,52 @@ +# 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.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest + +class TestResourceHierarchyMappingRequest(unittest.TestCase): + """ResourceHierarchyMappingRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceHierarchyMappingRequest: + """Test ResourceHierarchyMappingRequest + 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 `ResourceHierarchyMappingRequest` + """ + model = ResourceHierarchyMappingRequest() + if include_optional: + return ResourceHierarchyMappingRequest( + tenant_id = '' + ) + else: + return ResourceHierarchyMappingRequest( + tenant_id = '', + ) + """ + + def testResourceHierarchyMappingRequest(self): + """Test ResourceHierarchyMappingRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_hierarchy_mapping_response.py b/test/test_resource_hierarchy_mapping_response.py new file mode 100644 index 00000000..459b48af --- /dev/null +++ b/test/test_resource_hierarchy_mapping_response.py @@ -0,0 +1,54 @@ +# 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.resource_hierarchy_mapping_response import ResourceHierarchyMappingResponse + +class TestResourceHierarchyMappingResponse(unittest.TestCase): + """ResourceHierarchyMappingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResourceHierarchyMappingResponse: + """Test ResourceHierarchyMappingResponse + 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 `ResourceHierarchyMappingResponse` + """ + model = ResourceHierarchyMappingResponse() + if include_optional: + return ResourceHierarchyMappingResponse( + hierarchy_node_id = '', + resource_id = '' + ) + else: + return ResourceHierarchyMappingResponse( + hierarchy_node_id = '', + resource_id = '', + ) + """ + + def testResourceHierarchyMappingResponse(self): + """Test ResourceHierarchyMappingResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_resource_mapping_service_api.py b/test/test_resource_mapping_service_api.py new file mode 100644 index 00000000..fc097c7f --- /dev/null +++ b/test/test_resource_mapping_service_api.py @@ -0,0 +1,38 @@ +# 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.api.resource_mapping_service_api import ResourceMappingServiceApi + + +class TestResourceMappingServiceApi(unittest.TestCase): + """ResourceMappingServiceApi unit test stubs""" + + def setUp(self) -> None: + self.api = ResourceMappingServiceApi() + + def tearDown(self) -> None: + pass + + def test_create(self) -> None: + """Test case for create + + create a resource hierarchy mapping + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_response_resource_hierarchy_mapping_response.py b/test/test_response_resource_hierarchy_mapping_response.py new file mode 100644 index 00000000..2afd3147 --- /dev/null +++ b/test/test_response_resource_hierarchy_mapping_response.py @@ -0,0 +1,57 @@ +# 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.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse + +class TestResponseResourceHierarchyMappingResponse(unittest.TestCase): + """ResponseResourceHierarchyMappingResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ResponseResourceHierarchyMappingResponse: + """Test ResponseResourceHierarchyMappingResponse + 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 `ResponseResourceHierarchyMappingResponse` + """ + model = ResponseResourceHierarchyMappingResponse() + if include_optional: + return ResponseResourceHierarchyMappingResponse( + data = onelens_backend_client.models.resource_hierarchy_mapping_response.ResourceHierarchyMappingResponse( + hierarchy_node_id = '', + resource_id = '', ), + message = '' + ) + else: + return ResponseResourceHierarchyMappingResponse( + data = onelens_backend_client.models.resource_hierarchy_mapping_response.ResourceHierarchyMappingResponse( + hierarchy_node_id = '', + resource_id = '', ), + ) + """ + + def testResponseResourceHierarchyMappingResponse(self): + """Test ResponseResourceHierarchyMappingResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()