Skip to content

Commit

Permalink
updating operation ids one more time
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Jun 3, 2024
1 parent cc5ac38 commit 2a7bcb4
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 969 deletions.
8 changes: 4 additions & 4 deletions generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ rule_request = RuleRequest(
) # RuleRequest |

try:
api_response = api_instance.create_detector_rule(detector_id, rule_request)
api_response = api_instance.create_rule(detector_id, rule_request)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling ActionsApi->create_detector_rule: %s\n" % e)
print("Exception when calling ActionsApi->create_rule: %s\n" % e)
```

## Documentation for API Endpoints
Expand All @@ -109,11 +109,11 @@ All URIs are relative to *https://api.groundlight.ai/device-api*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ActionsApi* | [**create_detector_rule**](docs/ActionsApi.md#create_detector_rule) | **POST** /v1/actions/detector/{detector_id}/rules |
*ActionsApi* | [**create_rule**](docs/ActionsApi.md#create_rule) | **POST** /v1/actions/detector/{detector_id}/rules |
*ActionsApi* | [**delete_rule**](docs/ActionsApi.md#delete_rule) | **DELETE** /v1/actions/rules/{id} |
*ActionsApi* | [**get_rule**](docs/ActionsApi.md#get_rule) | **GET** /v1/actions/rules/{id} |
*ActionsApi* | [**list_all_rules**](docs/ActionsApi.md#list_all_rules) | **GET** /v1/actions/rules |
*ActionsApi* | [**list_detector_rules**](docs/ActionsApi.md#list_detector_rules) | **GET** /v1/actions/detector/{detector_id}/rules |
*ActionsApi* | [**list_rules**](docs/ActionsApi.md#list_rules) | **GET** /v1/actions/rules |
*DetectorsApi* | [**create_detector**](docs/DetectorsApi.md#create_detector) | **POST** /v1/detectors |
*DetectorsApi* | [**delete_detector**](docs/DetectorsApi.md#delete_detector) | **DELETE** /v1/detectors/{id} |
*DetectorsApi* | [**get_detector**](docs/DetectorsApi.md#get_detector) | **GET** /v1/detectors/{id} |
Expand Down
46 changes: 23 additions & 23 deletions generated/docs/ActionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ All URIs are relative to *https://api.groundlight.ai/device-api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_detector_rule**](ActionsApi.md#create_detector_rule) | **POST** /v1/actions/detector/{detector_id}/rules |
[**create_rule**](ActionsApi.md#create_rule) | **POST** /v1/actions/detector/{detector_id}/rules |
[**delete_rule**](ActionsApi.md#delete_rule) | **DELETE** /v1/actions/rules/{id} |
[**get_rule**](ActionsApi.md#get_rule) | **GET** /v1/actions/rules/{id} |
[**list_all_rules**](ActionsApi.md#list_all_rules) | **GET** /v1/actions/rules |
[**list_detector_rules**](ActionsApi.md#list_detector_rules) | **GET** /v1/actions/detector/{detector_id}/rules |
[**list_rules**](ActionsApi.md#list_rules) | **GET** /v1/actions/rules |


# **create_detector_rule**
> Rule create_detector_rule(detector_id, rule_request)
# **create_rule**
> Rule create_rule(detector_id, rule_request)


Expand Down Expand Up @@ -73,10 +73,10 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:

# example passing only required values which don't have defaults set
try:
api_response = api_instance.create_detector_rule(detector_id, rule_request)
api_response = api_instance.create_rule(detector_id, rule_request)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling ActionsApi->create_detector_rule: %s\n" % e)
print("Exception when calling ActionsApi->create_rule: %s\n" % e)
```


Expand Down Expand Up @@ -261,12 +261,12 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **list_all_rules**
> PaginatedRuleList list_all_rules()
# **list_detector_rules**
> PaginatedRuleList list_detector_rules(detector_id)


Lists all rules over all detectors owned by the requester.
List all rules for a detector

### Example

Expand Down Expand Up @@ -299,25 +299,22 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = actions_api.ActionsApi(api_client)
page = 1 # int | A page number within the paginated result set. (optional)
page_size = 1 # int | Number of results to return per page. (optional)
detector_id = "detector_id_example" # str |

# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.list_all_rules(page=page, page_size=page_size)
api_response = api_instance.list_detector_rules(detector_id)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling ActionsApi->list_all_rules: %s\n" % e)
print("Exception when calling ActionsApi->list_detector_rules: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int**| A page number within the paginated result set. | [optional]
**page_size** | **int**| Number of results to return per page. | [optional]
**detector_id** | **str**| |

### Return type

Expand All @@ -341,12 +338,12 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **list_detector_rules**
> PaginatedRuleList list_detector_rules(detector_id)
# **list_rules**
> PaginatedRuleList list_rules()


List all rules for a detector
Lists all rules over all detectors owned by the requester.

### Example

Expand Down Expand Up @@ -379,22 +376,25 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = actions_api.ActionsApi(api_client)
detector_id = "detector_id_example" # str |
page = 1 # int | A page number within the paginated result set. (optional)
page_size = 1 # int | Number of results to return per page. (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.list_detector_rules(detector_id)
api_response = api_instance.list_rules(page=page, page_size=page_size)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling ActionsApi->list_detector_rules: %s\n" % e)
print("Exception when calling ActionsApi->list_rules: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_id** | **str**| |
**page** | **int**| A page number within the paginated result set. | [optional]
**page_size** | **int**| Number of results to return per page. | [optional]

### Return type

Expand Down
86 changes: 43 additions & 43 deletions generated/groundlight_openapi_client/api/actions_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
self.create_detector_rule_endpoint = _Endpoint(
self.create_rule_endpoint = _Endpoint(
settings={
"response_type": (Rule,),
"auth": ["ApiToken"],
"endpoint_path": "/v1/actions/detector/{detector_id}/rules",
"operation_id": "create_detector_rule",
"operation_id": "create_rule",
"http_method": "POST",
"servers": None,
},
Expand Down Expand Up @@ -162,21 +162,22 @@ def __init__(self, api_client=None):
},
api_client=api_client,
)
self.list_all_rules_endpoint = _Endpoint(
self.list_detector_rules_endpoint = _Endpoint(
settings={
"response_type": (PaginatedRuleList,),
"auth": ["ApiToken"],
"endpoint_path": "/v1/actions/rules",
"operation_id": "list_all_rules",
"endpoint_path": "/v1/actions/detector/{detector_id}/rules",
"operation_id": "list_detector_rules",
"http_method": "GET",
"servers": None,
},
params_map={
"all": [
"page",
"page_size",
"detector_id",
],
"required": [
"detector_id",
],
"required": [],
"nullable": [],
"enum": [],
"validation": [],
Expand All @@ -185,16 +186,13 @@ def __init__(self, api_client=None):
"validations": {},
"allowed_values": {},
"openapi_types": {
"page": (int,),
"page_size": (int,),
"detector_id": (str,),
},
"attribute_map": {
"page": "page",
"page_size": "page_size",
"detector_id": "detector_id",
},
"location_map": {
"page": "query",
"page_size": "query",
"detector_id": "path",
},
"collection_format_map": {},
},
Expand All @@ -204,22 +202,21 @@ def __init__(self, api_client=None):
},
api_client=api_client,
)
self.list_detector_rules_endpoint = _Endpoint(
self.list_rules_endpoint = _Endpoint(
settings={
"response_type": (PaginatedRuleList,),
"auth": ["ApiToken"],
"endpoint_path": "/v1/actions/detector/{detector_id}/rules",
"operation_id": "list_detector_rules",
"endpoint_path": "/v1/actions/rules",
"operation_id": "list_rules",
"http_method": "GET",
"servers": None,
},
params_map={
"all": [
"detector_id",
],
"required": [
"detector_id",
"page",
"page_size",
],
"required": [],
"nullable": [],
"enum": [],
"validation": [],
Expand All @@ -228,13 +225,16 @@ def __init__(self, api_client=None):
"validations": {},
"allowed_values": {},
"openapi_types": {
"detector_id": (str,),
"page": (int,),
"page_size": (int,),
},
"attribute_map": {
"detector_id": "detector_id",
"page": "page",
"page_size": "page_size",
},
"location_map": {
"detector_id": "path",
"page": "query",
"page_size": "query",
},
"collection_format_map": {},
},
Expand All @@ -245,14 +245,14 @@ def __init__(self, api_client=None):
api_client=api_client,
)

def create_detector_rule(self, detector_id, rule_request, **kwargs):
"""create_detector_rule # noqa: E501
def create_rule(self, detector_id, rule_request, **kwargs):
"""create_rule # noqa: E501
Create a new rule for a detector # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_detector_rule(detector_id, rule_request, async_req=True)
>>> thread = api.create_rule(detector_id, rule_request, async_req=True)
>>> result = thread.get()
Args:
Expand Down Expand Up @@ -303,7 +303,7 @@ def create_detector_rule(self, detector_id, rule_request, **kwargs):
kwargs["_host_index"] = kwargs.get("_host_index")
kwargs["detector_id"] = detector_id
kwargs["rule_request"] = rule_request
return self.create_detector_rule_endpoint.call_with_http_info(**kwargs)
return self.create_rule_endpoint.call_with_http_info(**kwargs)

def delete_rule(self, id, **kwargs):
"""delete_rule # noqa: E501
Expand Down Expand Up @@ -421,20 +421,20 @@ def get_rule(self, id, **kwargs):
kwargs["id"] = id
return self.get_rule_endpoint.call_with_http_info(**kwargs)

def list_all_rules(self, **kwargs):
"""list_all_rules # noqa: E501
def list_detector_rules(self, detector_id, **kwargs):
"""list_detector_rules # noqa: E501
Lists all rules over all detectors owned by the requester. # noqa: E501
List all rules for a detector # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_all_rules(async_req=True)
>>> thread = api.list_detector_rules(detector_id, async_req=True)
>>> result = thread.get()
Args:
detector_id (str):
Keyword Args:
page (int): A page number within the paginated result set.. [optional]
page_size (int): Number of results to return per page.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down Expand Up @@ -476,22 +476,23 @@ def list_all_rules(self, **kwargs):
kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
kwargs["_content_type"] = kwargs.get("_content_type")
kwargs["_host_index"] = kwargs.get("_host_index")
return self.list_all_rules_endpoint.call_with_http_info(**kwargs)
kwargs["detector_id"] = detector_id
return self.list_detector_rules_endpoint.call_with_http_info(**kwargs)

def list_detector_rules(self, detector_id, **kwargs):
"""list_detector_rules # noqa: E501
def list_rules(self, **kwargs):
"""list_rules # noqa: E501
List all rules for a detector # noqa: E501
Lists all rules over all detectors owned by the requester. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_detector_rules(detector_id, async_req=True)
>>> thread = api.list_rules(async_req=True)
>>> result = thread.get()
Args:
detector_id (str):
Keyword Args:
page (int): A page number within the paginated result set.. [optional]
page_size (int): Number of results to return per page.. [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
Expand Down Expand Up @@ -533,5 +534,4 @@ def list_detector_rules(self, detector_id, **kwargs):
kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
kwargs["_content_type"] = kwargs.get("_content_type")
kwargs["_host_index"] = kwargs.get("_host_index")
kwargs["detector_id"] = detector_id
return self.list_detector_rules_endpoint.call_with_http_info(**kwargs)
return self.list_rules_endpoint.call_with_http_info(**kwargs)
6 changes: 3 additions & 3 deletions generated/groundlight_openapi_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,10 @@ def __call__(self, *args, **kwargs):
Example:
api_instance = ActionsApi()
api_instance.create_detector_rule # this is an instance of the class Endpoint
api_instance.create_detector_rule() # this invokes api_instance.create_detector_rule.__call__()
api_instance.create_rule # this is an instance of the class Endpoint
api_instance.create_rule() # this invokes api_instance.create_rule.__call__()
which then invokes the callable functions stored in that endpoint at
api_instance.create_detector_rule.callable or self.callable in this class
api_instance.create_rule.callable or self.callable in this class
"""
return self.callable(self, *args, **kwargs)
Expand Down
Loading

0 comments on commit 2a7bcb4

Please sign in to comment.