Skip to content

Commit

Permalink
Merge pull request #7 from astuto-ai/query_execution
Browse files Browse the repository at this point in the history
Query execution
  • Loading branch information
parteek65 authored Jul 29, 2024
2 parents a1feace + 5301e43 commit e56f6ce
Show file tree
Hide file tree
Showing 27 changed files with 2,026 additions and 23 deletions.
33 changes: 12 additions & 21 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ docs/CreatePolicyTemplatePullRequest.md
docs/CreatePolicyTemplatePullResponse.md
docs/CreatePolicyTemplateRequest.md
docs/CreatePolicyTemplateResponse.md
docs/CreateRecommenadtionUnitPullResponse.md
docs/CreateRecommendationUnitPullRequest.md
docs/CreateRecommendationUnitRequest.md
docs/CreateRecommendationUnitResponse.md
docs/CreateTenantEmbedAppsLinksRequest.md
Expand Down Expand Up @@ -285,6 +287,7 @@ docs/ProviderConfigInput.md
docs/ProviderConfigOutput.md
docs/PublishCustomHierarchyRequest.md
docs/QueryDetailsDerivedVariables.md
docs/QueryExecutorRequest.md
docs/QueryFilters.md
docs/QueryOrder.md
docs/RecommendationApi.md
Expand All @@ -304,6 +307,7 @@ docs/RecommendationTicketRequest.md
docs/RecommendationTicketResponse.md
docs/RecommendationUnit.md
docs/RecommendationUnitFilters.md
docs/RecommendationUnitMigrationServiceApi.md
docs/RecommendationUnitServiceApi.md
docs/RecommendationUnitWithActionType.md
docs/RelationshipConfigItem.md
Expand Down Expand Up @@ -402,6 +406,8 @@ docs/Statuses.md
docs/StorageLensConfig.md
docs/SyncPoliciesFromRepoRequest.md
docs/SyncPoliciesFromRepoResponse.md
docs/SyncRecommendationUnitFromRepoRequest.md
docs/SyncRecommendationUnitFromRepoResponse.md
docs/Tenant.md
docs/TenantAnomaliesApi.md
docs/TenantAnomalyServiceApi.md
Expand Down Expand Up @@ -518,6 +524,7 @@ onelens_backend_client/api/recommendation_api.py
onelens_backend_client/api/recommendation_engine_api.py
onelens_backend_client/api/recommendation_engine_service_api.py
onelens_backend_client/api/recommendation_service_api.py
onelens_backend_client/api/recommendation_unit_migration_service_api.py
onelens_backend_client/api/recommendation_unit_service_api.py
onelens_backend_client/api/resource_catalog_api.py
onelens_backend_client/api/resource_catalog_service_api.py
Expand Down Expand Up @@ -592,6 +599,8 @@ onelens_backend_client/models/create_policy_template_pull_request.py
onelens_backend_client/models/create_policy_template_pull_response.py
onelens_backend_client/models/create_policy_template_request.py
onelens_backend_client/models/create_policy_template_response.py
onelens_backend_client/models/create_recommenadtion_unit_pull_response.py
onelens_backend_client/models/create_recommendation_unit_pull_request.py
onelens_backend_client/models/create_recommendation_unit_request.py
onelens_backend_client/models/create_recommendation_unit_response.py
onelens_backend_client/models/create_tenant_embed_apps_links_request.py
Expand Down Expand Up @@ -818,6 +827,7 @@ onelens_backend_client/models/provider_config_input.py
onelens_backend_client/models/provider_config_output.py
onelens_backend_client/models/publish_custom_hierarchy_request.py
onelens_backend_client/models/query_details_derived_variables.py
onelens_backend_client/models/query_executor_request.py
onelens_backend_client/models/query_filters.py
onelens_backend_client/models/query_order.py
onelens_backend_client/models/recommendation_engine.py
Expand Down Expand Up @@ -925,6 +935,8 @@ onelens_backend_client/models/statuses.py
onelens_backend_client/models/storage_lens_config.py
onelens_backend_client/models/sync_policies_from_repo_request.py
onelens_backend_client/models/sync_policies_from_repo_response.py
onelens_backend_client/models/sync_recommendation_unit_from_repo_request.py
onelens_backend_client/models/sync_recommendation_unit_from_repo_response.py
onelens_backend_client/models/tenant.py
onelens_backend_client/models/tenant_anomaly_setting_filters.py
onelens_backend_client/models/tenant_anomaly_settings.py
Expand Down Expand Up @@ -1009,25 +1021,4 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_action_type.py
test/test_action_type_filters.py
test/test_action_type_filters_services_inner.py
test/test_create_action_type_request.py
test/test_create_action_type_response.py
test/test_create_recommendation_unit_request.py
test/test_create_recommendation_unit_response.py
test/test_get_action_type_request.py
test/test_get_action_type_response.py
test/test_get_recommendation_unit_request.py
test/test_query_details_derived_variables.py
test/test_recommendation_query_details.py
test/test_recommendation_unit.py
test/test_recommendation_unit_filters.py
test/test_recommendation_unit_service_api.py
test/test_recommendation_unit_with_action_type.py
test/test_service.py
test/test_update_action_type_request.py
test/test_update_action_type_response.py
test/test_update_recommendation_unit_request.py
test/test_update_recommendation_unit_response.py
tox.ini
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ Class | Method | Description
*RecommendationEngineServiceApi* | [**create_action_type**](docs/RecommendationEngineServiceApi.md#create_action_type) | Create Action Type
*RecommendationEngineServiceApi* | [**get_action_types**](docs/RecommendationEngineServiceApi.md#get_action_types) | Get Action Types
*RecommendationEngineServiceApi* | [**get_recommendations**](docs/RecommendationEngineServiceApi.md#get_recommendations) | Get recommendations.
*RecommendationEngineServiceApi* | [**query_executor**](docs/RecommendationEngineServiceApi.md#query_executor) | Query Executor
*RecommendationEngineServiceApi* | [**update_action_type**](docs/RecommendationEngineServiceApi.md#update_action_type) | Update Action Type
*RecommendationServiceApi* | [**bulk_create**](docs/RecommendationServiceApi.md#bulk_create) | Creates bulk recommendations.
*RecommendationServiceApi* | [**get_recommendation_by_ticket_id**](docs/RecommendationServiceApi.md#get_recommendation_by_ticket_id) | Get recommendations by ticket id.
*RecommendationUnitMigrationServiceApi* | [**create_recommendation_unit_pull_request**](docs/RecommendationUnitMigrationServiceApi.md#create_recommendation_unit_pull_request) | Create a pull request for the recommendation_unit template
*RecommendationUnitMigrationServiceApi* | [**sync_recommendation_unit_from_repo**](docs/RecommendationUnitMigrationServiceApi.md#sync_recommendation_unit_from_repo) | Sync recommendation_unit from repo
*RecommendationUnitServiceApi* | [**create_recommendation_unit**](docs/RecommendationUnitServiceApi.md#create_recommendation_unit) | Create recommendation unit
*RecommendationUnitServiceApi* | [**get_recommendation_unit_by_id**](docs/RecommendationUnitServiceApi.md#get_recommendation_unit_by_id) | Retrieves Recommendation unit ID.
*RecommendationUnitServiceApi* | [**get_recommendation_units**](docs/RecommendationUnitServiceApi.md#get_recommendation_units) | Retrieves all recommendation units with filters
Expand Down Expand Up @@ -319,6 +322,8 @@ Class | Method | Description
- [CreatePolicyTemplatePullResponse](docs/CreatePolicyTemplatePullResponse.md)
- [CreatePolicyTemplateRequest](docs/CreatePolicyTemplateRequest.md)
- [CreatePolicyTemplateResponse](docs/CreatePolicyTemplateResponse.md)
- [CreateRecommenadtionUnitPullResponse](docs/CreateRecommenadtionUnitPullResponse.md)
- [CreateRecommendationUnitPullRequest](docs/CreateRecommendationUnitPullRequest.md)
- [CreateRecommendationUnitRequest](docs/CreateRecommendationUnitRequest.md)
- [CreateRecommendationUnitResponse](docs/CreateRecommendationUnitResponse.md)
- [CreateTenantEmbedAppsLinksRequest](docs/CreateTenantEmbedAppsLinksRequest.md)
Expand Down Expand Up @@ -545,6 +550,7 @@ Class | Method | Description
- [ProviderConfigOutput](docs/ProviderConfigOutput.md)
- [PublishCustomHierarchyRequest](docs/PublishCustomHierarchyRequest.md)
- [QueryDetailsDerivedVariables](docs/QueryDetailsDerivedVariables.md)
- [QueryExecutorRequest](docs/QueryExecutorRequest.md)
- [QueryFilters](docs/QueryFilters.md)
- [QueryOrder](docs/QueryOrder.md)
- [RecommendationEngine](docs/RecommendationEngine.md)
Expand Down Expand Up @@ -652,6 +658,8 @@ Class | Method | Description
- [StorageLensConfig](docs/StorageLensConfig.md)
- [SyncPoliciesFromRepoRequest](docs/SyncPoliciesFromRepoRequest.md)
- [SyncPoliciesFromRepoResponse](docs/SyncPoliciesFromRepoResponse.md)
- [SyncRecommendationUnitFromRepoRequest](docs/SyncRecommendationUnitFromRepoRequest.md)
- [SyncRecommendationUnitFromRepoResponse](docs/SyncRecommendationUnitFromRepoResponse.md)
- [Tenant](docs/Tenant.md)
- [TenantAnomalySettingFilters](docs/TenantAnomalySettingFilters.md)
- [TenantAnomalySettings](docs/TenantAnomalySettings.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/Auth0UserAllFields.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Name | Type | Description | Notes
**last_ip** | **str** | | [optional]
**last_login** | **datetime** | | [optional]
**logins_count** | **int** | | [optional]
**given_name** | **str** | | [optional]
**family_name** | **str** | | [optional]

## Example

Expand Down
29 changes: 29 additions & 0 deletions docs/CreateRecommenadtionUnitPullResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# CreateRecommenadtionUnitPullResponse


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pr_link** | **str** | The recommendation unit pull request link. |

## Example

```python
from onelens_backend_client.models.create_recommenadtion_unit_pull_response import CreateRecommenadtionUnitPullResponse

# TODO update the JSON string below
json = "{}"
# create an instance of CreateRecommenadtionUnitPullResponse from a JSON string
create_recommenadtion_unit_pull_response_instance = CreateRecommenadtionUnitPullResponse.from_json(json)
# print the JSON string representation of the object
print(CreateRecommenadtionUnitPullResponse.to_json())

# convert the object into a dict
create_recommenadtion_unit_pull_response_dict = create_recommenadtion_unit_pull_response_instance.to_dict()
# create an instance of CreateRecommenadtionUnitPullResponse from a dict
create_recommenadtion_unit_pull_response_form_dict = create_recommenadtion_unit_pull_response.from_dict(create_recommenadtion_unit_pull_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)


33 changes: 33 additions & 0 deletions docs/CreateRecommendationUnitPullRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# CreateRecommendationUnitPullRequest


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | **str** | The title of the pull request. |
**description** | **str** | The description of the pull request. |
**source_branch** | **str** | The source branch of the pull request. |
**branch_name** | **str** | The branch name of the pull request. |
**id** | **str** | The unique identifier of the recommendation unit template by alias. |

## Example

```python
from onelens_backend_client.models.create_recommendation_unit_pull_request import CreateRecommendationUnitPullRequest

# TODO update the JSON string below
json = "{}"
# create an instance of CreateRecommendationUnitPullRequest from a JSON string
create_recommendation_unit_pull_request_instance = CreateRecommendationUnitPullRequest.from_json(json)
# print the JSON string representation of the object
print(CreateRecommendationUnitPullRequest.to_json())

# convert the object into a dict
create_recommendation_unit_pull_request_dict = create_recommendation_unit_pull_request_instance.to_dict()
# create an instance of CreateRecommendationUnitPullRequest from a dict
create_recommendation_unit_pull_request_form_dict = create_recommendation_unit_pull_request.from_dict(create_recommendation_unit_pull_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)


30 changes: 30 additions & 0 deletions docs/QueryExecutorRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# QueryExecutorRequest


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**query** | **str** | sql query |
**recommendation_unit_id** | **str** | Recommendation Unit ID |

## Example

```python
from onelens_backend_client.models.query_executor_request import QueryExecutorRequest

# TODO update the JSON string below
json = "{}"
# create an instance of QueryExecutorRequest from a JSON string
query_executor_request_instance = QueryExecutorRequest.from_json(json)
# print the JSON string representation of the object
print(QueryExecutorRequest.to_json())

# convert the object into a dict
query_executor_request_dict = query_executor_request_instance.to_dict()
# create an instance of QueryExecutorRequest from a dict
query_executor_request_form_dict = query_executor_request.from_dict(query_executor_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)


68 changes: 68 additions & 0 deletions docs/RecommendationEngineServiceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Method | Description
[**create_action_type**](RecommendationEngineServiceApi.md#create_action_type) | Create Action Type
[**get_action_types**](RecommendationEngineServiceApi.md#get_action_types) | Get Action Types
[**get_recommendations**](RecommendationEngineServiceApi.md#get_recommendations) | Get recommendations.
[**query_executor**](RecommendationEngineServiceApi.md#query_executor) | Query Executor
[**update_action_type**](RecommendationEngineServiceApi.md#update_action_type) | Update Action Type


Expand Down Expand Up @@ -214,6 +215,73 @@ No authorization required

[[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)

# **query_executor**
> object query_executor(query_executor_request)
Query Executor

### Example


```python
import onelens_backend_client
from onelens_backend_client.models.query_executor_request import QueryExecutorRequest
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.RecommendationEngineServiceApi(api_client)
query_executor_request = onelens_backend_client.QueryExecutorRequest() # QueryExecutorRequest |

try:
# Query Executor
api_response = api_instance.query_executor(query_executor_request)
print("The response of RecommendationEngineServiceApi->query_executor:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RecommendationEngineServiceApi->query_executor: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query_executor_request** | [**QueryExecutorRequest**](QueryExecutorRequest.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)

# **update_action_type**
> UpdateActionTypeResponse update_action_type(update_action_type_request)
Expand Down
Loading

0 comments on commit e56f6ce

Please sign in to comment.